Updating layouts and general changes.

This commit is contained in:
Jeff MacKinnon 2022-03-09 10:41:11 -04:00
parent 4083c54a5b
commit 1274e31b50
3 changed files with 219 additions and 109 deletions

View file

@ -1610,7 +1610,7 @@ button,
-ms-flex-wrap: wrap; -ms-flex-wrap: wrap;
flex-wrap: wrap; flex-wrap: wrap;
margin: 0 0 2em -3em; margin: 0 0 2em -3em;
width: calc(100% + 3em); } width: calc(80% + 3em); }
.features article { .features article {
-moz-align-items: center; -moz-align-items: center;
-webkit-align-items: center; -webkit-align-items: center;
@ -2275,3 +2275,95 @@ button,
border-top: 0; border-top: 0;
margin-top: 0; margin-top: 0;
padding-top: 0; } padding-top: 0; }
/* Trying to figure out how to make notes/warnings/etc working */
/* -- admonitions ----------------------------------------------------------- */
div.admonition > :last-child {
margin-bottom: 0;
}
div.admonition::after {
display: block;
content: '';
clear: both;
}
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
:root {
--pst-color-primary: 19, 6, 84;
--pst-color-success: 40, 167, 69;
--pst-color-info: 0, 123, 255; /*23, 162, 184;*/
--pst-color-warning: 255, 193, 7;
--pst-color-danger: 220, 53, 69;
/*****************************************************************************
* Icon
**/
/* font awesome icons*/
--pst-icon-check-circle: '\f058';
--pst-icon-info-circle: '\f05a';
--pst-icon-exclamation-triangle: '\f071';
--pst-icon-exclamation-circle: '\f06a';
--pst-icon-times-circle: '\f057';
--pst-icon-lightbulb: '\f0eb';
/*****************************************************************************
* Admonitions
**/
--pst-color-admonition-default: var(--pst-color-info);
--pst-color-admonition-note: var(--pst-color-info);
--pst-color-admonition-attention: var(--pst-color-warning);
--pst-color-admonition-caution: var(--pst-color-warning);
--pst-color-admonition-warning: var(--pst-color-warning);
--pst-color-admonition-danger: var(--pst-color-danger);
--pst-color-admonition-error: var(--pst-color-danger);
--pst-color-admonition-hint: var(--pst-color-success);
--pst-color-admonition-tip: var(--pst-color-success);
--pst-color-admonition-important: var(--pst-color-success);
--pst-icon-admonition-default: var(--pst-icon-info-circle);
--pst-icon-admonition-note: var(--pst-icon-info-circle);
--pst-icon-admonition-attention: var(--pst-icon-exclamation-circle);
--pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle);
--pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle);
--pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle);
--pst-icon-admonition-error: var(--pst-icon-times-circle);
--pst-icon-admonition-hint: var(--pst-icon-lightbulb);
--pst-icon-admonition-tip: var(--pst-icon-lightbulb);
--pst-icon-admonition-important: var(--pst-icon-exclamation-circle);
}
/* They are still not working */

View file

@ -62,16 +62,37 @@
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
{% import 'translations.html' as translations with context %} {% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }} {{ translations.translations_for(article) }}
Published: <time class="published" datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time>
{% if article.modified %}
<br />Updated: <time class="modified" datetime="{{ article.modified.isoformat() }}">
{{ article.locale_modified }}
</time>
{% endif %}
{% if article.authors %}
<address class="vcard author">
By {% for author in article.authors %}
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %}
</address><br />
{% endif %}
<p class="share">Share this article on:
<span><a class="" href="https://twitter.com/intent/tweet?text={{ article.title|striptags }}&url={{ SITEURL }}/{{ article.url }}{% if SOCIAL_TWITTER %}&via={{ SOCIAL_TWITTER }}{% endif %}" target="_blank" title="Share on Twitter"><i class="fab fa-twitter"></i> Twitter</a></span>
<span><a class="" href="https://www.linkedin.com/sharing/share-offsite/?url={{ SITEURL }}/{{ article.url }}" target="_blank" title="Share via Linkedin"><i class="icon brands fa-linkedin"></i> Linkedin</a></span>
<span><a class="" href="mailto:?subject={{ article.title|striptags }}&body={{ article.summary|striptags }} - {{ SITEURL }}/{{ article.url }}" target="_blank" title="Share via Email"><i class="fas fa-envelope"></i> Email</a></span>
</p>
{% if article.photo_image %} {% if article.photo_image %}
<img style="max-width:100%; display: block; margin: 0px auto;" src="{{ SITEURL }}/{{ article.photo_image[1] }}" /> <img style="max-width:90%; display: block; margin: 0px auto;" src="{{ SITEURL }}/{{ article.photo_image[1] }}" />
<br /><br />
{% endif %} {% endif %}
</header> </header>
<div class="entry-content"> <div class="entry-content">
<br /><br />
{{ article.content }} {{ article.content }}
{% if article.photo_gallery %}
<div class="gallery"> <br /><br /> <div class="gallery"> <br /><br />
{% for title, gallery in article.photo_gallery %} {% for title, gallery in article.photo_gallery %}
<h2>{{ title }}</h2> <h2>{{ title }}</h2>
@ -80,9 +101,12 @@
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %}
{% if article.series %}
<div class="post series"> <div class="post series">
<br /><br /> <br /><br />
{% if article.series %}
<p>This post is part {{ article.series.index }} of the "{{ article.series.name }}" series:</p> <p>This post is part {{ article.series.index }} of the "{{ article.series.name }}" series:</p>
<ol class="parts"> <ol class="parts">
{% for part_article in article.series.all %} {% for part_article in article.series.all %}
@ -91,25 +115,13 @@
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
{% endif %}
</div> </div>
{% endif %}
<footer class="post-info"> <footer class="post-info">
Published: <time class="published" datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time>
{% if article.modified %}
<br />Updated: <time class="modified" datetime="{{ article.modified.isoformat() }}">
{{ article.locale_modified }}
</time>
{% endif %}
{% if article.authors %}
<address class="vcard author">
By {% for author in article.authors %}
<a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %}
</address><br />
{% endif %}
{% if article.category %} {% if article.category %}
<div class="category"> <div class="category">
Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>

View file

@ -34,26 +34,23 @@
{% if TAG_FEED_RSS and tag %} {% if TAG_FEED_RSS and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
{% endif %} {% endif %}
<!-- Matomo -->
<script>
<!-- Matomo --> var _paq = window._paq = window._paq || [];
<script> /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
var _paq = window._paq = window._paq || []; _paq.push(["setDoNotTrack", true]);
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["disableCookies"]);
_paq.push(["setDoNotTrack", true]); _paq.push(['trackPageView']);
_paq.push(["disableCookies"]); _paq.push(['enableLinkTracking']);
_paq.push(['trackPageView']); (function() {
_paq.push(['enableLinkTracking']); var u="//stats.jeffmackinnon.com/";
(function() { _paq.push(['setTrackerUrl', u+'matomo.php']);
var u="//stats.jeffmackinnon.com/"; _paq.push(['setSiteId', '2']);
_paq.push(['setTrackerUrl', u+'matomo.php']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
_paq.push(['setSiteId', '2']); g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; })();
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); </script>
})(); <!-- End Matomo Code -->
</script>
<!-- End Matomo Code -->
{% endblock head %} {% endblock head %}
</head> </head>
@ -67,17 +64,23 @@
<strong><a href="{{ SITEURL }}/" class="logo">{{ SITENAME }}{% if SITESUBTITLE %} {{ SITESUBTITLE }}{% endif %}</a></strong> <strong><a href="{{ SITEURL }}/" class="logo">{{ SITENAME }}{% if SITESUBTITLE %} {{ SITESUBTITLE }}{% endif %}</a></strong>
<ul class="icons"> <ul class="icons">
{% if SOCIAL_TWIITER %} {% if SOCIAL_TWITTER %}
<li><a href="https://twitter.com/{{ SOCIAL_TWIITER }}" class="icon brands fa-twitter"><span class="label">Twitter</span></a></li> <li><a href="https://twitter.com/{{ SOCIAL_TWITTER }}" class="icon brands fa-twitter" target="_blank" rel="noopener noreferrer"><span class="label">Twitter</span></a></li>
{% endif %}
{% if SOCIAL_FLICKR %}
<li><a href="https://www.flickr.com/photos/{{ SOCIAL_FLICKR }}" class="icon brands fa-flickr" target="_blank" rel="noopener noreferrer"><span class="label">Flickr</span></a></li>
{% endif %} {% endif %}
{% if SOCIAL_GITHUB %} {% if SOCIAL_GITHUB %}
<li><a href="https://github.com/{{ SOCIAL_GITHUB }}" class="icon brands fa-github"><span class="label">Github</span></a></li> <li><a href="https://github.com/{{ SOCIAL_GITHUB }}" class="icon brands fa-github" target="_blank" rel="noopener noreferrer"><span class="label">Github</span></a></li>
{% endif %}
{% if SOCIAL_LINKEDIN %}
<li><a href="https://www.linkedin.com/in/{{ SOCIAL_LINKEDIN }}" class="icon brands fa-linkedin" target="_blank" rel="noopener noreferrer"><span class="label">LinkedIn</span></a></li>
{% endif %} {% endif %}
{% if FEED_ALL_ATOM %} {% if FEED_ALL_ATOM %}
<li><a href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" class="icon brands fa-atom"><span class="label">atom feed</span></a></li> <li><a href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" class="icon brands fa-atom"><span class="label">atom feed</span></a></li>
{% endif %} {% endif %}
{% if FEED_ALL_RSS %} {% if FEED_ALL_RSS %}
<li><a href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" class="icon brands fa-rss-square"><span class="label">rss feed</span></a></li> <li><a href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" class="icon brands fa-rss"><span class="label">rss feed</span></a></li>
{% endif %} {% endif %}
</ul> </ul>
</header> </header>
@ -159,59 +162,63 @@
<li><a href="#" class="button">More</a></li> <li><a href="#" class="button">More</a></li>
</ul> </ul>
</section> --> </section> -->
{% if LINKS %}
<section id="blogroll">
<header class="major">
<h2>Blogroll</h2>
</header>
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</section>
{% endif %}
<!-- Section - The various series --> <!-- Section - The various series -->
{% if series_name %} <section id="article-series">
<header class="major">
<h2>Here are some post series</h2>
</header>
{% for series_name, series_articles in series.items() %}
{% set article = series_articles[0] %}
<article class="card">
<div class="card-body">
<a href="{{ SITEURL }}/{{ article.url }}"><h3 class="card-title">{{ series_name }}</h3></a>
<ul class="actions">
<li><a href="{{ SITEURL }}/{{ article.url }}" class="button">Start</a></li>
</ul>
</div>
</article>
{% endfor %}
</section>
{% if CONTACT_EMAIL or CONTACT_PHONE_NUM or CONTACT_HOME_ADDR %}
<section> <section>
<header class="major"> <header class="major">
<h2>Here are some post series</h2> <h2>Get in touch</h2>
</header> </header>
{% for series_name, series_articles in series.items() %} <ul class="contact">
{% set article = series_articles[0] %} {% if CONTACT_EMAIL %}
<article class="card"> <li class="icon sold fa-envelope">{{ CONTACT_EMAIL }}</li>
<div class="card-body"> {% endif %}
<a href="{{ SITEURL }}/{{ article.url }}"><h3 class="card-title">{{ series_name }}</h3></a> {% if CONTACT_PHONE_NUM %}
<ul class="actions"> <li class="icon solid fa-phone">{{ CONTACT_PHONE_NUM }}</li>
<li><a href="{{ SITEURL }}/{{ article.url }}" class="button">Start</a></li> {% endif %}
</ul> {% if CONTACT_HOME_ADDR %}
</div> <li class="icon solid fa-home">{{ CONTACT_HOME_ADDR }}</li>
</article> {% endif %}
{% endfor %} </ul>
</section> </section>
{% endif %} {% endif %}
{% if LINKS %}
<section id="blogroll">
<header class="major">
<h2>Blogroll</h2>
</header>
{% for name, link in LINKS %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</section>
{% endif %}
<!-- Section -->
<section>
<header class="major">
<h2>Get in touch</h2>
</header>
<p>I will add some contact information on here eventuall, but for now, NOPE</p>
<ul class="contact">
<li class="icon solid fa-home">Halifax, NS</li>
</ul>
</section>
<!-- Footer --> <!-- Footer -->
<footer id="footer"> <footer id="footer">
<p class="copyright">&copy; Untitled. All rights reserved. Original design: <a href="https://html5up.net">HTML5 UP</a>. <br /> <p class="copyright">&copy; Untitled. All rights reserved. Original design: <a href="https://html5up.net">HTML5 UP</a>. <br />
Proudly powered by <a href="https://getpelican.com/">Pelican</a>, which takes great advantage of <a href="https://www.python.org/">Python</a>. <br /> Proudly powered by <a href="https://getpelican.com/">Pelican</a>, which takes great advantage of <a href="https://www.python.org/">Python</a>. <br />
Modifed by <a href="https://jeffmackinnon.com/i-built-a-pelican-theme.html">Jeff MacKinnon</a></p> Modifed by <a href="https://jeffmackinnon.com/i-built-a-pelican-theme.html">Jeff MacKinnon</a></p>
</footer> </footer>
</div> </div>
</div> </div>
</div> </div>
@ -223,31 +230,30 @@
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/main.js"></script> <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/main.js"></script>
{% if (article and article.photo_gallery) or (articles_page and articles_page.object_list[0].photo_gallery) %} {% if (article and article.photo_gallery) or (articles_page and articles_page.object_list[0].photo_gallery) %}
<!-- jQuery 1.7.2+ or Zepto.js 1.0+ --> <!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<!-- Magnific Popup core JS file --> <!-- Magnific Popup core JS file -->
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/magnific-popup.js"></script> <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/magnific-popup.js"></script>
<script> <script>
$('.gallery').magnificPopup({ $('.gallery').magnificPopup({
delegate: 'a', delegate: 'a',
type: 'image', type: 'image',
gallery: { gallery: {
enabled: true, enabled: true,
navigateByImgClick: true, navigateByImgClick: true,
preload: [1,2] preload: [1,2]
}, },
image: { image: {
titleSrc: function(item) { titleSrc: function(item) {
if (item.el.attr('caption') && item.el.attr('exif')) { if (item.el.attr('caption') && item.el.attr('exif')) {
return (item.el.attr('caption').replace(/\\n/g, '<br />') + return (item.el.attr('caption').replace(/\\n/g, '<br />') +
'<small>' + item.el.attr('title') + ' - ' + item.el.attr('exif') + '</small>'); '<small>' + item.el.attr('title') + ' - ' + item.el.attr('exif') + '</small>');
} }
return item.el.attr('title') + '<small>' + item.el.attr('exif') + '</small>'; return item.el.attr('title') + '<small>' + item.el.attr('exif') + '</small>';
} } } }
}); });
</script> </script>
{% endif %} {% endif %}
</body> </body>
</html> </html>