From bd79a3b0a77117ec06adcd94aa448130846ee2ea Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Wed, 8 Nov 2023 20:17:42 +0100 Subject: [PATCH] fix: review giulia --- .../Blocks/Listing/CardWithSlideUpTextTemplate.jsx | 2 +- .../Blocks/Listing/CompleteBlockLinksTemplate.jsx | 4 ++-- .../ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx | 1 - .../ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx | 5 ++++- src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx | 2 +- .../ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx index f933d2203..8af6e6162 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx @@ -53,7 +53,7 @@ const CardWithSlideUpTextTemplate = (props) => {
{items.map((item, index) => { - const image = getListingImageBackground(item, 'teaser'); + const image = getListingImageBackground(item, 'large'); const category = getCategory(item, show_type, show_section, props); const date = hide_dates ? null diff --git a/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx index d0ca7d519..0ee8281e5 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx @@ -53,8 +53,8 @@ const CompleteBlockLinksTemplate = ({ )} - {items.map((item, index) => { - const image = ListingImage({ item, className: '' }); + {items.map((item) => { + const image = ListingImage({ item, className: '', sizes: '60px' }); return ( diff --git a/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx index f2182a29a..071351429 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx @@ -58,7 +58,6 @@ const GridGalleryTemplate = ({ {items.map((item, index) => { let image = ListingImage({ item, - useOriginal: false, className: '', }); diff --git a/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx index 60f4edfa9..408ab9182 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx @@ -86,7 +86,10 @@ const InEvidenceTemplate = (props) => { const listingText = show_description ? ( ) : null; - const image = ListingImage({ item }); + const image = ListingImage({ + item, + sizes: '(max-width:320px) 200px, 300px', + }); const category = getCategory(item, show_type, show_section, props); const topics = show_topics ? item.tassonomia_argomenti : null; diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index 31d5a8731..c753c6164 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -353,7 +353,7 @@ const SliderTemplate = ({ const image = ListingImage({ item, loading: index === 0 ? 'eager' : 'lazy', - maxSize: 1600, + sizes: `max-width(980px) 600px, ${1200 / nSlidesToShow}px`, critical: true, }); return ( diff --git a/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx index 07c5ab9d2..646d03cc6 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx @@ -38,7 +38,7 @@ const SmallBlockLinksTemplate = ({ )} {items.map((item, index) => { - const image = ListingImage({ item, maxSize: 200, style: {} }); + const image = ListingImage({ item, sizes: '200px', style: {} }); return (