From 83ead7a00b5ef2604c6fcf46a1f534ba3257be83 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sat, 4 Nov 2023 10:41:47 +0100 Subject: [PATCH] Better HTML --- src/sass/style.scss | 51 +++++++++++++++++++------------------- src/templates/base.html | 23 +++++++++-------- src/templates/index.html | 4 +-- src/templates/post.html | 2 +- src/templates/section.html | 2 +- 5 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/sass/style.scss b/src/sass/style.scss index 4d99162..729bb43 100644 --- a/src/sass/style.scss +++ b/src/sass/style.scss @@ -2,37 +2,12 @@ body { margin: 0; } -header { - border-bottom: black 1px solid; - padding: 0.5em; - - section { - display: inline; - - + section::before { - content: '| '; - } - } -} - main { padding: 0.5em; max-width: 60em; margin: 0 auto; } -footer { - border-top: black 1px solid; - padding: 0.5em; - section { - display: inline; - - + section::before { - content: '| '; - } - } -} - pre { padding: 0.5em; } @@ -57,6 +32,32 @@ pre { } } +header { + border-bottom: black 1px solid; +} + +footer { + border-top: black 1px solid; +} + +header, footer { + padding: 0.5em; + + nav ol { + padding: 0; + margin: 0; + + li { + display: inline; + list-style-type: none; + + + li::before { + content: '| '; + } + } + } +} + @media (prefers-color-scheme: dark) { header { border-bottom: #ccc 1px solid; diff --git a/src/templates/base.html b/src/templates/base.html index cb74612..5017c96 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -10,21 +10,24 @@
-
- Homepage -
-
- Blog -
+
{% block content %} {% endblock %}
diff --git a/src/templates/index.html b/src/templates/index.html index 60c339d..2d2f18d 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -14,8 +14,8 @@ appropriately named About me page. {% for page in blog_section.pages | slice(end=3) %}
  • {{ page.title }} ({{ page.date }})

    -

    {{ page.summary | safe }}

    -

    Continue reading… + {{ page.summary | safe }} +

    Continue reading…

  • {% endfor %} diff --git a/src/templates/post.html b/src/templates/post.html index 7b3d4ce..f4abf07 100644 --- a/src/templates/post.html +++ b/src/templates/post.html @@ -9,7 +9,7 @@

    Comments or questions about this post? Feel free to contact me on Mastodon or send - me an email. + me an email.

    {% endblock content %} diff --git a/src/templates/section.html b/src/templates/section.html index 2e3b65e..a037526 100644 --- a/src/templates/section.html +++ b/src/templates/section.html @@ -12,7 +12,7 @@ {% for page in section.pages %}
  • {{ page.title }} ({{ page.date }})

    -

    {{ page.summary | safe }}

    + {{ page.summary | safe }}

    Continue reading…

  • {% endfor %}