Display multiple post authors of present, align tags to the right
This commit is contained in:
@ -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
|
||||
|
@ -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 = "تحذير"
|
||||
|
@ -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"
|
||||
|
@ -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 = "Внимание"
|
||||
|
@ -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 {
|
||||
|
@ -1,4 +0,0 @@
|
||||
.last-updated {
|
||||
display: block;
|
||||
margin: 1rem 0;
|
||||
}
|
@ -6,8 +6,8 @@
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
|
||||
&.inline {
|
||||
margin-inline-start: 0.25rem;
|
||||
&.end {
|
||||
float: inline-end;
|
||||
}
|
||||
|
||||
li {
|
||||
|
@ -21,7 +21,6 @@
|
||||
@use "hidden";
|
||||
@use "icon";
|
||||
@use "input";
|
||||
@use "last-updated";
|
||||
@use "media";
|
||||
@use "nav";
|
||||
@use "not-found";
|
||||
|
@ -12,21 +12,9 @@
|
||||
|
||||
<h1 {% if page.extra.banner %}class="banner-margin"{%- endif -%}>{{ page.title }}</h1>
|
||||
|
||||
{%- if page.date -%}
|
||||
<small>
|
||||
<time datetime="{{ page.date | date(format=' %+') }}" pubdate>
|
||||
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
||||
</time>
|
||||
{%- if page.authors %}
|
||||
<span>•</span>
|
||||
<span>
|
||||
{{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}:
|
||||
{{ page.authors[0] }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
{%- if page.taxonomies -%}
|
||||
{%- for name, taxon in page.taxonomies -%}
|
||||
<ul class="tags inline">
|
||||
<ul class="tags end">
|
||||
{%- for item in taxon -%}
|
||||
<li>
|
||||
<a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a>
|
||||
@ -35,15 +23,24 @@
|
||||
</ul>
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
</small>
|
||||
|
||||
{%- if page.date -%}
|
||||
<small>
|
||||
<time datetime="{{ page.date | date(format=' %+') }}" pubdate>
|
||||
{{- macros_translate::translate(key="published", default="Published on", language_strings=language_strings) }}
|
||||
{{ page.date | date(format=date_format, locale=date_locale) -}}
|
||||
</time>
|
||||
{%- if page.updated -%}
|
||||
<small class="last-updated">
|
||||
<span> • </span>
|
||||
<time datetime="{{ page.updated | date(format=' %+') }}" pubdate>
|
||||
{{- macros_translate::translate(key="updated", default="Last updated on", language_strings=language_strings) }}
|
||||
{{- macros_translate::translate(key="updated", default="Updated on", language_strings=language_strings) }}
|
||||
{{ page.updated | date(format=date_format, locale=date_locale) -}}
|
||||
</time>
|
||||
</small>
|
||||
{%- endif -%}
|
||||
{%- if page.authors -%}
|
||||
<span> • {% include "partials/authors.html" -%}</span>
|
||||
{%- endif -%}
|
||||
</small>
|
||||
{%- endif -%}
|
||||
|
||||
{%- include "partials/statements.html" -%}
|
||||
|
@ -43,26 +43,25 @@
|
||||
{%- if page.description %}
|
||||
{{ page.description | markdown | safe }}
|
||||
{%- endif %}
|
||||
{%- if page.date %}
|
||||
{%- if page.date -%}
|
||||
<small>
|
||||
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
|
||||
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
||||
</time>
|
||||
{%- if page.authors %}
|
||||
<span>•</span>
|
||||
<span>{{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}: {{ page.authors[0] }}</span>
|
||||
{%- endif %}
|
||||
{%- if page.taxonomies %}
|
||||
{%- if page.authors -%}
|
||||
<span> • {% include "partials/authors.html" -%}</span>
|
||||
{%- endif -%}
|
||||
{%- if page.taxonomies -%}
|
||||
{%- for name, taxon in page.taxonomies %}
|
||||
<ul class="tags">
|
||||
{%-for item in taxon %}
|
||||
<ul class="tags end">
|
||||
{%-for item in taxon -%}
|
||||
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
{%- endfor %}
|
||||
{%- endfor -%}
|
||||
{%- endif %}
|
||||
</small>
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
</article>
|
||||
<hr>
|
||||
{%- endfor %}
|
||||
|
14
templates/partials/authors.html
Normal file
14
templates/partials/authors.html
Normal file
@ -0,0 +1,14 @@
|
||||
{%- set author_list = page.authors -%}
|
||||
{%- if author_list | length == 1 -%}
|
||||
{%- set author_string = author_list.0 -%}
|
||||
{%- else -%}
|
||||
{%- set last_author = author_list | last -%}
|
||||
{%- set other_authors = author_list | slice(end=-1) -%}
|
||||
{%- set author_separator = macros_translate::translate(key="author_separator", default=", ", language_strings=language_strings) -%}
|
||||
{%- set conjunction = macros_translate::translate(key="author_conjunction", default=" and ", language_strings=language_strings) -%}
|
||||
{%- set author_string = other_authors | join(sep=author_separator) -%}
|
||||
{%- set author_string = author_string ~ conjunction ~ last_author -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%}
|
||||
{{- by_author | replace(from="$AUTHOR", to=author_string) -}}
|
@ -42,26 +42,25 @@
|
||||
{%- if page.description %}
|
||||
{{ page.description | markdown | safe }}
|
||||
{%- endif %}
|
||||
{%- if page.date %}
|
||||
{%- if page.date -%}
|
||||
<small>
|
||||
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
|
||||
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
||||
</time>
|
||||
{%- if page.authors %}
|
||||
<span>•</span>
|
||||
<span>{{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}: {{ page.authors[0] }}</span>
|
||||
{%- endif %}
|
||||
{%- if page.taxonomies %}
|
||||
{%- for name, taxon in page.taxonomies %}
|
||||
<ul class="tags">
|
||||
{%-for item in taxon %}
|
||||
{%- if page.authors -%}
|
||||
<span> • {% include "partials/authors.html" -%}</span>
|
||||
{%- endif -%}
|
||||
{%- if page.taxonomies -%}
|
||||
{%- for name, taxon in page.taxonomies -%}
|
||||
<ul class="tags end">
|
||||
{%- for item in taxon -%}
|
||||
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
|
||||
{%- endfor %}
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
</small>
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
</article>
|
||||
<hr>
|
||||
{%- endfor %}
|
||||
|
Reference in New Issue
Block a user