diff --git a/assets/js/script.js b/assets/js/script.js index b8084d4..20301c3 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -13,8 +13,6 @@ document.addEventListener("DOMContentLoaded", () => { images: document.querySelectorAll("img"), }; - console.log(nodes.images); - // Listeners nodes.burgerBtn.addEventListener("click", () => expandNav(nodes)); nodes.closeNavBtn.addEventListener("click", () => closeNav(nodes)); @@ -23,15 +21,17 @@ document.addEventListener("DOMContentLoaded", () => { jsLink.addEventListener("click", () => (location.href = to)); }); - nodes.images.forEach((image) => { - if (image.complete) { - show(image); - } else { - image.addEventListener("load", () => { + setTimeout(() => { + nodes.images.forEach((image) => { + if (image.complete) { show(image); - }); - } - }); + } else { + image.addEventListener("load", () => { + show(image); + }); + } + }); + }, 100); // Key shortcuts window.addEventListener("keyup", (event) => { diff --git a/site/config/config.php b/site/config/config.php index 5277ef5..b9642d8 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -5,28 +5,15 @@ return [ 'thumbs' => [ 'quality' => 80, 'presets' => [ + 'grid' => 400, 'default' => [ 'width' => 1024, 'format' => 'webp' ], - 'full' => 2048, 'format' => 'webp' + 'full' => 2048, + 'format' => 'webp' ], 'srcsets' => [ - 'default' => [ - '200w' => ['width' => 400], - '400w' => ['width' => 800], - '800w' => ['width' => 1600], - '1024w' => ['width' => 2048], - '1440w' => ['width' => 2880], - '2048w' => ['width' => 4096] - ], - 'webp' => [ - '200w' => ['width' => 400, 'format' => 'webp'], - '400w' => ['width' => 800, 'format' => 'webp'], - '800w' => ['width' => 1600, 'format' => 'webp'], - '1024w' => ['width' => 2048, 'format' => 'webp'], - '1440w' => ['width' => 2880, 'format' => 'webp'], - '2048w' => ['width' => 4096, 'format' => 'webp'] - ] + 'default' => [200, 400, 600, 800, 1024, 1440, 2048], ], ], 'panel' => [ diff --git a/site/snippets/event-card.php b/site/snippets/event-card.php index 081ec87..4cb6a22 100644 --- a/site/snippets/event-card.php +++ b/site/snippets/event-card.php @@ -3,20 +3,21 @@