From 70cdfb1141239949769889240861e7a28bf3a38c Mon Sep 17 00:00:00 2001 From: jutty Date: Sun, 21 Sep 2025 00:24:55 -0300 Subject: [PATCH] Add Simple CSS and set date formats on templates --- config.toml | 2 ++ static/assets/css/overrides.css | 43 +++++++++++++++++++++++++++++++++ templates/base.html | 3 +++ templates/poema.html | 6 ++++- templates/poesia.html | 9 +++++-- 5 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 static/assets/css/overrides.css diff --git a/config.toml b/config.toml index 37e71d6..fc6120b 100644 --- a/config.toml +++ b/config.toml @@ -3,5 +3,7 @@ base_url = "localhost" compile_sass = false build_search_index = true +default_language = "pt" + [markdown] highlight_code = false diff --git a/static/assets/css/overrides.css b/static/assets/css/overrides.css new file mode 100644 index 0000000..f117b5d --- /dev/null +++ b/static/assets/css/overrides.css @@ -0,0 +1,43 @@ + +:root { + --accent: #B60000; + --accent-hover: #1266e2; + --accent-text: var(--bg); + --code: #d81b60; + --preformatted: #444; + --marked: #ffdd33; + --disabled: #efefef; +} + +@media (prefers-color-scheme: dark) { + :root { + color-scheme: dark; + --accent: #FF8A8A; + --accent-hover: #ffe099; + --code: #f06292; + --preformatted: #ccc; + } +} + +pre, +code, +pre span +{ + font-family: "Libre Baskerville"; + background-color: inherit; + border: none; +} + + +@font-face { + font-family: 'Libre Baskerville'; + font-style: normal; + font-display: swap; + font-weight: 400; + src: url(https://cdn.jsdelivr.net/fontsource/fonts/libre-baskerville@latest/latin-400-normal.woff2) format('woff2'), url(https://cdn.jsdelivr.net/fontsource/fonts/libre-baskerville@latest/latin-400-normal.woff) format('woff'); + unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; +} + +html { + font-family: "Libre Baskerville"; +} diff --git a/templates/base.html b/templates/base.html index 2c4b97c..d40b555 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,6 +3,9 @@ + + + Incandescência diff --git a/templates/poema.html b/templates/poema.html index f0f638e..e9e101a 100644 --- a/templates/poema.html +++ b/templates/poema.html @@ -4,6 +4,10 @@

{{ page.title }}

-

{{ page.date }}

+

+ + {{ page.date | date(format="%A, %e de %B de %Y", locale="pt_BR") }} + +

{{ page.content | safe }} {% endblock content %} diff --git a/templates/poesia.html b/templates/poesia.html index 8887aca..a050a49 100644 --- a/templates/poesia.html +++ b/templates/poesia.html @@ -6,8 +6,13 @@ {% endblock content %} -