grav-theme-future2021/templates/default.html.twig
pmoreno.rodriguez 08e1b28e46
Improved the definition of variables
Improved the definition of title, subtitle and image variables
2023-02-03 22:30:08 +01:00

33 lines
797 B
Twig

{% extends 'partials/base.html.twig' %}
{% set image = page.media[page.header.primaryImage] ?: page.media.images|first %}
{% set title = page.title|raw %}
{% set subtitle = page.header.subtitle|raw %}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% block content %}
<article class="post">
<header>
<div class="title">
<h2>{{ title }}</h2>
{% if subtitle %}
<p>{{ subtitle }}</p>
{% endif %}
</div>
</header>
{% if image %}
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
{% endif %}
{{ page.content|raw }}
</article>
<section id="footer" class="align-center">
{% include 'partials/footer.html.twig' %}
</section>
{% endblock %}