From ad4cd1e37b042e1b3e9a4c1ad7a7e2cd67e7353e Mon Sep 17 00:00:00 2001 From: Wagner Trezub Date: Tue, 31 Oct 2023 12:29:23 +0100 Subject: [PATCH 1/5] fix: source added and category deleted for rss single card --- .../Blocks/RssBlock/CardWithImageRssTemplate.jsx | 6 ++---- .../Blocks/RssBlock/CardWithoutImageRssTemplate.jsx | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx index 3dc1c75e4..a3ccc950c 100644 --- a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx @@ -70,11 +70,9 @@ const CardWithImageRssTemplate = ({ )}
- {item?.categories?.length > 0 && item.categories[0]._ && ( + {item?.source?.length > 0 && ( <> - - {item.categories[0]._} - + {item.source} )} diff --git a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx index 87e992f9a..c238d6efe 100644 --- a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx @@ -56,11 +56,9 @@ const CardWithoutImageRssTemplate = ({
- {item?.categories?.length > 0 && item.categories[0]._ && ( + {item?.source?.length > 0 && ( <> - - {item.categories[0]._} - + {item.source} )} From 1823f28cd64d7aacb0a2577043e12b6cfe2011c0 Mon Sep 17 00:00:00 2001 From: Wagner Trezub Date: Tue, 31 Oct 2023 14:26:08 +0100 Subject: [PATCH 2/5] fix: category pushed back and created a new content for source --- .../Blocks/RssBlock/CardWithImageRssTemplate.jsx | 8 ++++++++ .../Blocks/RssBlock/CardWithoutImageRssTemplate.jsx | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx index a3ccc950c..ddc4504fd 100644 --- a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx @@ -76,6 +76,14 @@ const CardWithImageRssTemplate = ({ )} + {item?.categories?.length > 0 && item.categories[0]._ && ( + <> + + {item.categories[0]._} + + + + )} {getViewDate(item.pubDate || item.date, intl.locale)} {' '} diff --git a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx index c238d6efe..a0adeabe2 100644 --- a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx @@ -62,6 +62,14 @@ const CardWithoutImageRssTemplate = ({ )} + {item?.categories?.length > 0 && item.categories[0]._ && ( + <> + + {item.categories[0]._} + + + + )} {(item.pubDate || item.date) && ( {getViewDate(item.pubDate || item.date, intl.locale)} From f55f0cdc6abe7c16eba75b87c6acc9cce57d3e78 Mon Sep 17 00:00:00 2001 From: Wagner Trezub Date: Thu, 2 Nov 2023 10:27:38 +0100 Subject: [PATCH 3/5] fix: source moved after title --- .../RssBlock/CardWithoutImageRssTemplate.jsx | 11 +++++----- src/theme/ItaliaTheme/Blocks/_rssBlock.scss | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx index a0adeabe2..65edf12c7 100644 --- a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx @@ -56,12 +56,6 @@ const CardWithoutImageRssTemplate = ({
- {item?.source?.length > 0 && ( - <> - {item.source} - - - )} {item?.categories?.length > 0 && item.categories[0]._ && ( <> @@ -77,6 +71,11 @@ const CardWithoutImageRssTemplate = ({ )}
{item.title} +
+ {item?.source?.length > 0 && ( + {item.source} + )} +
{item.contentSnippet} diff --git a/src/theme/ItaliaTheme/Blocks/_rssBlock.scss b/src/theme/ItaliaTheme/Blocks/_rssBlock.scss index b765aee26..bad6c0078 100644 --- a/src/theme/ItaliaTheme/Blocks/_rssBlock.scss +++ b/src/theme/ItaliaTheme/Blocks/_rssBlock.scss @@ -1,3 +1,24 @@ +.rssBlock { + .card { + .card-body { + .source-title { + font-size: $card-category-size; + text-transform: uppercase; + color: $card-p-color; + margin-bottom: $card-category-m-bottom; + .source { + font-size: $card-category-size; + text-transform: uppercase; + color: $card-p-color; + margin-bottom: $card-category-m-bottom; + font-weight: bold; + letter-spacing: $card-category-l-spacing; + } + } + } + } +} + #text-body { .rssBlock { .row > * { From 5b612ed46c5a81dec3403a17cef32b0cdab53e2d Mon Sep 17 00:00:00 2001 From: Wagner Trezub Date: Thu, 2 Nov 2023 10:28:59 +0100 Subject: [PATCH 4/5] fix: same fix for cards with image --- .../Blocks/RssBlock/CardWithImageRssTemplate.jsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx index ddc4504fd..dfeb25a6b 100644 --- a/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx @@ -70,12 +70,6 @@ const CardWithImageRssTemplate = ({ )}
- {item?.source?.length > 0 && ( - <> - {item.source} - - - )} {item?.categories?.length > 0 && item.categories[0]._ && ( <> @@ -89,6 +83,11 @@ const CardWithImageRssTemplate = ({ {' '}
{item.title} +
+ {item?.source?.length > 0 && ( + {item.source} + )} +
Date: Thu, 2 Nov 2023 10:36:26 +0100 Subject: [PATCH 5/5] fix: cleaned css file --- src/theme/ItaliaTheme/Blocks/_rssBlock.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/theme/ItaliaTheme/Blocks/_rssBlock.scss b/src/theme/ItaliaTheme/Blocks/_rssBlock.scss index bad6c0078..4e2fe4ab5 100644 --- a/src/theme/ItaliaTheme/Blocks/_rssBlock.scss +++ b/src/theme/ItaliaTheme/Blocks/_rssBlock.scss @@ -7,10 +7,6 @@ color: $card-p-color; margin-bottom: $card-category-m-bottom; .source { - font-size: $card-category-size; - text-transform: uppercase; - color: $card-p-color; - margin-bottom: $card-category-m-bottom; font-weight: bold; letter-spacing: $card-category-l-spacing; }