!function(){ }(); /* // --height-with-ui | for fullscreen-intro on android and ios !function(){ var lastHeight = null; function check(){ var height = window.innerHeight; if (lastHeight !== null) { height = Math.abs(height - lastHeight) > 60 ? height : lastHeight; // grösser oder kleiner geworden um mehr als 60 px } lastHeight = height; document.documentElement.style.setProperty('--height-with-ui', height+'px'); }; check(); addEventListener('resize',check); //requestAnimationFrame(check); //document.addEventListener('DOMContentLoaded',check); }(); // ussage: max-height:var(--height-with-ui); */ !function(){ // --height-with-ui | for fullscreen-intro on android and ios //var lastHeight = null; function check(){ /* var height = window.innerHeight; if (lastHeight !== null) { height = Math.abs(height - lastHeight) > 60 ? height : lastHeight; // grösser oder kleiner geworden um mehr als 60 px } lastHeight = height; */ // document.documentElement.style.setProperty('--height-with-ui', height+'px'); var head = document.getElementById('head'); if (!head) return; //var headHeight = head.offsetHeight; var navSectionHeight = document.getElementById('headWrapper').offsetHeight; //var slider = document.getElementById('slider'); //var wrapper = slider.c1Find('.-wrapper'); //wrapper.style.maxHeight = 'calc(100vh - '+(headHeight+navSectionHeight+height)+'px)'; //wrapper.style.maxHeight = height - (headHeight+navSectionHeight) + 'px'; document.documentElement.c1_scroll_padding_top = navSectionHeight; }; check(); addEventListener('resize',check); requestAnimationFrame(check); //setTimeout(check, 400); document.addEventListener('DOMContentLoaded',check); /* sticky navigation * var isEdge = /Edge/.test(navigator.userAgent); if (isEdge || !window.CSS || !CSS.supports || (!CSS.supports('position', 'sticky') && !CSS.supports('position', '-webkit-sticky'))) { console.log('sticky alternative') addEventListener('scroll',function(){ var nav = document.getElementById('nav_section'); var placeholder = document.getElementById('nav_section_placeholder'); var slider = document.getElementById('slider'); var sliderBottom = slider.getBoundingClientRect().bottom; if (sliderBottom <= 0) { nav.style.position = 'fixed'; nav.style.left = '0'; nav.style.right = '0'; placeholder.style.height = nav.offsetHeight+'px'; } else { nav.style.position = 'static'; placeholder.style.height = '0'; } }) } /**/ }();