grav-theme-future2021/templates/modular.html.twig
2023-07-13 21:50:36 +02:00

45 lines
1 KiB
Twig
Executable file

{% extends 'partials/base.html.twig' %}
{# Commented code for future improvements in modular menu #}
{# {% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
{% macro pageLinkName(text) %}
{{ text|lower|replace({' ':'_'}) }}
{% endmacro %} #}
{% block menu %}
{% include 'partials/sidebar_right.html.twig' %}
{% endblock %}
{% block content %}
<article class="post">
<header>
<div class="title">
<h1>{{ title }}</h1>
{% if subtitle %}
<p>{{ subtitle }}</p>
{% endif %}
</div>
</header>
{% if show_image and image %}
<span class="image featured">
{{ image.cropZoom(img_width,img_height).loading('lazy').attribute('decoding','async').html(title, title)|raw }}
</span>
{% endif %}
{{ page.content|raw}}
{% for module in page.collection() %}
{{ module.content|raw }}
{% endfor %}
</article>
{% endblock %}
{% block sidebar %}
{% if show_sidebar == true %}
{% include 'partials/sidebar_left.html.twig' %}
{% endif %}
{% endblock %}