From 2f689df458ceb7339948c7033569674ebf7cb758 Mon Sep 17 00:00:00 2001 From: Ungol Date: Tue, 23 Dec 2025 22:27:51 +0100 Subject: [PATCH] feat: improve header of article --- content/blog/example.md | 7 +++++-- sass/_base.scss | 21 +++++++++++++++------ templates/post.html | 5 ++++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/content/blog/example.md b/content/blog/example.md index ba21ca7..476860a 100644 --- a/content/blog/example.md +++ b/content/blog/example.md @@ -1,6 +1,9 @@ +++ -title = "Markdown example page" -date = 2019-11-27 +title = "Page d'exemple Markdown" +description = "A quoi ça ressemble un article ?" +date = 2025-03-27 +updated = 2025-05-13 +authors = ["Ungol"] +++ Cet article est un exemple utilisant du lorem ipsum en markdown pour développer diff --git a/sass/_base.scss b/sass/_base.scss index 86c957b..85b2e03 100644 --- a/sass/_base.scss +++ b/sass/_base.scss @@ -30,6 +30,21 @@ section { border-bottom-width: 1px; border-bottom-color: var(--surface0); border-bottom-style: solid; + + &>p { + &.metadata { + font-size: .8rem; + font-style: italic; + text-align: end; + } + + &.subtitle { + color: var(--subtext0); + font-size: 1.5rem; + margin-top: 0; + margin-bottom: 2rem; + } + } } } @@ -87,12 +102,6 @@ h6 { p { margin-top: 1.25rem; margin-bottom: 1.25rem; - - &.subtitle { - color: var(--subtext0); - margin-top: 0; - margin-bottom: 3rem; - } } a { diff --git a/templates/post.html b/templates/post.html index cb2934b..e92bd0b 100644 --- a/templates/post.html +++ b/templates/post.html @@ -4,7 +4,10 @@

{{ page.title }}

-

{{ page.date }}

+ {% if page.description %} +

{{ page.description }}

+ {% endif %} +
{{ page.content | safe }}