mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
Improved the definition of variables.
Improved the definition of title, subtitle and image variables.
This commit is contained in:
parent
17c977eeb9
commit
7bcd5189b0
1 changed files with 8 additions and 6 deletions
|
@ -1,5 +1,7 @@
|
|||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set image = page.media[page.header.primaryImage] %}
|
||||
{% set title = page.title|raw %}
|
||||
{% set subtitle = page.header.subtitle|raw %}
|
||||
{% set columns = page.header.layout == 'standard' ? 'col-4 col-6-medium col-12-small' : 'col-6 col-12-small' %}
|
||||
|
||||
{% block menu %}
|
||||
|
@ -11,14 +13,14 @@
|
|||
<article class="post">
|
||||
<header>
|
||||
<div class="title">
|
||||
<h2>{{ page.header.title }}</h2>
|
||||
{% if page.header.subtitle %}
|
||||
<p>{{ page.header.subtitle }}</p>
|
||||
<h2>{{ title }}</h2>
|
||||
{% if subtitle %}
|
||||
<p>{{ subtitle }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
{% if page.header.primaryImage %}
|
||||
{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}
|
||||
{% if image %}
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
|
||||
{% endif %}
|
||||
|
||||
{{ page.content|raw}}
|
||||
|
|
Loading…
Add table
Reference in a new issue