diff --git a/cigaradvisor/blocks/articleheader/articleheader.css b/cigaradvisor/blocks/articleheader/articleheader.css index 1178af9..2185ca9 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.css +++ b/cigaradvisor/blocks/articleheader/articleheader.css @@ -67,19 +67,6 @@ color: var(--clr-dark-gray); } -.articleheader.block .article-read-time { - text-align: justify; - font-size: var(--body-font-size-l); - line-height: 30px; - color: var(--grey); - padding-left: 0; - padding-right: 0; - width: 100%; - margin-left: auto; - margin-right: auto; - max-width: 1080px; -} - .articleheader.block .article-info .article-author > * { font-weight: var(--font-weight-semibold); font-size: var(--body-font-size-xs); @@ -94,19 +81,10 @@ .articleheader.block .article-info .article-author { flex-direction: row; } - - .articleheader.block .article-info .article-author > a::after { - content: ""; - display: inline-block; - width: 1px; - height: 12px; - background-color: var(--dark-grey); - margin: 0 10px; - } } @media screen and (min-width: 1200px) { .articleheader.block .article-info .article-author > * { font-size: var(--body-font-size-s); } - } \ No newline at end of file + } diff --git a/cigaradvisor/blocks/articleheader/articleheader.js b/cigaradvisor/blocks/articleheader/articleheader.js index 3f7bcb4..7e73ee2 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.js +++ b/cigaradvisor/blocks/articleheader/articleheader.js @@ -1,14 +1,5 @@ import { fetchCategoryInfo, fetchAuthorInfo, decorateSeoPicture } from '../../scripts/scripts.js'; -function getFormattedPublishedDate(publishedDate) { - const [day, month, year] = publishedDate.split(' '); - const monthIndex = new Date(Date.parse(`${month} 1, 2020`)).getMonth(); - const formattedDate = new Date(year, monthIndex, day); - const options = { year: 'numeric', month: 'long', day: 'numeric' }; - const formattedPublishedDate = formattedDate.toLocaleDateString('en-US', options); - return formattedPublishedDate; -} - export default async function decorate(block) { const section = document.createElement('section'); const imageWrapper = document.createElement('div'); @@ -35,12 +26,6 @@ export default async function decorate(block) { authorLinkEl.innerHTML = `By ${author.name}`; articleInfo.append(authorLinkEl); } - const publishedDate = block.querySelector('p.published-date').innerText; - const formattedPublishedDate = publishedDate ? getFormattedPublishedDate(publishedDate) : ''; - const publishedDateEl = document.createElement('span'); - publishedDateEl.classList.add('article-published-date'); - publishedDateEl.innerText = formattedPublishedDate; - authorLinkEl.append(publishedDateEl); articleInfo.append(authorLinkEl); section.append(imageWrapper); section.append(articleInfo);