From 4bca8596cf353348462bf03ed0ede0beaed6bcd4 Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Tue, 16 Apr 2024 10:23:28 +0200 Subject: [PATCH] remove image padding. --- cigaradvisor/blocks/articleheader/articleheader.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/cigaradvisor/blocks/articleheader/articleheader.js b/cigaradvisor/blocks/articleheader/articleheader.js index ab500f2..7e73ee2 100644 --- a/cigaradvisor/blocks/articleheader/articleheader.js +++ b/cigaradvisor/blocks/articleheader/articleheader.js @@ -7,9 +7,6 @@ export default async function decorate(block) { const picture = block.querySelector('picture'); decorateSeoPicture(picture, window.location.pathname.substring(window.location.pathname.lastIndexOf('/') + 1)); imageWrapper.append(picture); - const img = picture.querySelector('img'); - const ratio = (parseInt(img.height, 10) / parseInt(img.width, 10)) * 100; - picture.style.paddingBottom = `${ratio}%`; const articleInfo = document.createElement('div'); articleInfo.classList.add('article-info'); const categoryLink = block.querySelector('p.category').innerText;