Skip to content

Commit

Permalink
Fix warning for heights/widths on the footer logo and article list im…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
tonyklapatch committed Jun 14, 2024
1 parent 48c4b66 commit eb32203
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions best-cigars-guide/blocks/article-list/article-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 6 additions & 3 deletions best-cigars-guide/blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit eb32203

Please sign in to comment.