mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-07-03 00:28:55 +00:00
parent
714134f704
commit
7c8526864e
4 changed files with 91 additions and 85 deletions
|
@ -1,4 +1,4 @@
|
|||
{% extends 'partials/base.html.twig' %}
|
||||
{% embed 'partials/base.html.twig' %}
|
||||
|
||||
{% set collection = page.collection() %}
|
||||
{% set base_url = page.url %}
|
||||
|
@ -30,22 +30,20 @@
|
|||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
{#
|
||||
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
|
||||
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
|
||||
{% endif %}
|
||||
#}
|
||||
|
||||
{% for child in collection %}
|
||||
{% if child.header.hide is not defined or not child.header.hide %}
|
||||
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
|
||||
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %}
|
||||
{% endif %}
|
||||
|
||||
<section id="footer" class="align-center">
|
||||
{% include 'partials/footer.html.twig' %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'partials/sidebar_left.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
|
||||
|
||||
|
|
|
@ -1,20 +1,10 @@
|
|||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% if page.header.show_breadcrumbs is defined %}
|
||||
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
|
||||
{% else %}
|
||||
{% set show_breadcrumbs = true %}
|
||||
{% endif %}
|
||||
|
||||
{% block menu %}
|
||||
{% include 'partials/sidebar_right.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
<article class="post">
|
||||
<header>
|
||||
<div class="title">
|
||||
|
@ -23,11 +13,22 @@
|
|||
<p>{{ page.header.subtitle }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
{{ page.content|raw }}
|
||||
</article>
|
||||
|
||||
</header>
|
||||
{% if page.header.primaryImage %}
|
||||
{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
|
||||
{% else %}
|
||||
{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
|
||||
{% endif %}
|
||||
{{ page.content|raw}}
|
||||
|
||||
</article>
|
||||
<section id="footer" class="align-center">
|
||||
{% block footer %}
|
||||
{% include 'partials/footer.html.twig' %}
|
||||
{% endblock %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{% extends 'partials/base.html.twig' %}
|
||||
{% embed 'partials/base.html.twig' %}
|
||||
{% set base_url = page.parent.url %}
|
||||
{% set feed_url = base_url %}
|
||||
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog]) %}
|
||||
|
||||
{% if page.header.show_breadcrumbs is defined %}
|
||||
{% set show_breadcrumbs = page.header.show_breadcrumbs %}
|
||||
{% else %}
|
||||
{% set show_breadcrumbs = true %}
|
||||
{% if base_url == '/' %}
|
||||
{% set base_url = '' %}
|
||||
{% endif %}
|
||||
|
||||
{% if base_url == base_url_relative %}
|
||||
{% set feed_url = base_url~'/'~page.parent.slug %}
|
||||
{% endif %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -11,6 +16,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
@ -21,3 +27,5 @@
|
|||
{% include 'partials/footer.html.twig' %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
{% elseif page.media.images %}
|
||||
<a href="{{ page.url }}" class="image featured">{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}</a>
|
||||
{% endif %}
|
||||
>>>>>>> parent of 9dc080b... Harmonize and modify twigs
|
||||
|
||||
{% if page.header.blog_hide_body is not defined or not page.header.blog_hide_body %}
|
||||
<div itemprop="articleBody">
|
||||
|
|
Loading…
Add table
Reference in a new issue