2024-11-11
This commit is contained in:
parent
93eb97e446
commit
6666959f16
526 changed files with 20767 additions and 2690 deletions
16
script.js
16
script.js
|
|
@ -1,5 +1,5 @@
|
|||
function setupBrand() {
|
||||
window.onbeforeunload = function () {
|
||||
window.onbeforeunload = function() {
|
||||
window.scrollTo(0, 0);
|
||||
};
|
||||
let mediaQuery = window.matchMedia("(max-width: 768px)");
|
||||
|
|
@ -50,16 +50,16 @@ function setupBrand() {
|
|||
function isElementInViewport(el) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
return (
|
||||
rect.top >= 0 &&
|
||||
rect.left >= 0 &&
|
||||
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
|
||||
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
|
||||
rect.top >= 0
|
||||
&& rect.left >= 0
|
||||
&& rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)
|
||||
&& rect.right <= (window.innerWidth || document.documentElement.clientWidth)
|
||||
);
|
||||
}
|
||||
|
||||
const brandContainer = document.querySelector(".brand-container");
|
||||
|
||||
brandContainer.addEventListener("click", function () {
|
||||
brandContainer.addEventListener("click", function() {
|
||||
manifesteSlider.next();
|
||||
});
|
||||
|
||||
|
|
@ -111,8 +111,8 @@ function setupBrand() {
|
|||
|
||||
const numberOfSlides = document.querySelectorAll(".manifeste-slider .manifeste-slides").length;
|
||||
const heightPerSlideVH = 100;
|
||||
const totalHeightInVH =
|
||||
numberOfSlides * heightPerSlideVH - (numberOfSlides - 1) * ((scrollThreshold / window.innerHeight) * 50);
|
||||
const totalHeightInVH = numberOfSlides * heightPerSlideVH
|
||||
- (numberOfSlides - 1) * ((scrollThreshold / window.innerHeight) * 50);
|
||||
brandContainer.style.height = `${totalHeightInVH}vh`;
|
||||
|
||||
const links = document.querySelectorAll(".menu-brand a");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue