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"
|
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."
|
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
|
date = 2023-08-31
|
||||||
|
@ -45,6 +45,7 @@ posts_with_tag = "المنشورات ذات العلامة"
|
|||||||
powered_by = "مدعوم من"
|
powered_by = "مدعوم من"
|
||||||
powered_by_and = "و"
|
powered_by_and = "و"
|
||||||
previous = "السابق"
|
previous = "السابق"
|
||||||
|
published = "منشور"
|
||||||
reload = "إعادة التحميل"
|
reload = "إعادة التحميل"
|
||||||
search = "بحث"
|
search = "بحث"
|
||||||
search_for = "ابحث عن"
|
search_for = "ابحث عن"
|
||||||
@ -55,7 +56,7 @@ tags = "العلامات"
|
|||||||
tags_title = "العلامات"
|
tags_title = "العلامات"
|
||||||
tip = "نصيحة"
|
tip = "نصيحة"
|
||||||
trigger_warning = "تحذير الزناد"
|
trigger_warning = "تحذير الزناد"
|
||||||
updated = "آخر تحديث في"
|
updated = "تحديث"
|
||||||
view_comment = "عرض التعليق على"
|
view_comment = "عرض التعليق على"
|
||||||
view_profile = "عرض الملف الشخصي على"
|
view_profile = "عرض الملف الشخصي على"
|
||||||
warning = "تحذير"
|
warning = "تحذير"
|
||||||
|
@ -49,6 +49,7 @@ posts_with_tag = "Posts with tag"
|
|||||||
powered_by = "Powered by"
|
powered_by = "Powered by"
|
||||||
powered_by_and = "and"
|
powered_by_and = "and"
|
||||||
previous = "Previous"
|
previous = "Previous"
|
||||||
|
published = "Published on"
|
||||||
reload = "Reload"
|
reload = "Reload"
|
||||||
search = "Search"
|
search = "Search"
|
||||||
search_for = "Search for"
|
search_for = "Search for"
|
||||||
@ -59,7 +60,7 @@ tags = "tags"
|
|||||||
tags_title = "Tags"
|
tags_title = "Tags"
|
||||||
tip = "Tip"
|
tip = "Tip"
|
||||||
trigger_warning = "Trigger Warning"
|
trigger_warning = "Trigger Warning"
|
||||||
updated = "Last updated on"
|
updated = "Updated on"
|
||||||
view_comment = "View comment at"
|
view_comment = "View comment at"
|
||||||
view_profile = "View profile at"
|
view_profile = "View profile at"
|
||||||
warning = "Warning"
|
warning = "Warning"
|
||||||
|
@ -55,6 +55,7 @@ posts_with_tag = "Посты с тегом"
|
|||||||
powered_by = "Работает на базе"
|
powered_by = "Работает на базе"
|
||||||
powered_by_and = "и"
|
powered_by_and = "и"
|
||||||
previous = "Предыдущий"
|
previous = "Предыдущий"
|
||||||
|
published = "Опубликовано"
|
||||||
reload = "Перезагрузить"
|
reload = "Перезагрузить"
|
||||||
search = "Поиск"
|
search = "Поиск"
|
||||||
search_for = "Искать"
|
search_for = "Искать"
|
||||||
@ -65,7 +66,7 @@ tags = "$NUMBER тегов"
|
|||||||
tags_title = "Теги"
|
tags_title = "Теги"
|
||||||
tip = "Совет"
|
tip = "Совет"
|
||||||
trigger_warning = "Предупреждение о Тревоге"
|
trigger_warning = "Предупреждение о Тревоге"
|
||||||
updated = "Последний раз обновлено"
|
updated = "Обновлено"
|
||||||
view_comment = "Показать комментарий на"
|
view_comment = "Показать комментарий на"
|
||||||
view_profile = "Показать профиль на"
|
view_profile = "Показать профиль на"
|
||||||
warning = "Внимание"
|
warning = "Внимание"
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
|
|
||||||
article {
|
article {
|
||||||
|
|
||||||
&.draft,
|
&.draft,
|
||||||
&.archive,
|
&.archive,
|
||||||
&.featured {
|
&.featured {
|
||||||
@ -178,10 +177,6 @@
|
|||||||
background-color: var(--yellow-fg);
|
background-color: var(--yellow-fg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
|
||||||
float: inline-end;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hr:last-of-type {
|
hr:last-of-type {
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
.last-updated {
|
|
||||||
display: block;
|
|
||||||
margin: 1rem 0;
|
|
||||||
}
|
|
@ -6,8 +6,8 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|
||||||
&.inline {
|
&.end {
|
||||||
margin-inline-start: 0.25rem;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
@use "hidden";
|
@use "hidden";
|
||||||
@use "icon";
|
@use "icon";
|
||||||
@use "input";
|
@use "input";
|
||||||
@use "last-updated";
|
|
||||||
@use "media";
|
@use "media";
|
||||||
@use "nav";
|
@use "nav";
|
||||||
@use "not-found";
|
@use "not-found";
|
||||||
|
@ -12,38 +12,35 @@
|
|||||||
|
|
||||||
<h1 {% if page.extra.banner %}class="banner-margin"{%- endif -%}>{{ page.title }}</h1>
|
<h1 {% if page.extra.banner %}class="banner-margin"{%- endif -%}>{{ page.title }}</h1>
|
||||||
|
|
||||||
|
{%- 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 -%}
|
||||||
|
</ul>
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if page.date -%}
|
{%- if page.date -%}
|
||||||
<small>
|
<small>
|
||||||
<time datetime="{{ page.date | date(format=' %+') }}" pubdate>
|
<time datetime="{{ page.date | date(format=' %+') }}" pubdate>
|
||||||
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
{{- macros_translate::translate(key="published", default="Published on", language_strings=language_strings) }}
|
||||||
|
{{ page.date | date(format=date_format, locale=date_locale) -}}
|
||||||
</time>
|
</time>
|
||||||
{%- if page.authors %}
|
{%- if page.updated -%}
|
||||||
<span>•</span>
|
<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">
|
|
||||||
{%- for item in taxon -%}
|
|
||||||
<li>
|
|
||||||
<a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a>
|
|
||||||
</li>
|
|
||||||
{%- endfor -%}
|
|
||||||
</ul>
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endif -%}
|
|
||||||
</small>
|
|
||||||
{%- if page.updated -%}
|
|
||||||
<small class="last-updated">
|
|
||||||
<time datetime="{{ page.updated | date(format=' %+') }}" pubdate>
|
<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) -}}
|
{{ page.updated | date(format=date_format, locale=date_locale) -}}
|
||||||
</time>
|
</time>
|
||||||
</small>
|
{%- endif -%}
|
||||||
{%- endif -%}
|
{%- if page.authors -%}
|
||||||
|
<span> • {% include "partials/authors.html" -%}</span>
|
||||||
|
{%- endif -%}
|
||||||
|
</small>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- include "partials/statements.html" -%}
|
{%- include "partials/statements.html" -%}
|
||||||
|
@ -43,26 +43,25 @@
|
|||||||
{%- if page.description %}
|
{%- if page.description %}
|
||||||
{{ page.description | markdown | safe }}
|
{{ page.description | markdown | safe }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if page.date %}
|
{%- if page.date -%}
|
||||||
<small>
|
<small>
|
||||||
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
|
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
|
||||||
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
||||||
</time>
|
</time>
|
||||||
{%- if page.authors %}
|
{%- if page.authors -%}
|
||||||
<span>•</span>
|
<span> • {% include "partials/authors.html" -%}</span>
|
||||||
<span>{{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}: {{ page.authors[0] }}</span>
|
{%- endif -%}
|
||||||
{%- endif %}
|
{%- if page.taxonomies -%}
|
||||||
{%- if page.taxonomies %}
|
|
||||||
{%- for name, taxon in page.taxonomies %}
|
{%- for name, taxon in page.taxonomies %}
|
||||||
<ul class="tags">
|
<ul class="tags end">
|
||||||
{%-for item in taxon %}
|
{%-for item in taxon -%}
|
||||||
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
|
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{%- endfor %}
|
{%- endfor -%}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</small>
|
</small>
|
||||||
{%- endif %}
|
{%- endif -%}
|
||||||
</article>
|
</article>
|
||||||
<hr>
|
<hr>
|
||||||
{%- endfor %}
|
{%- 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 %}
|
{%- if page.description %}
|
||||||
{{ page.description | markdown | safe }}
|
{{ page.description | markdown | safe }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if page.date %}
|
{%- if page.date -%}
|
||||||
<small>
|
<small>
|
||||||
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
|
<time datetime="{{ page.date | date(format='%+') }}" pubdate>
|
||||||
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
{{- page.date | date(format=date_format, locale=date_locale) -}}
|
||||||
</time>
|
</time>
|
||||||
{%- if page.authors %}
|
{%- if page.authors -%}
|
||||||
<span>•</span>
|
<span> • {% include "partials/authors.html" -%}</span>
|
||||||
<span>{{ macros_translate::translate(key="author", default="Author", language_strings=language_strings) }}: {{ page.authors[0] }}</span>
|
{%- endif -%}
|
||||||
{%- endif %}
|
{%- if page.taxonomies -%}
|
||||||
{%- if page.taxonomies %}
|
{%- for name, taxon in page.taxonomies -%}
|
||||||
{%- for name, taxon in page.taxonomies %}
|
<ul class="tags end">
|
||||||
<ul class="tags">
|
{%- for item in taxon -%}
|
||||||
{%-for item in taxon %}
|
|
||||||
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
|
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
|
||||||
{%- endfor %}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
{%- endfor %}
|
{%- endfor -%}
|
||||||
{%- endif %}
|
{%- endif -%}
|
||||||
</small>
|
</small>
|
||||||
{%- endif %}
|
{%- endif -%}
|
||||||
</article>
|
</article>
|
||||||
<hr>
|
<hr>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
Reference in New Issue
Block a user