From a6e0471fb2cc82bdd8ad5f89ed34f78a0205d1a5 Mon Sep 17 00:00:00 2001 From: daudix Date: Sat, 20 Jul 2024 02:00:53 +0300 Subject: [PATCH] Display multiple post authors of present, align tags to the right --- content/blog/the-quill-of-duck/index.md | 2 +- i18n/ar.toml | 3 +- i18n/en.toml | 3 +- i18n/ru.toml | 3 +- sass/_article-list.scss | 5 --- sass/_last-updated.scss | 4 --- sass/_tags.scss | 4 +-- sass/style.scss | 1 - templates/article.html | 47 ++++++++++++------------- templates/article_list.html | 19 +++++----- templates/partials/authors.html | 14 ++++++++ templates/taxonomy_single.html | 25 +++++++------ 12 files changed, 66 insertions(+), 64 deletions(-) delete mode 100644 sass/_last-updated.scss create mode 100644 templates/partials/authors.html diff --git a/content/blog/the-quill-of-duck/index.md b/content/blog/the-quill-of-duck/index.md index 76f1052..0890a78 100644 --- a/content/blog/the-quill-of-duck/index.md +++ b/content/blog/the-quill-of-duck/index.md @@ -1,5 +1,5 @@ +++ -authors = ["Duck Quack"] +authors = ["Duck Quack", "Scrooge McDuck"] title = "The Quill of Duck" description = "This is a Duckquill post example, this post has nothing but a bunch of text and random formatting, acting like a demo." date = 2023-08-31 diff --git a/i18n/ar.toml b/i18n/ar.toml index 267fede..d69cb07 100644 --- a/i18n/ar.toml +++ b/i18n/ar.toml @@ -45,6 +45,7 @@ posts_with_tag = "المنشورات ذات العلامة" powered_by = "مدعوم من" powered_by_and = "و" previous = "السابق" +published = "منشور" reload = "إعادة التحميل" search = "بحث" search_for = "ابحث عن" @@ -55,7 +56,7 @@ tags = "العلامات" tags_title = "العلامات" tip = "نصيحة" trigger_warning = "تحذير الزناد" -updated = "آخر تحديث في" +updated = "تحديث" view_comment = "عرض التعليق على" view_profile = "عرض الملف الشخصي على" warning = "تحذير" diff --git a/i18n/en.toml b/i18n/en.toml index 7a390f7..747aff3 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -49,6 +49,7 @@ posts_with_tag = "Posts with tag" powered_by = "Powered by" powered_by_and = "and" previous = "Previous" +published = "Published on" reload = "Reload" search = "Search" search_for = "Search for" @@ -59,7 +60,7 @@ tags = "tags" tags_title = "Tags" tip = "Tip" trigger_warning = "Trigger Warning" -updated = "Last updated on" +updated = "Updated on" view_comment = "View comment at" view_profile = "View profile at" warning = "Warning" diff --git a/i18n/ru.toml b/i18n/ru.toml index 5b5c498..7668d30 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -55,6 +55,7 @@ posts_with_tag = "Посты с тегом" powered_by = "Работает на базе" powered_by_and = "и" previous = "Предыдущий" +published = "Опубликовано" reload = "Перезагрузить" search = "Поиск" search_for = "Искать" @@ -65,7 +66,7 @@ tags = "$NUMBER тегов" tags_title = "Теги" tip = "Совет" trigger_warning = "Предупреждение о Тревоге" -updated = "Последний раз обновлено" +updated = "Обновлено" view_comment = "Показать комментарий на" view_profile = "Показать профиль на" warning = "Внимание" diff --git a/sass/_article-list.scss b/sass/_article-list.scss index c1c2ff4..d4d02ea 100644 --- a/sass/_article-list.scss +++ b/sass/_article-list.scss @@ -2,7 +2,6 @@ margin-top: 2rem; article { - &.draft, &.archive, &.featured { @@ -178,10 +177,6 @@ background-color: var(--yellow-fg); } } - - .tags { - float: inline-end; - } } hr:last-of-type { diff --git a/sass/_last-updated.scss b/sass/_last-updated.scss deleted file mode 100644 index 636982e..0000000 --- a/sass/_last-updated.scss +++ /dev/null @@ -1,4 +0,0 @@ -.last-updated { - display: block; - margin: 1rem 0; -} diff --git a/sass/_tags.scss b/sass/_tags.scss index f2c20b5..edc39d7 100644 --- a/sass/_tags.scss +++ b/sass/_tags.scss @@ -6,8 +6,8 @@ padding: 0; list-style: none; - &.inline { - margin-inline-start: 0.25rem; + &.end { + float: inline-end; } li { diff --git a/sass/style.scss b/sass/style.scss index d0904ca..9eadc30 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -21,7 +21,6 @@ @use "hidden"; @use "icon"; @use "input"; -@use "last-updated"; @use "media"; @use "nav"; @use "not-found"; diff --git a/templates/article.html b/templates/article.html index eaeebbb..f741814 100644 --- a/templates/article.html +++ b/templates/article.html @@ -12,38 +12,35 @@

{{ page.title }}

+ {%- if page.taxonomies -%} + {%- for name, taxon in page.taxonomies -%} + + {%- endfor -%} + {%- endif -%} + {%- if page.date -%} - {%- if page.authors %} - - - {{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}: - {{ page.authors[0] }} - - {%- endif -%} - {%- if page.taxonomies -%} - {%- for name, taxon in page.taxonomies -%} - - {%- endfor -%} - {%- endif -%} - - {%- if page.updated -%} - + {%- if page.updated -%} + - - {%- endif -%} + {%- endif -%} + {%- if page.authors -%} + • {% include "partials/authors.html" -%} + {%- endif -%} + {%- endif -%} {%- include "partials/statements.html" -%} diff --git a/templates/article_list.html b/templates/article_list.html index dd8312d..291e23b 100644 --- a/templates/article_list.html +++ b/templates/article_list.html @@ -43,26 +43,25 @@ {%- if page.description %} {{ page.description | markdown | safe }} {%- endif %} - {%- if page.date %} + {%- if page.date -%} - {%- if page.authors %} - - {{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}: {{ page.authors[0] }} - {%- endif %} - {%- if page.taxonomies %} + {%- if page.authors -%} + • {% include "partials/authors.html" -%} + {%- endif -%} + {%- if page.taxonomies -%} {%- for name, taxon in page.taxonomies %} -