From 3a262057871842b5d8edef90422f237ca768b546 Mon Sep 17 00:00:00 2001
From: "pmoreno.rodriguez"
<60596353+pmoreno-rodriguez@users.noreply.github.com>
Date: Wed, 8 Feb 2023 15:57:40 +0100
Subject: [PATCH] Fixed image featured classes in twig templates
---
templates/blog.html.twig | 5 ++++-
templates/default.html.twig | 6 ++++--
templates/modular.html.twig | 4 +++-
templates/partials/blog_item.html.twig | 14 ++++++++------
templates/partials/social.html.twig | 2 +-
templates/portfolio.html.twig | 4 +++-
6 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/templates/blog.html.twig b/templates/blog.html.twig
index 839c274..eae3e74 100755
--- a/templates/blog.html.twig
+++ b/templates/blog.html.twig
@@ -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 }}
+
+ {{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
+
{% endif %}
{{ page.content|raw }}
diff --git a/templates/default.html.twig b/templates/default.html.twig
index 7cbd75e..9c7d2e8 100755
--- a/templates/default.html.twig
+++ b/templates/default.html.twig
@@ -18,9 +18,11 @@
{% endif %}
-
+
{% if image %}
- {{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
+
+ {{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
+
{% endif %}
{{ page.content|raw }}
diff --git a/templates/modular.html.twig b/templates/modular.html.twig
index c639e0c..6a99e5a 100755
--- a/templates/modular.html.twig
+++ b/templates/modular.html.twig
@@ -27,7 +27,9 @@
{% if image %}
- {{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }}
+
+ {{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }}
+
{% endif %}
{{ page.content|raw}}
diff --git a/templates/partials/blog_item.html.twig b/templates/partials/blog_item.html.twig
index d6ea18c..6bcf492 100644
--- a/templates/partials/blog_item.html.twig
+++ b/templates/partials/blog_item.html.twig
@@ -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 %}