neues theme: add blueprints.yaml

This commit is contained in:
teldra 2023-01-12 02:07:03 +01:00
parent af4fb5468f
commit 2826268b44
1 changed files with 17 additions and 5 deletions

View File

@ -51,18 +51,30 @@
{% if not (grav.uri.param('chromeless') or grav.uri.param('embedded') or grav.uri.param('standalone')) and not(theme_var('chromeless.enabled')) and not (grav.uri.param('summaryonly') or grav.uri.param('onlysummary')) %}
{% set currentPage = page %}
{% set allPages = pages.children %}
{% set allPages = allPages|sort(date, 'desc') %}
{% set currentPageIndex = allPages.index(currentPage) %}
{% set allPages = [] %}
{% set currentPageIndex = 0 %}
{% for child in pages.children %}
{% set subPages = child.children %}
{% for subPage in subPages %}
{% set allPages = allPages|merge([subPage]) %}
{% endfor %}
{% endfor %}
{% set allPages = allPages|sort(modified, 'desc') %}
{% for i, page in allPages %}
{% if page.url == currentPage.url %}
{% set currentPageIndex = i %}
{% endif %}
{% endfor %}
<p class="prev-next text-center">
{% if currentPageIndex < allPages|length-1 %}
{% if currentPageIndex > 0 %}
<a class="btn" href="{{ allPages[currentPageIndex-1].url }}">
<i class="fa fa-angle-left"></i>
{{ 'THEME_QUARK.BLOG.ITEM.PREV_POST'|t }}
</a>
{% endif %}
{% if currentPageIndex > 0 %}
{% if currentPageIndex < allPages|length-1 %}
<a class="btn" href="{{ allPages[currentPageIndex+1].url }}">{{ 'THEME_QUARK.BLOG.ITEM.NEXT_POST'|t }}
<i class="fa fa-angle-right"></i>
</a>