-
+
+
Reading Time: ${articleInfo.readingTime} ${articleInfo.articleBlurb}
-
Read More
+
Read More
From d9aa7407db00930b6d5bfd4db7c3aed7ef633cc0 Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 11:15:29 -0500
Subject: [PATCH 30/39] code cleanup
---
.../blocks/article-teaser/article-teaser.css | 82 +++++++++----------
1 file changed, 37 insertions(+), 45 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.css b/cigaradvisor/blocks/article-teaser/article-teaser.css
index 90083691..49465bff 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.css
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.css
@@ -13,21 +13,21 @@
transition: visibility .2s linear;
}
-.article{
- position: relative;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- display: flex;
- flex-direction: column;
- align-items: stretch;
- justify-content: flex-end;
- text-align: center;
- overflow: hidden;
- flex: 1 1 100%;
- min-height: 20rem;
- padding-bottom: 20px;
+.article {
+ position: relative;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+ justify-content: flex-end;
+ text-align: center;
+ overflow: hidden;
+ flex: 1 1 100%;
+ min-height: 20rem;
+ padding-bottom: 20px;
}
@media screen and (min-width: 60em) {
@@ -49,7 +49,7 @@
-ms-flex-align: center;
align-items: center;
color: #fff;
- font-family: montserrat,sans-serif;
+ font-family: montserrat, sans-serif;
font-weight: 600;
background-color: #3c3a3b;
font-size: 12px;
@@ -102,13 +102,12 @@
.article.article-thumbnail .article-image {
display: flex;
- -ms-flex-align: start;
align-items: flex-start;
flex: 1 0 13rem;
width: 100%;
}
-.article.article-thumbnail .article-image > img {
+.article.article-thumbnail .article-image>img {
display: block;
width: 100%;
max-height: 321px;
@@ -118,15 +117,11 @@
content: '';
display: block;
flex: 1 0 72px;
- flex-grow: 1;
min-height: 72px;
- transition: flex-grow .55s ease-in-out,-webkit-flex-grow .55s ease-in-out;
transition: flex-grow .55s ease-in-out;
- transition: flex-grow .55s ease-in-out,-webkit-flex-grow .55s ease-in-out,-ms-flex-positive .55s ease-in-out;
}
.article.article-thumbnail:hover .article-content::before {
- -ms-flex-positive: 0;
flex-grow: 0;
}
@@ -139,14 +134,12 @@
flex: none;
display: flex;
flex-direction: column;
- -ms-flex-align: stretch;
align-items: stretch;
- -ms-flex-pack: end;
justify-content: flex-end;
text-align: center;
overflow: hidden;
- overflow-x: hidden;
- overflow-y: hidden;
+ overflow-x: hidden;
+ overflow-y: hidden;
}
.article.article-thumbnail .article-header {
@@ -154,7 +147,7 @@
width: 100%;
min-height: 7rem;
padding: 20px 30px;
- padding-top: 20px;
+ padding-top: 20px;
padding-top: 40px;
background-color: #eaeaea;
display: block;
@@ -162,7 +155,7 @@
@media screen and (min-width: 60em) {
.article.article-thumbnail .article-header {
- min-height:140px
+ min-height: 140px
}
}
@@ -179,19 +172,19 @@
color: inherit;
}
-.article-thumbnail .article-meta{
+.article-thumbnail .article-meta {
font-size: 0;
color: #141414;
}
-.article-thumbnail .article-meta a{
+.article-thumbnail .article-meta a {
position: relative;
z-index: 2;
text-decoration: none;
color: #141414;
}
-.article-thumbnail .article-meta > * {
+.article-thumbnail .article-meta>* {
display: inline-block;
font-family: montserrat, sans-serif;
font-weight: 600;
@@ -209,21 +202,18 @@
flex-grow: 0;
display: flex;
flex-direction: column;
- -ms-flex-align: stretch;
align-items: stretch;
- -ms-flex-pack: start;
justify-content: flex-start;
overflow: hidden;
padding: 0 30px;
font-family: "Open Sans", sans-serif;
background-color: #eaeaea;
- transition: flex-grow .55s ease-in-out,-webkit-flex-grow .55s ease-in-out;
+ transition: flex-grow .55s ease-in-out, -webkit-flex-grow .55s ease-in-out;
transition: flex-grow .55s ease-in-out;
- transition: flex-grow .55s ease-in-out,-webkit-flex-grow .55s ease-in-out,-ms-flex-positive .55s ease-in-out;
+ transition: flex-grow .55s ease-in-out, -webkit-flex-grow .55s ease-in-out, -ms-flex-positive .55s ease-in-out;
}
.article.article-thumbnail:hover .article-preview {
- -ms-flex-positive: 1;
flex-grow: 1;
}
@@ -241,23 +231,22 @@
.article.article-thumbnail .article-excerpt {
position: relative;
flex: 0 0 auto;
- flex-shrink: 0;
+ flex-shrink: 0;
overflow: hidden;
padding-bottom: 20px;
font-weight: 600;
opacity: 0;
- transition: opacity .55s ease-in-out,-webkit-flex-shrink .55s ease-in-out;
- transition: flex-shrink .55s ease-in-out,opacity .55s ease-in-out;
- transition: flex-shrink .55s ease-in-out,opacity .55s ease-in-out,-webkit-flex-shrink .55s ease-in-out,-ms-flex-negative .55s ease-in-out;
+ transition: opacity .55s ease-in-out, -webkit-flex-shrink .55s ease-in-out;
+ transition: flex-shrink .55s ease-in-out, opacity .55s ease-in-out;
+ transition: flex-shrink .55s ease-in-out, opacity .55s ease-in-out, -webkit-flex-shrink .55s ease-in-out, -ms-flex-negative .55s ease-in-out;
}
.article.article-thumbnail:hover .article-excerpt {
- -ms-flex-negative: 1;
flex-shrink: 1;
opacity: 1;
}
-.article-thumbnail .article-excerpt p{
+.article-thumbnail .article-excerpt p {
font-size: 1em;
font-family: inherit;
font-weight: inherit;
@@ -265,11 +254,15 @@
cursor: default;
}
-.article.article-thumbnail .article-excerpt p:last-child, .article.article-thumbnail .article-excerpt ul:last-child, .article.article-thumbnail .article-excerpt ol:last-child {
+.article.article-thumbnail .article-excerpt p:last-child,
+.article.article-thumbnail .article-excerpt ul:last-child,
+.article.article-thumbnail .article-excerpt ol:last-child {
margin-bottom: 0;
}
-.article.article-thumbnail .article-excerpt p:first-child, .article.article-thumbnail .article-excerpt ul:first-child, .article.article-thumbnail .article-excerpt ol:first-child {
+.article.article-thumbnail .article-excerpt p:first-child,
+.article.article-thumbnail .article-excerpt ul:first-child,
+.article.article-thumbnail .article-excerpt ol:first-child {
margin-top: 0;
}
@@ -305,7 +298,6 @@
font-weight: 700;
text-align: center;
display: flex;
- -ms-flex-pack: center;
justify-content: center;
color: #b19b5e;
font-size: 18px;
From a5adb7f999ba4d65dbca1bdc1b35c80c294c4739 Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 11:59:48 -0500
Subject: [PATCH 31/39] no message
---
.../blocks/article-teaser/article-teaser.css | 39 ++++++-------------
1 file changed, 11 insertions(+), 28 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.css b/cigaradvisor/blocks/article-teaser/article-teaser.css
index 49465bff..e3e569ef 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.css
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.css
@@ -36,7 +36,7 @@
}
}
-.tag {
+.article-category {
position: absolute;
top: 20px;
left: 0;
@@ -44,9 +44,7 @@
margin: 0 auto;
text-transform: capitalize;
display: flex;
- -ms-flex-pack: center;
justify-content: center;
- -ms-flex-align: center;
align-items: center;
color: #fff;
font-family: montserrat, sans-serif;
@@ -57,49 +55,42 @@
text-decoration: none;
}
-.tag.featured {
+.article-category.featured {
background-color: #1f1e1e
}
-.tag[data-category="Cigars 101"] {
+.article-category[data-category="Cigars 101"] {
background-color: #5f5d59
}
-.tag[data-category="Cigar Makers"] {
+.article-category[data-category="Cigar Makers"] {
background-color: #8e7b5c
}
-.tag[data-category="Cigar News"] {
+.article-category[data-category="Cigar News"] {
background-color: #916e35
}
-.tag[data-category="Cigar Buying Guides"] {
+.article-category[data-category="Cigar Buying Guides"] {
background-color: #7e4a3a
}
-.tag[data-category="Cigar Lifestyle"] .tag {
+.article-category[data-category="Cigar Lifestyle"] .article-category {
background-color: #673841
}
-.tag[data-category="Food & Drink"] .tag {
+.article-category[data-category="Food & Drink"] .article-category {
background-color: #3c5351
}
-.tag[data-category="Cigar Ratings & Reviews"] {
+.article-category[data-category="Cigar Ratings & Reviews"] {
background-color: #24445d
}
-.tag[data-category="Cigar Humidification"] {
+.article-category[data-category="Cigar Humidification"] {
background-color: #5d8371
}
-.article.article-thumbnail .tag {
- flex: none;
- position: absolute;
- top: 20px;
- left: 0;
-}
-
.article.article-thumbnail .article-image {
display: flex;
align-items: flex-start;
@@ -146,9 +137,7 @@
flex: 0 0 auto;
width: 100%;
min-height: 7rem;
- padding: 20px 30px;
- padding-top: 20px;
- padding-top: 40px;
+ padding: 40px 30px 20px;
background-color: #eaeaea;
display: block;
}
@@ -199,7 +188,6 @@
.article.article-thumbnail .article-preview {
flex: 0 0 0;
- flex-grow: 0;
display: flex;
flex-direction: column;
align-items: stretch;
@@ -208,9 +196,7 @@
padding: 0 30px;
font-family: "Open Sans", sans-serif;
background-color: #eaeaea;
- transition: flex-grow .55s ease-in-out, -webkit-flex-grow .55s ease-in-out;
transition: flex-grow .55s ease-in-out;
- transition: flex-grow .55s ease-in-out, -webkit-flex-grow .55s ease-in-out, -ms-flex-positive .55s ease-in-out;
}
.article.article-thumbnail:hover .article-preview {
@@ -231,14 +217,11 @@
.article.article-thumbnail .article-excerpt {
position: relative;
flex: 0 0 auto;
- flex-shrink: 0;
overflow: hidden;
padding-bottom: 20px;
font-weight: 600;
opacity: 0;
- transition: opacity .55s ease-in-out, -webkit-flex-shrink .55s ease-in-out;
transition: flex-shrink .55s ease-in-out, opacity .55s ease-in-out;
- transition: flex-shrink .55s ease-in-out, opacity .55s ease-in-out, -webkit-flex-shrink .55s ease-in-out, -ms-flex-negative .55s ease-in-out;
}
.article.article-thumbnail:hover .article-excerpt {
From 8b202b2e854927ccf82159e87b17b8e5b122858a Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 12:10:34 -0500
Subject: [PATCH 32/39] teaser refactoring
---
cigaradvisor/blocks/article-teaser/article-teaser.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index e449e4e5..65f1d045 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -56,7 +56,7 @@ export default async function decorate(block) {
const authorLink = `${window.hlx.codeBasePath}/author/drafts/${authorNameHyphenSeparated.toLowerCase()}`;
block.innerHTML = `
-
+
Cigar Buying Guides
${createOptimizedPicture(articleInfo.image).outerHTML}
@@ -64,10 +64,10 @@ export default async function decorate(block) {
@@ -75,7 +75,7 @@ export default async function decorate(block) {
Reading Time: ${articleInfo.readingTime} ${articleInfo.articleBlurb}
-
Read More
+
Read More
From d5b3c02a4e5f8bccf72321433335acc50f965bc7 Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 12:23:38 -0500
Subject: [PATCH 33/39] Update article-teaser.js
---
cigaradvisor/blocks/article-teaser/article-teaser.js | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index 65f1d045..1b107368 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -22,15 +22,12 @@ async function fetchData(url) {
}
export default async function decorate(block) {
- const filters = readBlockConfig(block);
- let doc;
+ const filterPath = block.querySelector('a').getAttribute('href');
block.textContent = '';
block.classList.add('article-teaser');
- const url = new URL(filters.path);
- const trimmedURL = url.pathname;
const fetchUrl = `${window.hlx.codeBasePath}/drafts/Kailas/pagemeta.json`;
const teaserContent = await fetchData(fetchUrl);
- const articleInfo = teaserContent.find((obj) => obj.path === trimmedURL);
+ const articleInfo = teaserContent.find((obj) => obj.path === filterPath);
const categoryListUrl = `${window.hlx.codeBasePath}/drafts/Kailas/category/category-list.json`;
const categoryListData = await fetchData(categoryListUrl);
const articlePath = articleInfo.path;
@@ -46,7 +43,7 @@ export default async function decorate(block) {
.then((html) => {
// Create a new HTML document using DOMParser
const parser = new DOMParser();
- doc = parser.parseFromString(html, 'text/html');
+ const doc = parser.parseFromString(html, 'text/html');
const articleCategory = getMetadata('category', doc);
const articleCategoryInfo = categoryListData.find((obj) => obj.category === articleCategory);
const articleCategoryLink = articleCategoryInfo.categoryLink;
From 8c4ebedf4b022444857d408741655fba742ed601 Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 12:25:54 -0500
Subject: [PATCH 34/39] Update article-teaser.js
---
cigaradvisor/blocks/article-teaser/article-teaser.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index 1b107368..91d0773c 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -1,4 +1,4 @@
-import { createOptimizedPicture, readBlockConfig, getMetadata } from '../../scripts/aem.js';
+import { createOptimizedPicture, getMetadata } from '../../scripts/aem.js';
function formatDate(originalDateString) {
const utcDateString = new Date((originalDateString - 25569) * 86400 * 1000);
From cc70e977c8130b87677b019cb5c21ceeb8deb9fb Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 13:05:55 -0500
Subject: [PATCH 35/39] Update article-teaser.js
---
.../blocks/article-teaser/article-teaser.js | 37 +++++--------------
1 file changed, 9 insertions(+), 28 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index 91d0773c..fa272351 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -1,4 +1,4 @@
-import { createOptimizedPicture, getMetadata } from '../../scripts/aem.js';
+import { createOptimizedPicture } from '../../scripts/aem.js';
function formatDate(originalDateString) {
const utcDateString = new Date((originalDateString - 25569) * 86400 * 1000);
@@ -30,28 +30,14 @@ export default async function decorate(block) {
const articleInfo = teaserContent.find((obj) => obj.path === filterPath);
const categoryListUrl = `${window.hlx.codeBasePath}/drafts/Kailas/category/category-list.json`;
const categoryListData = await fetchData(categoryListUrl);
- const articlePath = articleInfo.path;
- fetch(articlePath)
- .then((response) => {
- // Check if the request was successful (status code 200)
- if (response.ok) {
- // Convert the response to text
- return response.text();
- }
- throw new Error('Network response was not ok.');
- })
- .then((html) => {
- // Create a new HTML document using DOMParser
- const parser = new DOMParser();
- const doc = parser.parseFromString(html, 'text/html');
- const articleCategory = getMetadata('category', doc);
- const articleCategoryInfo = categoryListData.find((obj) => obj.category === articleCategory);
- const articleCategoryLink = articleCategoryInfo.categoryLink;
- const formattedDate = formatDate(articleInfo.publishedDate).split('|')[0];
- const datetimeAttr = formatDate(articleInfo.publishedDate).split('|')[1];
- const authorNameHyphenSeparated = articleInfo.author.split(' ').join('-');
- const authorLink = `${window.hlx.codeBasePath}/author/drafts/${authorNameHyphenSeparated.toLowerCase()}`;
- block.innerHTML = `
+ const articleCategory = articleInfo.category;
+ const articleCategoryInfo = categoryListData.find((obj) => obj.category === articleCategory);
+ const articleCategoryLink = articleCategoryInfo.categoryLink;
+ const formattedDate = formatDate(articleInfo.publishedDate).split('|')[0];
+ const datetimeAttr = formatDate(articleInfo.publishedDate).split('|')[1];
+ const authorNameHyphenSeparated = articleInfo.author.split(' ').join('-');
+ const authorLink = `${window.hlx.codeBasePath}/author/drafts/${authorNameHyphenSeparated.toLowerCase()}`;
+ block.innerHTML = `
Cigar Buying Guides
@@ -77,9 +63,4 @@ export default async function decorate(block) {
`;
- })
- .catch((error) => {
- // Handle any errors that occurred during the fetch
- console.error('There was a problem with the fetch operation:', error);
- });
}
From 3489899935892dc9506ffb8501c25dd8451de485 Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Tue, 5 Dec 2023 13:14:54 -0500
Subject: [PATCH 36/39] Update article-teaser.js
---
cigaradvisor/blocks/article-teaser/article-teaser.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index fa272351..9c0618fb 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -40,7 +40,7 @@ export default async function decorate(block) {
block.innerHTML = `
- Cigar Buying Guides
+ ${articleCategory}
${createOptimizedPicture(articleInfo.image).outerHTML}
From 03e8428a96efd72aaa8480662bbebf4b6b0a7bb8 Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Wed, 6 Dec 2023 10:44:03 -0500
Subject: [PATCH 37/39] code review fixes
---
cigaradvisor/blocks/article-teaser/article-teaser.js | 6 ++----
cigaradvisor/styles/styles.css | 9 +++------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index 9c0618fb..bcb2bd55 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -23,7 +23,6 @@ async function fetchData(url) {
export default async function decorate(block) {
const filterPath = block.querySelector('a').getAttribute('href');
- block.textContent = '';
block.classList.add('article-teaser');
const fetchUrl = `${window.hlx.codeBasePath}/drafts/Kailas/pagemeta.json`;
const teaserContent = await fetchData(fetchUrl);
@@ -38,9 +37,8 @@ export default async function decorate(block) {
const authorNameHyphenSeparated = articleInfo.author.split(' ').join('-');
const authorLink = `${window.hlx.codeBasePath}/author/drafts/${authorNameHyphenSeparated.toLowerCase()}`;
block.innerHTML = `
-
-
- ${articleCategory}
+
+ ${articleCategory}
${createOptimizedPicture(articleInfo.image).outerHTML}
diff --git a/cigaradvisor/styles/styles.css b/cigaradvisor/styles/styles.css
index ae28d6f8..0859d291 100644
--- a/cigaradvisor/styles/styles.css
+++ b/cigaradvisor/styles/styles.css
@@ -23,22 +23,19 @@
--nav-height: 64px;
}
-/* body {
+body {
display: none;
+ color: #333;
}
body.appear {
display: block;
-} */
+}
header {
height: var(--nav-height);
}
-body{
- color: #333;
-}
-
html {
font-size:100%;
line-height:1.5
From 1a021814169e4892c7c9773614d0262cc63d385e Mon Sep 17 00:00:00 2001
From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com>
Date: Wed, 6 Dec 2023 11:52:09 -0500
Subject: [PATCH 38/39] Update article-teaser.css
---
.../blocks/article-teaser/article-teaser.css | 86 +++++++++----------
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.css b/cigaradvisor/blocks/article-teaser/article-teaser.css
index e3e569ef..3a68429e 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.css
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.css
@@ -1,8 +1,8 @@
-.article-thumbnail:hover::before {
+.article-teaser.block .article-thumbnail:hover::before {
visibility: hidden;
}
-.article.article-thumbnail::before {
+.article-teaser.block .article.article-thumbnail::before {
content: '';
height: 100%;
width: 100%;
@@ -13,7 +13,7 @@
transition: visibility .2s linear;
}
-.article {
+.article-teaser.block .article {
position: relative;
top: 0;
right: 0;
@@ -31,12 +31,12 @@
}
@media screen and (min-width: 60em) {
- .article.article-thumbnail {
+ .article-teaser.block .article.article-thumbnail {
min-height: 26.25rem;
}
}
-.article-category {
+.article-teaser.block .article-category {
position: absolute;
top: 20px;
left: 0;
@@ -55,56 +55,56 @@
text-decoration: none;
}
-.article-category.featured {
+.article-teaser.block .article-category.featured {
background-color: #1f1e1e
}
-.article-category[data-category="Cigars 101"] {
+.article-teaser.block .article-category[data-category="Cigars 101"] {
background-color: #5f5d59
}
-.article-category[data-category="Cigar Makers"] {
+.article-teaser.block .article-category[data-category="Cigar Makers"] {
background-color: #8e7b5c
}
-.article-category[data-category="Cigar News"] {
+.article-teaser.block .article-category[data-category="Cigar News"] {
background-color: #916e35
}
-.article-category[data-category="Cigar Buying Guides"] {
+.article-teaser.block .article-category[data-category="Cigar Buying Guides"] {
background-color: #7e4a3a
}
-.article-category[data-category="Cigar Lifestyle"] .article-category {
+.article-teaser.block .article-category[data-category="Cigar Lifestyle"] .article-category {
background-color: #673841
}
-.article-category[data-category="Food & Drink"] .article-category {
+.article-teaser.block .article-category[data-category="Food & Drink"] .article-category {
background-color: #3c5351
}
-.article-category[data-category="Cigar Ratings & Reviews"] {
+.article-teaser.block .article-category[data-category="Cigar Ratings & Reviews"] {
background-color: #24445d
}
-.article-category[data-category="Cigar Humidification"] {
+.article-teaser.block .article-category[data-category="Cigar Humidification"] {
background-color: #5d8371
}
-.article.article-thumbnail .article-image {
+.article-teaser.block .article.article-thumbnail .article-image {
display: flex;
align-items: flex-start;
flex: 1 0 13rem;
width: 100%;
}
-.article.article-thumbnail .article-image>img {
+.article-teaser.block .article.article-thumbnail .article-image>img {
display: block;
width: 100%;
max-height: 321px;
}
-.article.article-thumbnail .article-content::before {
+.article-teaser.block .article.article-thumbnail .article-content::before {
content: '';
display: block;
flex: 1 0 72px;
@@ -112,11 +112,11 @@
transition: flex-grow .55s ease-in-out;
}
-.article.article-thumbnail:hover .article-content::before {
+.article-teaser.block .article.article-thumbnail:hover .article-content::before {
flex-grow: 0;
}
-.article.article-thumbnail .article-content {
+.article-teaser.block .article.article-thumbnail .article-content {
position: absolute;
top: 0;
right: 0;
@@ -133,7 +133,7 @@
overflow-y: hidden;
}
-.article.article-thumbnail .article-header {
+.article-teaser.block .article.article-thumbnail .article-header {
flex: 0 0 auto;
width: 100%;
min-height: 7rem;
@@ -143,50 +143,50 @@
}
@media screen and (min-width: 60em) {
- .article.article-thumbnail .article-header {
+ .article-teaser.block .article.article-thumbnail .article-header {
min-height: 140px
}
}
-.article.article-thumbnail .article-title {
+.article-teaser.block .article.article-thumbnail .article-title {
margin: 0 14px 16px;
font-size: 18px;
font-weight: 800;
}
-.article.article-thumbnail .article-title-link {
+.article-teaser.block .article.article-thumbnail .article-title-link {
display: block;
font-size: 1em;
font-weight: inherit;
color: inherit;
}
-.article-thumbnail .article-meta {
+.article-teaser.block .article-thumbnail .article-meta {
font-size: 0;
color: #141414;
}
-.article-thumbnail .article-meta a {
+.article-teaser.block .article-thumbnail .article-meta a {
position: relative;
z-index: 2;
text-decoration: none;
color: #141414;
}
-.article-thumbnail .article-meta>* {
+.article-teaser.block .article-thumbnail .article-meta>* {
display: inline-block;
font-family: montserrat, sans-serif;
font-weight: 600;
font-size: 16px;
}
-.article.article-thumbnail .article-pubdate:not(:only-child)::before {
+.article-teaser.block .article.article-thumbnail .article-pubdate:not(:only-child)::before {
content: '|';
display: inline-block;
margin: 0 .5em;
}
-.article.article-thumbnail .article-preview {
+.article-teaser.block .article.article-thumbnail .article-preview {
flex: 0 0 0;
display: flex;
flex-direction: column;
@@ -199,11 +199,11 @@
transition: flex-grow .55s ease-in-out;
}
-.article.article-thumbnail:hover .article-preview {
+.article-teaser.block .article.article-thumbnail:hover .article-preview {
flex-grow: 1;
}
-.article.article-thumbnail .article-excerpt::after {
+.article-teaser.block .article.article-thumbnail .article-excerpt::after {
content: '';
display: block;
position: absolute;
@@ -214,7 +214,7 @@
background: linear-gradient(to top, #eaeaea, rgba(234 234 234 80%) 6px, rgba(234 234 234 0%));
}
-.article.article-thumbnail .article-excerpt {
+.article-teaser.block .article.article-thumbnail .article-excerpt {
position: relative;
flex: 0 0 auto;
overflow: hidden;
@@ -224,12 +224,12 @@
transition: flex-shrink .55s ease-in-out, opacity .55s ease-in-out;
}
-.article.article-thumbnail:hover .article-excerpt {
+.article-teaser.block .article.article-thumbnail:hover .article-excerpt {
flex-shrink: 1;
opacity: 1;
}
-.article-thumbnail .article-excerpt p {
+.article-teaser.block .article-thumbnail .article-excerpt p {
font-size: 1em;
font-family: inherit;
font-weight: inherit;
@@ -237,19 +237,19 @@
cursor: default;
}
-.article.article-thumbnail .article-excerpt p:last-child,
-.article.article-thumbnail .article-excerpt ul:last-child,
-.article.article-thumbnail .article-excerpt ol:last-child {
+.article-teaser.block .article.article-thumbnail .article-excerpt p:last-child,
+.article-teaser.block .article.article-thumbnail .article-excerpt ul:last-child,
+.article-teaser.block .article.article-thumbnail .article-excerpt ol:last-child {
margin-bottom: 0;
}
-.article.article-thumbnail .article-excerpt p:first-child,
-.article.article-thumbnail .article-excerpt ul:first-child,
-.article.article-thumbnail .article-excerpt ol:first-child {
+.article-teaser.block .article.article-thumbnail .article-excerpt p:first-child,
+.article-teaser.block .article.article-thumbnail .article-excerpt ul:first-child,
+.article-teaser.block .article.article-thumbnail .article-excerpt ol:first-child {
margin-top: 0;
}
-.read-more::after {
+.article-teaser.block .read-more::after {
content: '\f054';
font-family: FontAwesome, sans-serif;
margin-left: 8px;
@@ -258,7 +258,7 @@
font-size: 18px;
}
-.article-thumbnail .article-read-more {
+.article-teaser.block .article-thumbnail .article-read-more {
display: block;
flex: 0 0 auto;
position: relative;
@@ -272,11 +272,11 @@
}
-.article.article-thumbnail:hover .article-read-more {
+.article-teaser.block .article.article-thumbnail:hover .article-read-more {
opacity: 1;
}
-.read-more {
+.article-teaser.block .read-more {
text-transform: uppercase;
font-weight: 700;
text-align: center;
From f135093e82d424179354c40f68eeca66065698c7 Mon Sep 17 00:00:00 2001
From: Kailas Nadh U <53608019+kailasnadh790@users.noreply.github.com>
Date: Wed, 6 Dec 2023 12:43:25 -0500
Subject: [PATCH 39/39] Update
cigaradvisor/blocks/article-teaser/article-teaser.js
Co-authored-by: Bryan Stopp
---
cigaradvisor/blocks/article-teaser/article-teaser.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cigaradvisor/blocks/article-teaser/article-teaser.js b/cigaradvisor/blocks/article-teaser/article-teaser.js
index bcb2bd55..9547592e 100644
--- a/cigaradvisor/blocks/article-teaser/article-teaser.js
+++ b/cigaradvisor/blocks/article-teaser/article-teaser.js
@@ -32,8 +32,7 @@ export default async function decorate(block) {
const articleCategory = articleInfo.category;
const articleCategoryInfo = categoryListData.find((obj) => obj.category === articleCategory);
const articleCategoryLink = articleCategoryInfo.categoryLink;
- const formattedDate = formatDate(articleInfo.publishedDate).split('|')[0];
- const datetimeAttr = formatDate(articleInfo.publishedDate).split('|')[1];
+ const [formattedDate, datetimeAttr] = formatDate(articleInfo.publishedDate).split('|');
const authorNameHyphenSeparated = articleInfo.author.split(' ').join('-');
const authorLink = `${window.hlx.codeBasePath}/author/drafts/${authorNameHyphenSeparated.toLowerCase()}`;
block.innerHTML = `