From 1d939fb107b9fa2e87b0c382e77112ef17730c94 Mon Sep 17 00:00:00 2001 From: Alexis Fourmaux Date: Wed, 14 May 2025 22:36:03 +0200 Subject: [PATCH] feat: improve metadata display --- config.toml | 1 + sass/_base.scss | 27 +++++++++++++-------------- templates/blog.html | 6 +++++- templates/post.html | 16 +++++++++++++++- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/config.toml b/config.toml index 99305df..8e25115 100644 --- a/config.toml +++ b/config.toml @@ -6,6 +6,7 @@ compile_sass = true # Whether to build a search index to be used later on by a JavaScript library build_search_index = true +default_language = 'fr' [markdown] # Whether to do syntax highlighting diff --git a/sass/_base.scss b/sass/_base.scss index 42bacca..f42847d 100644 --- a/sass/_base.scss +++ b/sass/_base.scss @@ -27,10 +27,7 @@ article { section { &.title { - border-bottom-width: 1px; - border-bottom-color: var(--overlay0); - border-bottom-style: solid; - margin-bottom: 3rem; + margin-bottom: 2.5rem; &>h1.title { font-size: 3rem; @@ -40,20 +37,22 @@ section { } &>p { - &.metadata { - color: var(--subtext1); - font-size: .8rem; - font-style: italic; - font-weight: 300; - text-align: end; - margin: 0 - } - &.subtitle { color: var(--subtext1); font-size: 1.5rem; margin-top: 0; - margin-bottom: 2rem; + margin-bottom: 2.5rem; + } + + &.metadata { + color: var(--subtext1); + font-size: .8rem; + font-weight: 100; + text-align: center; + margin: 0; + border-bottom-width: 1px; + border-bottom-color: var(--overlay0); + border-bottom-style: solid; } } } diff --git a/templates/blog.html b/templates/blog.html index 29f5261..8ecabe0 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -8,7 +8,11 @@ {% for page in section.pages %} -
  • {{ page.title }}
  • +
  • + {{ page.title }} + {% if page.description %}{{ page.description }}{% endif %} + {{ page.summary }} +
  • {% endfor %} {% endblock content %} \ No newline at end of file diff --git a/templates/post.html b/templates/post.html index e92bd0b..46df191 100644 --- a/templates/post.html +++ b/templates/post.html @@ -7,7 +7,21 @@ {% if page.description %}

    {{ page.description }}

    {% endif %} -

    par {{ page.authors | join(sep=', ') }} le {{ page.date }}{% if page.updated %} (mise à jour : {{ page.updated }}){% endif %}

    +

    +  {{ page.authors | join(sep=', ') }} + | + + +  {{ page.date | date(format='%d %b %Y') }} + + | + {% if page.updated %} + 󰚰 {{ page.updated | date(format='%d %b %Y') }} + | + {% endif %} + 󱎫 {{ page.reading_time }} min + +

    {{ page.content | safe }}