From 8664ae52786dbb4de76648da1bf62b12fe7a1808 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 11:51:06 -0500 Subject: [PATCH 01/15] initial --- .../blocks/articleheader/articleheader.css | 102 ++++++++++++++++++ .../blocks/articleheader/articleheader.js | 47 ++++++++ cigaradvisor/scripts/scripts.js | 44 +++++++- cigaradvisor/styles/styles.css | 7 ++ 4 files changed, 195 insertions(+), 5 deletions(-) create mode 100644 cigaradvisor/blocks/articleheader/articleheader.css create mode 100644 cigaradvisor/blocks/articleheader/articleheader.js diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css new file mode 100644 index 00000000..9da3b08f --- /dev/null +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -0,0 +1,102 @@ +main .articleheader-container{ + margin-top: 46px; +} + +.articleheader.block .image-wrapper { + display: flex; + justify-content: center; + align-items: center; + max-height: 650px; + background-color: #eaeaea; +} + +.articleheader.block .image-wrapper img{ + display: block; + width: 100%; + max-height: 650px; +} + +.articleheader.block .article-info { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding-left: 0; + padding-right: 0; + width: 100%; + margin-left: auto; + margin-right: auto; + max-width: 1080px; + text-align: center; +} + +.articleheader.block .article-info .article-category { + float: none; + display: flex; + justify-content: center; + margin: 30px auto 10px; +} + +.articleheader.block .article-info .article-category a { + position: relative; + top: 0; + left: 0; + padding: 7px 24px; + margin: 0 auto; + text-transform: capitalize; + display: flex; + justify-content: center; + color: #fff; + font-family: montserrat,sans-serif; + font-weight: 600; + background-color: #3c3a3b; + font-size: 12px; +} + +.articleheader.block .article-info h1{ + font-size: 36px; +} + +.articleheader.block .article-info .article-author { + padding-left: 0; + display: flex; + justify-content: center; + align-items: center; + margin: 40px auto; +} + +/* separate children of .article-author with a pipe */ +.articleheader.block .article-info .article-author > a::after { + content: ""; + display: inline-block; + width: 1px; + height: 12px; + background-color: #3c3a3b; + margin: 0 10px; +} + +.articleheader.block .article-info .article-author .article-published-date { + font-family: var(--ff-opensans); + font-weight: 600; + color: #141414; + font-size: 14px; +} + +.articleheader.block .article-read-time { + text-align: justify; + font-size: 18px; + line-height: 30px; + color: var(--grey); + padding-left: 0; + padding-right: 0; + width: 100%; + margin-left: auto; + margin-right: auto; + max-width: 1080px; +} + +@media screen and (min-width: 900px) { + main .articleheader-container { + margin-top: 77px; + } +} \ No newline at end of file diff --git a/cigaradvisor/blocks/articleheader/articleheader.js b/cigaradvisor/blocks/articleheader/articleheader.js new file mode 100644 index 00000000..72ce88b9 --- /dev/null +++ b/cigaradvisor/blocks/articleheader/articleheader.js @@ -0,0 +1,47 @@ +import { fetchData } from '../../scripts/scripts.js'; + +function getRelativePath(path) { + let relPath = path; + try { + const url = new URL(path); + relPath = url.pathname; + } catch (error) { + // do nothing + } + return relPath; +} + +export default async function decorate(block) { + const imageWrapper = document.createElement('div'); + imageWrapper.classList.add('image-wrapper'); + const picture = block.querySelector('picture'); + imageWrapper.append(picture); + const articleInfo = document.createElement('div'); + articleInfo.classList.add('article-info'); + const categoryLink = block.querySelector('p.category').innerText; + const category = await fetchData(getRelativePath(categoryLink)); + const categoryLinkEl = document.createElement('div'); + categoryLinkEl.classList.add('article-category'); + categoryLinkEl.innerHTML = `${category.title}`; + articleInfo.append(categoryLinkEl); + articleInfo.append(block.querySelector('h1')); + const authorLink = block.querySelector('p.author').innerText; + const author = await fetchData(getRelativePath(authorLink)); + const authorLinkEl = document.createElement('div'); + authorLinkEl.classList.add('article-author'); + authorLinkEl.innerHTML = `By ${author.title}`; + articleInfo.append(authorLinkEl); + const publishedDate = block.querySelector('p.published-date').innerText; + const publishedDateEl = document.createElement('span'); + publishedDateEl.classList.add('article-published-date'); + publishedDateEl.innerText = publishedDate; + authorLinkEl.append(publishedDateEl); + articleInfo.append(authorLinkEl); + const readTime = block.querySelector('p.read-time') ? block.querySelector('p.read-time').innerText : ''; + const readTimeEl = document.createElement('span'); + readTimeEl.classList.add('article-read-time'); + readTimeEl.innerHTML = `Reading Time: ${readTime}`; + articleInfo.append(readTimeEl); + block.replaceChildren(imageWrapper); + block.append(articleInfo); +} diff --git a/cigaradvisor/scripts/scripts.js b/cigaradvisor/scripts/scripts.js index a2e6a47b..bd660e23 100644 --- a/cigaradvisor/scripts/scripts.js +++ b/cigaradvisor/scripts/scripts.js @@ -11,6 +11,7 @@ import { waitForLCP, loadBlocks, loadCSS, + getMetadata, } from './aem.js'; const LCP_BLOCKS = []; // add your LCP blocks to the list @@ -53,6 +54,29 @@ function buildHeroBlock(main) { } } +function buildArticleHeader(mainEl) { + const div = document.createElement('div'); + const h1 = mainEl.querySelector('h1'); + const picture = mainEl.querySelector('picture'); + const category = getMetadata('category'); + const authorLink = getMetadata('author'); + const publishedDate = getMetadata('publisheddate'); + const readTime = document.querySelector('meta[name="readingtime"]').content; + const articleBlurb = getMetadata('articleblurb'); + + const articleHeaderBlockEl = buildBlock('articleheader', [ + [picture], + [`
${category}
`], + [h1], + [`${readTime}
`], + [` `], + [`${publishedDate}
`], + [`${articleBlurb}
`], + ]); + div.append(articleHeaderBlockEl); + mainEl.prepend(div); +} + /** * Builds two column grid. * @param {Element} main The container element @@ -94,7 +118,14 @@ async function loadFonts() { */ function buildAutoBlocks(main) { try { - buildHeroBlock(main); + const isHome = document.querySelector('body.homepage'); + const isBlogPost = !!document.querySelector('body.blog-post-template'); + if (isHome) { + buildHeroBlock(main); + } + if (isBlogPost) { + buildArticleHeader(main); + } } catch (error) { // eslint-disable-next-line no-console console.error('Auto Blocking failed', error); @@ -145,17 +176,20 @@ export function decorateExternalLink(element) { } /** - * Simple funtion to fetch json data from a spreadsheet + * Simple funtion to fetch json data from query-index.json * @param {*} url * @returns jsonData */ -export async function fetchData(url) { - const resp = await fetch(url); +export async function fetchData(filterPath) { + const fetchUrl = '/query-index.json'; + const resp = await fetch(fetchUrl); let jsonData = ''; if (resp.ok) { jsonData = await resp.json(); } - return jsonData.data; + const responseData = jsonData.data; + const filteredData = responseData.find((obj) => obj.path === filterPath); + return filteredData; } /** diff --git a/cigaradvisor/styles/styles.css b/cigaradvisor/styles/styles.css index 316e0085..3ce073c2 100644 --- a/cigaradvisor/styles/styles.css +++ b/cigaradvisor/styles/styles.css @@ -197,6 +197,7 @@ body { display: none; margin: 0; color: var(--clr-text); + font-family: var(--ff-arial); } body.appear { @@ -379,3 +380,9 @@ main .section[data-layout="50/50"] .right-grid>div { font-size: 45px; } } + +@media screen and (min-width: 1200px) { + a { + font-size: 14px; + } +} From cf1108d1f744e16c149f518e139c888a803fb830 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:00:09 -0500 Subject: [PATCH 02/15] Update articleheader.css --- .../blocks/articleheader/articleheader.css | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 9da3b08f..3e3a763a 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -95,6 +95,36 @@ main .articleheader-container{ max-width: 1080px; } +.blog-post-template .author-container > .default-content-wrapper { + padding-left: 0; + padding-right: 0; + width: 100%; + margin-left: auto; + margin-right: auto; + max-width: 1080px; + text-align: justify; +} + +.blog-post-template .author-container > .default-content-wrapper p { + font-size: 18px; + line-height: 30px; + font-family: var(--ff-opensans); + font-weight: 600; + color: #141414; + cursor: default; +} + +.blog-post-template .author-container > .default-content-wrapper picture { + width: 1000px; + padding: 20px; + max-width: 100%; + clear: both; +} + +.blog-post-template .author-container > .default-content-wrapper picture img { + padding: 20px 20px 20px 0; +} + @media screen and (min-width: 900px) { main .articleheader-container { margin-top: 77px; From 9b2a4cbf26481b60c202e180ace4f12f350a8390 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:35:09 -0500 Subject: [PATCH 03/15] article image caption --- cigaradvisor/blocks/articleheader/articleheader.css | 11 +++++++++++ cigaradvisor/scripts/scripts.js | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 3e3a763a..444a0fc5 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -125,6 +125,17 @@ main .articleheader-container{ padding: 20px 20px 20px 0; } +.blog-post-template .author-container > .default-content-wrapper .article-image-caption { + font-family: var(--ff-opensans); + font-size: 16px; + text-align: center; + padding: 0 20px; + font-style: italic; + font-weight: 700; + color: #888; + +} + @media screen and (min-width: 900px) { main .articleheader-container { margin-top: 77px; diff --git a/cigaradvisor/scripts/scripts.js b/cigaradvisor/scripts/scripts.js index bd660e23..6a88580d 100644 --- a/cigaradvisor/scripts/scripts.js +++ b/cigaradvisor/scripts/scripts.js @@ -54,7 +54,20 @@ function buildHeroBlock(main) { } } +/** + * Builds the article header for the given main element. + * @param {HTMLElement} mainEl - The main element to build the article header for. + */ function buildArticleHeader(mainEl) { + const paragraphs = mainEl.querySelectorAll('p'); + paragraphs.forEach(function(paragraph) { + if (paragraph.querySelector('picture') !== null) { + var nextSibling = paragraph.nextElementSibling; + if (nextSibling && nextSibling.querySelector('em') !== null) { + nextSibling.classList.add('article-image-caption'); + } + } + }); const div = document.createElement('div'); const h1 = mainEl.querySelector('h1'); const picture = mainEl.querySelector('picture'); From 3298de53ed05b07a844dad7af7c95c0d4bf48ae1 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:41:47 -0500 Subject: [PATCH 04/15] caption --- cigaradvisor/blocks/articleheader/articleheader.css | 5 ++--- cigaradvisor/scripts/scripts.js | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 444a0fc5..81a41e27 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -114,7 +114,7 @@ main .articleheader-container{ cursor: default; } -.blog-post-template .author-container > .default-content-wrapper picture { +.blog-post-template .author-container > .default-content-wrapper .article-image-wrapper { width: 1000px; padding: 20px; max-width: 100%; @@ -129,11 +129,10 @@ main .articleheader-container{ font-family: var(--ff-opensans); font-size: 16px; text-align: center; - padding: 0 20px; font-style: italic; font-weight: 700; color: #888; - + margin: 0; } @media screen and (min-width: 900px) { diff --git a/cigaradvisor/scripts/scripts.js b/cigaradvisor/scripts/scripts.js index 6a88580d..f196bef9 100644 --- a/cigaradvisor/scripts/scripts.js +++ b/cigaradvisor/scripts/scripts.js @@ -60,12 +60,17 @@ function buildHeroBlock(main) { */ function buildArticleHeader(mainEl) { const paragraphs = mainEl.querySelectorAll('p'); - paragraphs.forEach(function(paragraph) { + paragraphs.forEach((paragraph) => { if (paragraph.querySelector('picture') !== null) { - var nextSibling = paragraph.nextElementSibling; + const imageWrapper = document.createElement('div'); + imageWrapper.classList.add('article-image-wrapper'); + imageWrapper.append(paragraph.querySelector('picture')); + const nextSibling = paragraph.nextElementSibling; if (nextSibling && nextSibling.querySelector('em') !== null) { nextSibling.classList.add('article-image-caption'); + imageWrapper.append(nextSibling); } + paragraph.replaceChildren(imageWrapper); } }); const div = document.createElement('div'); From 492b89b673260bd4379b2936e43c3466875c2f28 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:46:35 -0500 Subject: [PATCH 05/15] Update articleheader.css --- cigaradvisor/blocks/articleheader/articleheader.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 81a41e27..4077ff80 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -96,8 +96,7 @@ main .articleheader-container{ } .blog-post-template .author-container > .default-content-wrapper { - padding-left: 0; - padding-right: 0; + padding: 0 15px; width: 100%; margin-left: auto; margin-right: auto; @@ -139,4 +138,10 @@ main .articleheader-container{ main .articleheader-container { margin-top: 77px; } +} + +@media screen and (min-width: 1200px) { + .blog-post-template .author-container > .default-content-wrapper { + padding: 0; + } } \ No newline at end of file From bced1c94681b408df18bc809e6010118130b1981 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:49:28 -0500 Subject: [PATCH 06/15] article header --- .../blocks/articleheader/articleheader.css | 79 ++++++++++--------- cigaradvisor/scripts/scripts.js | 15 +++- 2 files changed, 57 insertions(+), 37 deletions(-) diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 4077ff80..0c74b1df 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -1,4 +1,4 @@ -main .articleheader-container{ +main .articleheader-container { margin-top: 46px; } @@ -10,7 +10,7 @@ main .articleheader-container{ background-color: #eaeaea; } -.articleheader.block .image-wrapper img{ +.articleheader.block .image-wrapper img { display: block; width: 100%; max-height: 650px; @@ -31,29 +31,29 @@ main .articleheader-container{ } .articleheader.block .article-info .article-category { - float: none; - display: flex; - justify-content: center; - margin: 30px auto 10px; + float: none; + display: flex; + justify-content: center; + margin: 30px auto 10px; } .articleheader.block .article-info .article-category a { position: relative; top: 0; left: 0; - padding: 7px 24px; - margin: 0 auto; - text-transform: capitalize; - display: flex; - justify-content: center; - color: #fff; - font-family: montserrat,sans-serif; - font-weight: 600; - background-color: #3c3a3b; - font-size: 12px; -} - -.articleheader.block .article-info h1{ + padding: 7px 24px; + margin: 0 auto; + text-transform: capitalize; + display: flex; + justify-content: center; + color: #fff; + font-family: montserrat, sans-serif; + font-weight: 600; + background-color: #3c3a3b; + font-size: 12px; +} + +.articleheader.block .article-info h1 { font-size: 36px; } @@ -66,7 +66,7 @@ main .articleheader-container{ } /* separate children of .article-author with a pipe */ -.articleheader.block .article-info .article-author > a::after { +.articleheader.block .article-info .article-author>a::after { content: ""; display: inline-block; width: 1px; @@ -75,7 +75,7 @@ main .articleheader-container{ margin: 0 10px; } -.articleheader.block .article-info .article-author .article-published-date { +.articleheader.block .article-info .article-author .article-published-date { font-family: var(--ff-opensans); font-weight: 600; color: #141414; @@ -84,10 +84,10 @@ main .articleheader-container{ .articleheader.block .article-read-time { text-align: justify; - font-size: 18px; - line-height: 30px; - color: var(--grey); - padding-left: 0; + font-size: 18px; + line-height: 30px; + color: var(--grey); + padding-left: 0; padding-right: 0; width: 100%; margin-left: auto; @@ -95,7 +95,7 @@ main .articleheader-container{ max-width: 1080px; } -.blog-post-template .author-container > .default-content-wrapper { +.blog-post-template .author-container>.default-content-wrapper { padding: 0 15px; width: 100%; margin-left: auto; @@ -104,33 +104,40 @@ main .articleheader-container{ text-align: justify; } -.blog-post-template .author-container > .default-content-wrapper p { +.blog-post-template .author-container>.default-content-wrapper p { font-size: 18px; line-height: 30px; font-family: var(--ff-opensans); - font-weight: 600; - color: #141414; - cursor: default; + font-weight: 600; + color: #141414; + cursor: default; +} + +.blog-post-template .author-container>.default-content-wrapper a{ + font-size: 18px; + line-height: 30px; + text-decoration: underline; + color: #b19b5e; } -.blog-post-template .author-container > .default-content-wrapper .article-image-wrapper { +.blog-post-template .author-container>.default-content-wrapper .article-image-wrapper { width: 1000px; padding: 20px; max-width: 100%; clear: both; } -.blog-post-template .author-container > .default-content-wrapper picture img { +.blog-post-template .author-container>.default-content-wrapper picture img { padding: 20px 20px 20px 0; } -.blog-post-template .author-container > .default-content-wrapper .article-image-caption { +.blog-post-template .author-container>.default-content-wrapper .article-image-caption { font-family: var(--ff-opensans); font-size: 16px; text-align: center; font-style: italic; - font-weight: 700; - color: #888; + font-weight: 700; + color: #888; margin: 0; } @@ -141,7 +148,7 @@ main .articleheader-container{ } @media screen and (min-width: 1200px) { - .blog-post-template .author-container > .default-content-wrapper { + .blog-post-template .author-container>.default-content-wrapper { padding: 0; } } \ No newline at end of file diff --git a/cigaradvisor/scripts/scripts.js b/cigaradvisor/scripts/scripts.js index f196bef9..4068d1cf 100644 --- a/cigaradvisor/scripts/scripts.js +++ b/cigaradvisor/scripts/scripts.js @@ -59,12 +59,19 @@ function buildHeroBlock(main) { * @param {HTMLElement} mainEl - The main element to build the article header for. */ function buildArticleHeader(mainEl) { + decorateExternalLink(mainEl); const paragraphs = mainEl.querySelectorAll('p'); paragraphs.forEach((paragraph) => { if (paragraph.querySelector('picture') !== null) { const imageWrapper = document.createElement('div'); imageWrapper.classList.add('article-image-wrapper'); - imageWrapper.append(paragraph.querySelector('picture')); + if (paragraph.querySelector('a') !== null) { + const a = paragraph.querySelector('a'); + a.replaceChildren(paragraph.querySelector('picture')); + imageWrapper.append(a); + } else { + imageWrapper.append(paragraph.querySelector('picture')); + } const nextSibling = paragraph.nextElementSibling; if (nextSibling && nextSibling.querySelector('em') !== null) { nextSibling.classList.add('article-image-caption'); @@ -73,6 +80,12 @@ function buildArticleHeader(mainEl) { paragraph.replaceChildren(imageWrapper); } }); + const h3 = mainEl.querySelectorAll('h3'); + h3.forEach((heading) => { + const p = document.createElement('p'); + p.innerHTML = ' '; + heading.prepend(p); + }); const div = document.createElement('div'); const h1 = mainEl.querySelector('h1'); const picture = mainEl.querySelector('picture'); From 4d3e04594ad00908c233f6aeaf88bab8b606f0e7 Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:22:33 -0500 Subject: [PATCH 07/15] null check --- .../blocks/articleheader/articleheader.js | 16 ++++++++++------ cigaradvisor/scripts/scripts.js | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cigaradvisor/blocks/articleheader/articleheader.js b/cigaradvisor/blocks/articleheader/articleheader.js index 72ce88b9..4dc80152 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.js +++ b/cigaradvisor/blocks/articleheader/articleheader.js @@ -20,17 +20,21 @@ export default async function decorate(block) { articleInfo.classList.add('article-info'); const categoryLink = block.querySelector('p.category').innerText; const category = await fetchData(getRelativePath(categoryLink)); - const categoryLinkEl = document.createElement('div'); - categoryLinkEl.classList.add('article-category'); - categoryLinkEl.innerHTML = `${category.title}`; - articleInfo.append(categoryLinkEl); + if (category) { + const categoryLinkEl = document.createElement('div'); + categoryLinkEl.classList.add('article-category'); + categoryLinkEl.innerHTML = `${category.title}`; + articleInfo.append(categoryLinkEl); + } articleInfo.append(block.querySelector('h1')); const authorLink = block.querySelector('p.author').innerText; const author = await fetchData(getRelativePath(authorLink)); const authorLinkEl = document.createElement('div'); authorLinkEl.classList.add('article-author'); - authorLinkEl.innerHTML = `By ${author.title}`; - articleInfo.append(authorLinkEl); + if (author) { + authorLinkEl.innerHTML = `By ${author.title}`; + articleInfo.append(authorLinkEl); + } const publishedDate = block.querySelector('p.published-date').innerText; const publishedDateEl = document.createElement('span'); publishedDateEl.classList.add('article-published-date'); diff --git a/cigaradvisor/scripts/scripts.js b/cigaradvisor/scripts/scripts.js index 4068d1cf..77daea91 100644 --- a/cigaradvisor/scripts/scripts.js +++ b/cigaradvisor/scripts/scripts.js @@ -59,6 +59,7 @@ function buildHeroBlock(main) { * @param {HTMLElement} mainEl - The main element to build the article header for. */ function buildArticleHeader(mainEl) { + // eslint-disable-next-line no-use-before-define decorateExternalLink(mainEl); const paragraphs = mainEl.querySelectorAll('p'); paragraphs.forEach((paragraph) => { From 640c2f80e13b4cc085c27411bd5c76dacb33076e Mon Sep 17 00:00:00 2001 From: kailasnadh790 <53608019+kailasnadh790@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:50:39 -0500 Subject: [PATCH 08/15] template styling --- .../blocks/articleheader/articleheader.css | 52 ------------------ cigaradvisor/styles/styles.css | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 52 deletions(-) diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 0c74b1df..e1b92b09 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -95,60 +95,8 @@ main .articleheader-container { max-width: 1080px; } -.blog-post-template .author-container>.default-content-wrapper { - padding: 0 15px; - width: 100%; - margin-left: auto; - margin-right: auto; - max-width: 1080px; - text-align: justify; -} - -.blog-post-template .author-container>.default-content-wrapper p { - font-size: 18px; - line-height: 30px; - font-family: var(--ff-opensans); - font-weight: 600; - color: #141414; - cursor: default; -} - -.blog-post-template .author-container>.default-content-wrapper a{ - font-size: 18px; - line-height: 30px; - text-decoration: underline; - color: #b19b5e; -} - -.blog-post-template .author-container>.default-content-wrapper .article-image-wrapper { - width: 1000px; - padding: 20px; - max-width: 100%; - clear: both; -} - -.blog-post-template .author-container>.default-content-wrapper picture img { - padding: 20px 20px 20px 0; -} - -.blog-post-template .author-container>.default-content-wrapper .article-image-caption { - font-family: var(--ff-opensans); - font-size: 16px; - text-align: center; - font-style: italic; - font-weight: 700; - color: #888; - margin: 0; -} - @media screen and (min-width: 900px) { main .articleheader-container { margin-top: 77px; } -} - -@media screen and (min-width: 1200px) { - .blog-post-template .author-container>.default-content-wrapper { - padding: 0; - } } \ No newline at end of file diff --git a/cigaradvisor/styles/styles.css b/cigaradvisor/styles/styles.css index 3ce073c2..14780047 100644 --- a/cigaradvisor/styles/styles.css +++ b/cigaradvisor/styles/styles.css @@ -362,6 +362,56 @@ main .section[data-layout="50/50"] .right-grid>div { background-color: var(--clr-pampas); } +/* Blog post template starts */ + +.blog-post-template .author-container>.default-content-wrapper { + padding: 0 15px; + width: 100%; + margin-left: auto; + margin-right: auto; + max-width: 1080px; + text-align: justify; +} + +.blog-post-template .author-container>.default-content-wrapper p { + font-size: 18px; + line-height: 30px; + font-family: var(--ff-opensans); + font-weight: 600; + color: #141414; + cursor: default; +} + +.blog-post-template .author-container>.default-content-wrapper a{ + font-size: 18px; + line-height: 30px; + text-decoration: underline; +color: #b19b5e; +} + +.blog-post-template .author-container>.default-content-wrapper .article-image-wrapper { + width: 1000px; + padding: 20px; + max-width: 100%; + clear: both; +} + +.blog-post-template .author-container>.default-content-wrapper picture img { + padding: 20px 20px 20px 0; +} + +.blog-post-template .author-container>.default-content-wrapper .article-image-caption { + font-family: var(--ff-opensans); + font-size: 16px; + text-align: center; + font-style: italic; + font-weight: 700; + color: #888; + margin: 0; +} + +/* Blog post template ends */ + @media screen and (max-width: 600px) { main .section[data-layout="50/50"] { width: 100%; @@ -385,4 +435,8 @@ main .section[data-layout="50/50"] .right-grid>div { a { font-size: 14px; } + + .blog-post-template .author-container>.default-content-wrapper { + padding: 0; + } } From 0d3f38bce1b028b147b999bd2164d768079b25df Mon Sep 17 00:00:00 2001 From: tmaret