From eb322030f770307ddce94484295784eb2a5093a8 Mon Sep 17 00:00:00 2001 From: Tony Klapatch Date: Fri, 14 Jun 2024 12:23:23 -0400 Subject: [PATCH] Fix warning for heights/widths on the footer logo and article list images --- best-cigars-guide/blocks/article-list/article-list.css | 5 +++++ best-cigars-guide/blocks/footer/footer.js | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/best-cigars-guide/blocks/article-list/article-list.css b/best-cigars-guide/blocks/article-list/article-list.css index 43ee42d..b5044eb 100644 --- a/best-cigars-guide/blocks/article-list/article-list.css +++ b/best-cigars-guide/blocks/article-list/article-list.css @@ -45,6 +45,11 @@ transition: transform 0.3s ease; line-height: 0; object-fit: cover; + aspect-ratio: 327 / 185; +} + +.hero-container ~ .article-list-container .article-list-card-image img { + aspect-ratio: 327 / 215; } .article-list-card-image a:hover img { diff --git a/best-cigars-guide/blocks/footer/footer.js b/best-cigars-guide/blocks/footer/footer.js index dcdbe15..358f873 100644 --- a/best-cigars-guide/blocks/footer/footer.js +++ b/best-cigars-guide/blocks/footer/footer.js @@ -37,17 +37,20 @@ function buildLdJson(container) { function getFamousLogo() { // Create the image element - const image = createOptimizedPicture( + const picture = createOptimizedPicture( '/best-cigars-guide/icons/famous-smoke-shop-logo-gray.png', 'Famous Smoke Shop Logo', ); - image.className = 'footer-logo'; + picture.className = 'footer-logo'; + const img = picture.lastElementChild; + img.width = 120; + img.height = 57; // Add the Famous link, with the logo inside of it const link = document.createElement('a'); link.href = 'https://www.famous-smoke.com'; link.className = 'footer-logo-link'; - link.appendChild(image); + link.appendChild(picture); // Wrap it up const wrap = document.createElement('div');