mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
Fixed image featured classes in twig templates
This commit is contained in:
parent
f7062ec212
commit
3a26205787
6 changed files with 23 additions and 12 deletions
|
@ -44,8 +44,11 @@
|
|||
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
|
||||
{% include 'partials/breadcrumbs.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% if image %}
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
|
||||
<span class="image featured">
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{{ page.content|raw }}
|
||||
|
|
|
@ -18,9 +18,11 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
{% if image %}
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
|
||||
<span class="image featured">
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{{ page.content|raw }}
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
</header>
|
||||
|
||||
{% if image %}
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
|
||||
<span class="image featured">
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{{ page.content|raw}}
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
{% else %}
|
||||
{% set author = page.taxonomy.author[0] %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% set avatar = page.media[page.header.avatarImage].url|e %}
|
||||
{% set image = page.media[page.header.primaryImage] ?: page.media.images|first %}
|
||||
{% set title = page.title|raw %}
|
||||
|
||||
<header>
|
||||
<div class="title">
|
||||
|
@ -44,11 +46,11 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{% if page.header.primaryImage %}
|
||||
<a href="{{ page.url }}">{{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}</a>
|
||||
{% elseif page.media.images %}
|
||||
<a href="{{ page.url }}">{{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }}</a>
|
||||
{% endif %}
|
||||
{% if image %}
|
||||
<span class="image featured">
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<div itemprop="articleBody">
|
||||
{% if page.header.continue_link is sameas(false) %}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{% for item in theme_config.social %}
|
||||
<li><a href="{{ item.url }}" class="icon brands {{item.icon}}"><span class="label">{{item.name}}</span></a></li>
|
||||
<li><a href="{{ item.url }}" class="icon brands {{item.icon}}" aria-label="{{item.name}}"><span class="label">{{item.name}}</span></a></li>
|
||||
{% endfor %}
|
|
@ -21,7 +21,9 @@
|
|||
</div>
|
||||
</header>
|
||||
{% if image %}
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
|
||||
<span class="image featured">
|
||||
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{{ page.content|raw}}
|
||||
|
|
Loading…
Add table
Reference in a new issue