mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
💄 style(html): enhance author name styling
- wrap author names in span with class "p-author" for consistent styling - modify author separator and conjunction for improved readability
This commit is contained in:
parent
df91442a2b
commit
74af4512e2
1 changed files with 3 additions and 1 deletions
|
@ -123,14 +123,16 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if author_list | length == 1 -%}
|
{%- if author_list | length == 1 -%}
|
||||||
{%- set author_string = author_list.0 -%}
|
{%- set author_string = '<span class="p-author">' ~ author_list.0 ~ '</span>' -%}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{%- set last_author = author_list | last -%}
|
{%- set last_author = author_list | last -%}
|
||||||
{%- set other_authors = author_list | slice(end=-1) -%}
|
{%- set other_authors = author_list | slice(end=-1) -%}
|
||||||
{%- set author_separator = macros_translate::translate(key="author_separator", default=", ", language_strings=language_strings) -%}
|
{%- 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 conjunction = macros_translate::translate(key="author_conjunction", default=" and ", language_strings=language_strings) -%}
|
||||||
|
{%- set conjunction = '<span>' ~ conjunction ~ '<span class="p-author">' -%}
|
||||||
{%- set author_string = other_authors | join(sep=author_separator) -%}
|
{%- set author_string = other_authors | join(sep=author_separator) -%}
|
||||||
{%- set author_string = author_string ~ conjunction ~ last_author -%}
|
{%- set author_string = author_string ~ conjunction ~ last_author -%}
|
||||||
|
{%- set author_string = '<span class="p-author">' ~ author_string ~ conjunction ~ last_author ~ '</span>' -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%}
|
{%- set by_author = macros_translate::translate(key="by_author", default="By $AUTHOR", language_strings=language_strings) -%}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue