Display multiple post authors of present, align tags to the right
This commit is contained in:
@ -12,38 +12,35 @@
|
||||
|
||||
<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 -%}
|
||||
<small>
|
||||
<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>
|
||||
{%- 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">
|
||||
{%- 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">
|
||||
{%- if page.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 -%}
|
||||
{%- 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