feat: with extra head instead
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
@@ -1,44 +1,50 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="canonical" href="{{ section.permalink | safe }}">
|
||||
<meta property="og:url" content="{{ section.permalink | safe }}" />
|
||||
{% endblock extra_head %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container mx-auto px-4 max-w-3xl py-8 space-y-4">
|
||||
|
||||
{% if section.ancestors | length > 0 %}
|
||||
|
||||
{% if section.ancestors | length > 0 %}
|
||||
{{ prev_macros::section_back_link(section=section) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if section.extra.section_path -%}
|
||||
{% if section.extra.section_path -%}
|
||||
{% set section = get_section(path=section.extra.section_path) %}
|
||||
{% endif -%}
|
||||
<h1 class="title text-peach text-3xl">
|
||||
{{ section.title }}
|
||||
</h1>
|
||||
|
||||
<main>
|
||||
{%- if paginator %}
|
||||
{%- set show_pages = paginator.pages -%}
|
||||
{% else %}
|
||||
{%- set show_pages = section.pages -%}
|
||||
{% endif -%}
|
||||
<h1 class="title text-peach text-3xl">
|
||||
{{ section.title }}
|
||||
</h1>
|
||||
|
||||
{{ post_macros::list_posts(pages=show_pages) }}
|
||||
</main>
|
||||
{% if paginator %}
|
||||
<ul class="pagination">
|
||||
<main>
|
||||
{%- if paginator %}
|
||||
{%- set show_pages = paginator.pages -%}
|
||||
{% else %}
|
||||
{%- set show_pages = section.pages -%}
|
||||
{% endif -%}
|
||||
|
||||
{{ post_macros::list_posts(pages=show_pages) }}
|
||||
</main>
|
||||
{% if paginator %}
|
||||
<ul class="pagination">
|
||||
{% if paginator.previous %}
|
||||
<span class="page-item page-prev">
|
||||
<a href={{ paginator.previous }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a>
|
||||
</span>
|
||||
<span class="page-item page-prev">
|
||||
<a href={{ paginator.previous | safe }} class="page-link" aria-label="Previous"><span aria-hidden="true">←
|
||||
Prev</span></a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if paginator.next %}
|
||||
<span class="page-item page-next">
|
||||
<a href={{ paginator.next }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
|
||||
</span>
|
||||
<span class="page-item page-next">
|
||||
<a href={{ paginator.next | safe }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user