From 1274e31b50d3275615adec9f7d6c773b3d1b67f4 Mon Sep 17 00:00:00 2001 From: Jeff MacKinnon Date: Wed, 9 Mar 2022 10:41:11 -0400 Subject: [PATCH] Updating layouts and general changes. --- static/css/main.css | 94 +++++++++++++++++++++- templates/article.html | 56 ++++++++----- templates/base.html | 178 +++++++++++++++++++++-------------------- 3 files changed, 219 insertions(+), 109 deletions(-) diff --git a/static/css/main.css b/static/css/main.css index a0335fa..e689ec1 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1610,7 +1610,7 @@ button, -ms-flex-wrap: wrap; flex-wrap: wrap; margin: 0 0 2em -3em; - width: calc(100% + 3em); } + width: calc(80% + 3em); } .features article { -moz-align-items: center; -webkit-align-items: center; @@ -2275,3 +2275,95 @@ button, border-top: 0; margin-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 */ \ No newline at end of file diff --git a/templates/article.html b/templates/article.html index 04582b9..b852721 100644 --- a/templates/article.html +++ b/templates/article.html @@ -62,16 +62,37 @@ title="Permalink to {{ article.title|striptags }}">{{ article.title }} {% import 'translations.html' as translations with context %} {{ translations.translations_for(article) }} +Published: +{% if article.modified %} +
Updated: +{% endif %} +{% if article.authors %} +
+ By {% for author in article.authors %} + {{ author }} + {% endfor %} +

+{% endif %} +

Share this article on: + Twitter + Linkedin + Email +

+ + {% if article.photo_image %} - + +

{% endif %} - - +
-

{{ article.content }} - + {% if article.photo_gallery %} + + {% endif %} + {% if article.series %}


- {% if article.series %} +

This post is part {{ article.series.index }} of the "{{ article.series.name }}" series:

    {% for part_article in article.series.all %} @@ -91,25 +115,13 @@ {% endfor %}
- {% endif %} +
+ {% endif %} + +
- Published: - {% if article.modified %} -
Updated: - {% endif %} - {% if article.authors %} -
- By {% for author in article.authors %} - {{ author }} - {% endfor %} -

- {% endif %} {% if article.category %}
Category: {{ article.category }} diff --git a/templates/base.html b/templates/base.html index 449dc0a..d639f53 100644 --- a/templates/base.html +++ b/templates/base.html @@ -34,26 +34,23 @@ {% if TAG_FEED_RSS and tag %} {% endif %} - - - - - - + + + {% endblock head %} @@ -67,17 +64,23 @@
    - {% if SOCIAL_TWIITER %} -
  • Twitter
  • + {% if SOCIAL_TWITTER %} +
  • Twitter
  • + {% endif %} + {% if SOCIAL_FLICKR %} +
  • Flickr
  • {% endif %} {% if SOCIAL_GITHUB %} -
  • Github
  • +
  • Github
  • + {% endif %} + {% if SOCIAL_LINKEDIN %} +
  • LinkedIn
  • {% endif %} {% if FEED_ALL_ATOM %}
  • atom feed
  • {% endif %} {% if FEED_ALL_RSS %} -
  • rss feed
  • +
  • rss feed
  • {% endif %}
@@ -159,59 +162,63 @@
  • More
  • --> + + {% if LINKS %} +
    +
    +

    Blogroll

    +
    + {% for name, link in LINKS %} +
  • {{ name }}
  • + {% endfor %} +
    + {% endif %} - {% if series_name %} +
    +
    +

    Here are some post series

    +
    + {% for series_name, series_articles in series.items() %} + {% set article = series_articles[0] %} + + {% endfor %} +
    + + {% if CONTACT_EMAIL or CONTACT_PHONE_NUM or CONTACT_HOME_ADDR %}
    -

    Here are some post series

    -
    - {% for series_name, series_articles in series.items() %} - {% set article = series_articles[0] %} - - {% endfor %} -
    - {% endif %} - - {% if LINKS %} -
    -
    -

    Blogroll

    -
    - - {% for name, link in LINKS %} -
  • {{ name }}
  • - {% endfor %} -
    - {% endif %} - - -
    -
    -

    Get in touch

    -
    -

    I will add some contact information on here eventuall, but for now, NOPE

    -
      -
    • Halifax, NS
    • -
    -
    +

    Get in touch

    + +
      + {% if CONTACT_EMAIL %} +
    • {{ CONTACT_EMAIL }}
    • + {% endif %} + {% if CONTACT_PHONE_NUM %} +
    • {{ CONTACT_PHONE_NUM }}
    • + {% endif %} + {% if CONTACT_HOME_ADDR %} +
    • {{ CONTACT_HOME_ADDR }}
    • + {% endif %} +
    + + {% endif %} -
    - +
    -
    @@ -223,31 +230,30 @@ {% if (article and article.photo_gallery) or (articles_page and articles_page.object_list[0].photo_gallery) %} - - + + - - - + -{% endif %} - + return item.el.attr('title') + '' + item.el.attr('exif') + ''; + } } + }); + + {% endif %}