mirror of
https://gitlab.com/veilid/veilid-dot-com.git
synced 2025-03-12 18:36:42 -04:00
36 lines
1.1 KiB
Twig
36 lines
1.1 KiB
Twig
{# all "showable pages by default #}
|
|
{% set pages = site.pages.showable %}
|
|
{# in case of a list page, take its sub pages #}
|
|
{% if page.pages is defined %}
|
|
{%- set pages = page.pages -%}
|
|
{% endif %}
|
|
{# in case of a paginated list page, take the paginator list pages #}
|
|
{% if page.paginator.pages is defined %}
|
|
{%- set pages = page.paginator.pages -%}
|
|
{% endif %}
|
|
|
|
{% extends ['page.html.twig', '_default/page.html.twig'] %}
|
|
|
|
{%- block content ~%}
|
|
<article>
|
|
<header>
|
|
<h2 id="page-title">{{ page.title }}</h2>
|
|
</header>
|
|
{%- if page.content ~%}
|
|
<section>
|
|
{{- page.content ~}}
|
|
</section>
|
|
{%- endif ~%}
|
|
{%- if pages|length ~%}
|
|
<h2 class="more-pages">More Pages</h2>
|
|
{% endif %}
|
|
{%- for p in pages ~%}
|
|
<article class="list-page-article">
|
|
<h3><a href="{{ url(p) }}">{{ p.title|e }}</a></h3>
|
|
</article>
|
|
{%- endfor ~%}
|
|
<footer>
|
|
{{- include('partials/paginator.html.twig', {page}, with_context = false) ~}}
|
|
</footer>
|
|
</article>
|
|
{%- endblock content ~%} |