tabi/templates/serie.html
ZzMzaw 093b9140a5 feat(serie): add serie's posts list link to title
As a serie's content can be important in size, it can be better to directly jump to the list of articles in the serie.
2024-07-26 18:49:27 +02:00

73 lines
2.8 KiB
HTML

{% extends "base.html" %}
{% block main_content %}
{% if paginator %}
{{ throw (message="Pagination not supported for series: '" ~ section.relative_path ~ "'.") }}
{% endif %}
<main>
{%- if section.extra.header %}
{%- include "partials/home_banner.html" -%}
{% endif -%}
<article>
<div id="serie-title">
<span class="title-label">{{ macros_translate::translate(key="serie", default="SERIE", language_strings=language_strings) }}</span>
{%- set serie_go_to_posts = macros_translate::translate(key="serie_go_to_posts", default="Go to serie's posts", language_strings=language_strings) -%}
<a id="go-to-button" href="#posts-list" class="no-hover-padding" title="{{ serie_go_to_posts }}">
{{ serie_go_to_posts }}
</a>
{{ macros_page_header::page_header(title=section.title) }}
</div>
<section class="body">
{{ section.content | safe }}
</section>
</article>
<div id="posts-list">
<div class="serielist-title bottom-divider">
{{ macros_translate::translate(key="serie_posts", default="Serie's posts:", language_strings=language_strings) }}
</div>
<div class="serielist-container">
{% for post in section.pages | reverse %}
{% if loop.last %}
<section class="serielist-row">
{% else %}
<section class="serielist-row bottom-divider">
{% endif %}
<ul class="serielist-meta">
{{ loop.index }}
{% if post.draft %}
<li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li>
{% endif %}
</ul>
</section>
{% if loop.last %}
<section class="serielist-row">
{% else %}
<section class="serielist-row bottom-divider">
{% endif %}
<div class="serielist-content">
<h2 class="serielist-title">
<a href="{{ post.permalink }}">{{ post.title }}</a>
</h2>
<div class="description">
{% if post.description %}
<p>{{ post.description }}</p>
{% elif post.summary %}
<p>{{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…</p>
{% endif %}
</div>
</div>
</section>
{% endfor %}
</div>
</div>
</main>
{%- include "partials/extra_features.html" -%}
{% endblock main_content %}