Revert "Harmonize and modify twigs"

This reverts commit 9dc080bed8.
This commit is contained in:
pmoreno.rodriguez 2023-01-03 20:17:24 +01:00
parent 714134f704
commit 7c8526864e
4 changed files with 91 additions and 85 deletions

View file

@ -1,51 +1,49 @@
{% extends 'partials/base.html.twig' %} {% embed 'partials/base.html.twig' %}
{% set collection = page.collection() %} {% set collection = page.collection() %}
{% set base_url = page.url %} {% set base_url = page.url %}
{% set feed_url = base_url %} {% set feed_url = base_url %}
{% if page.header.show_breadcrumbs is defined %} {% if page.header.show_breadcrumbs is defined %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %} {% set show_breadcrumbs = page.header.show_breadcrumbs %}
{% else %} {% else %}
{% set show_breadcrumbs = true %} {% set show_breadcrumbs = true %}
{% endif %} {% endif %}
{% if page.header.show_pagination is defined %} {% if page.header.show_pagination is defined %}
{% set show_pagination = page.header.show_pagination %} {% set show_pagination = page.header.show_pagination %}
{% else %} {% else %}
{% set show_pagination = true %} {% set show_pagination = true %}
{% endif %} {% endif %}
{% if base_url == '/' %} {% if base_url == '/' %}
{% set base_url = '' %} {% set base_url = '' %}
{% endif %} {% endif %}
{% if base_url == base_url_relative %} {% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.slug %} {% set feed_url = base_url~'/'~page.slug %}
{% endif %} {% endif %}
{% block menu %} {% block menu %}
{% include 'partials/sidebar_right.html.twig' %} {% include 'partials/sidebar_right.html.twig' %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %} {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %} {% 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 %} {% endif %}
{% endfor %}
{% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %} {% for child in collection %}
{% include 'partials/pagination.html.twig' with {base_url: page.url, pagination: collection.params.pagination} %} {% 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 %}
{% endblock %}
{% block sidebar %}
{% include 'partials/sidebar_left.html.twig' %}
{% endblock %}
{% endembed %}
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}

View file

@ -1,33 +1,34 @@
{% extends 'partials/base.html.twig' %} {% 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 %} {% block menu %}
{% include 'partials/sidebar_right.html.twig' %} {% include 'partials/sidebar_right.html.twig' %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %} <article class="post">
{% include 'partials/breadcrumbs.html.twig' %} <header>
{% endif %} <div class="title">
<h2>{{ page.header.title }}</h2>
{% if page.header.subtitle %}
<p>{{ page.header.subtitle }}</p>
{% endif %}
</div>
<article class="post"> </header>
<header> {% if page.header.primaryImage %}
<div class="title"> {{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
<h2>{{ page.header.title }}</h2> {% else %}
{% if page.header.subtitle %} {{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
<p>{{ page.header.subtitle }}</p> {% endif %}
{% endif %} {{ page.content|raw}}
</div>
</header> </article>
{{ page.content|raw }} <section id="footer" class="align-center">
</article> {% block footer %}
{% include 'partials/footer.html.twig' %}
<section id="footer" class="align-center"> {% endblock %}
{% include 'partials/footer.html.twig' %} </section>
</section>
{% endblock %} {% endblock %}

View file

@ -1,23 +1,31 @@
{% 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 %} {% if base_url == '/' %}
{% set show_breadcrumbs = page.header.show_breadcrumbs %} {% set base_url = '' %}
{% 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 %} {% endif %}
{% include 'partials/blog_item.html.twig' with {'truncate':false} %} {% if base_url == base_url_relative %}
{% set feed_url = base_url~'/'~page.parent.slug %}
{% endif %}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
<section id="footer" class="align-center"> {% block content %}
{% include 'partials/footer.html.twig' %}
</section> {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% endblock %} {% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% include 'partials/blog_item.html.twig' with {'truncate':false} %}
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}
{% endembed %}

View file

@ -37,7 +37,6 @@
{% elseif page.media.images %} {% 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> <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 %} {% endif %}
>>>>>>> parent of 9dc080b... Harmonize and modify twigs
{% if page.header.blog_hide_body is not defined or not page.header.blog_hide_body %} {% if page.header.blog_hide_body is not defined or not page.header.blog_hide_body %}
<div itemprop="articleBody"> <div itemprop="articleBody">