From 4a4f037cd6823022f6679e37669f52a7e07996e4 Mon Sep 17 00:00:00 2001 From: daudix Date: Sun, 29 Sep 2024 21:29:33 +0300 Subject: [PATCH] Prevent articles in the article list from having multiple visual types at once, bump to v5.3.0 --- CHANGELOG.md | 6 +++++- content/_index.md | 5 +++-- sass/style.scss | 2 +- templates/partials/article_type.html | 11 +++++++++++ templates/partials/articles.html | 19 +++++-------------- 5 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 templates/partials/article_type.html diff --git a/CHANGELOG.md b/CHANGELOG.md index da62afa..676cb6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v5.2.0...main) +## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v5.3.0...main) + +## [5.3.0](https://codeberg.org/daudix/duckquill/compare/v5.2.0...v5.3.0) ### Added @@ -15,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow enabling KaTeX per page/section. - Improve the logic of inclusion feeds in ``. +- Prevent articles in the article list from having multiple visual types at once (i.e., archived and featured badges at the same time). - Restly the heading anchors. ## Fixed @@ -40,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Get rid of dashed outline on article hover in article list. - Make comment actions slimmer. - Make navabr menu/search open animation nicer (scale up instead of just fading from transparency). +- More visually interesting dropdown open animation. - More visually interesting paginator. - Move paginator from `articles.html` to `article-list.html`. - Tweak styling of `details`. diff --git a/content/_index.md b/content/_index.md index b32a8d0..dd763cd 100644 --- a/content/_index.md +++ b/content/_index.md @@ -70,7 +70,7 @@ It is highly recommended to switch from the `main` branch to the latest release: ```bash cd themes/duckquill -git checkout tags/v5.2.0 +git checkout tags/v5.3.0 ``` Then, enable it in your `config.toml`: @@ -84,7 +84,7 @@ To update the theme, simply switch to a new tag: ```bash git submodule update --remote --merge cd themes/duckquill -git checkout tags/v5.2.0 +git checkout tags/v5.3.0 ``` {% alert(important=true) %} @@ -111,6 +111,7 @@ Configuration variables from `config.toml` that can be set/overriden per page/se - `emoji_favicon`: Use emoji as a favicon. Only one emoji is being rendered, everything else is truncated. - `styles`: Additional CSS styles; expects them to be in the `./static/` directory. If you are using Sass it will be generated there automatically. - `scripts`: Additional JavaScript scripts; expects them to be in the `./static/` directory. +- `katex`: Whether to enable the KaTeX library for rendering LaTeX. Other variables: diff --git a/sass/style.scss b/sass/style.scss index 74058e7..3c80e6b 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -1,5 +1,5 @@ /*! - * Duckquill v5.2.0 (https://duckquill.daudix.one) + * Duckquill v5.3.0 (https://duckquill.daudix.one) * Copyright 2024 David "Daudix" Lapshin * Licensed under MIT (https://codeberg.org/daudix/duckquill/src/branch/main/LICENSE) */ diff --git a/templates/partials/article_type.html b/templates/partials/article_type.html new file mode 100644 index 0000000..ec59b31 --- /dev/null +++ b/templates/partials/article_type.html @@ -0,0 +1,11 @@ +{%- if page.draft -%} + class="draft" +{%- elif page.extra.archive -%} + class="archive" +{%- elif page.extra.featured -%} + class="featured" +{%- elif page.extra.hot -%} + class="hot" +{%- elif page.extra.poor -%} + class="poor" +{%- endif -%} diff --git a/templates/partials/articles.html b/templates/partials/articles.html index 5c13bf1..a60d4e8 100644 --- a/templates/partials/articles.html +++ b/templates/partials/articles.html @@ -8,37 +8,28 @@
{%- for page in pages %} -
+
{%- if page.draft %} {{- macros_translate::translate(key="drafted", default="Drafted", language_strings=language_strings) -}} - {%- endif -%} - {%- if page.extra.archive %} + {%- elif page.extra.archive %} {{- macros_translate::translate(key="archived", default="Archived", language_strings=language_strings) -}} - {%- endif %} - {%- if page.extra.featured %} + {%- elif page.extra.featured %} {{- macros_translate::translate(key="featured", default="Featured", language_strings=language_strings) -}} - {%- endif %} - {%- if page.extra.hot %} + {%- elif page.extra.hot %} {{- macros_translate::translate(key="hot", default="Hot", language_strings=language_strings) -}} - {%- endif %} - {%- if page.extra.poor %} + {%- elif page.extra.poor %} {{- macros_translate::translate(key="poor", default="Poor", language_strings=language_strings) -}}