0
Skip to Content
ASPEKT
ASPEKT
ASPEKT
ASPEKT
ASPEKT
87bf5e39-899e-4fba-8749-4a367224e7d0.jpeg
dc572f46-d433-4e52-b809-e1fb9dbf13e9.jpeg
0b186598-e7f4-455e-a8d1-df5b3cb00599.jpeg
388ca938-1588-4a32-885a-bfd3d0d23d42.jpeg
Nike EU.png
document.addEventListener("DOMContentLoaded", function() { // Create a logo image element var logoImg = document.createElement("img"); // Set the source of the image logoImg.src = "https://static1.squarespace.com/static/5e4e47ce9bf2bf37590e40d2/t/65cda73b2cf50935b65e75b8/1707976507765/aspectLogo+web.png"; logoImg.alt = "Logo"; // Alt text for accessibility logoImg.id = "custom-logo"; // Assign an ID for styling // Append the image to the body document.body.appendChild(logoImg); // Get the gallery container var galleryContainer = document.getElementById("collection-65ccb04310e1515abbde9c07"); // Add scroll event listener window.addEventListener("scroll", function() { var scrollPosition = window.pageYOffset || document.documentElement.scrollTop; // Calculate the maximum scroll position until the logo reaches the footer var maxScroll = galleryContainer.offsetTop + galleryContainer.offsetHeight - window.innerHeight; // Calculate the position of the logo relative to the gallery container var logoPosition = scrollPosition - galleryContainer.offsetTop; // If the logo is within the gallery container if (scrollPosition <= maxScroll) { logoImg.style.position = "absolute"; logoImg.style.top = logoPosition + "px"; } else { logoImg.style.position = "fixed"; logoImg.style.top = maxScroll + "px"; } }); });