mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
27 lines
777 B
Twig
Executable file
27 lines
777 B
Twig
Executable file
{# Set banner image #}
|
|
{% set image = page.media[page.header.image] ?: page.media.all|filter((v) => (v.type == 'image' or v.type == 'vector'))|first %}
|
|
|
|
{% set title = page.title|raw %}
|
|
{% set subtitle = page.header.subtitle|raw %}
|
|
|
|
<section id="banner">
|
|
<div class="content">
|
|
<header>
|
|
<h2>{{ title}}</h2>
|
|
{% if subtitle %}
|
|
<p>{{ subtitle }}</p>
|
|
{% endif %}
|
|
</header>
|
|
|
|
{{page.content|raw}}
|
|
|
|
<ul class="actions">
|
|
<li><a href="{{page.header.buttonurl}}" class="button">{{page.header.buttontext|raw}}</a></li>
|
|
</ul>
|
|
</div>
|
|
{% if image %}
|
|
<span class="image object fit">
|
|
{{image.loading('lazy').attribute('decoding','async').html(title,title)|raw}}
|
|
</span>
|
|
{% endif %}
|
|
</section>
|