1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
"use strict";require(["require/domReady!"],function(){let e=document.querySelector(".imprint-toggle"),t=document.querySelector(".imprint-close"),o=document.querySelector(".imprint");e.addEventListener("click",function(e){if(e.preventDefault(),o.classList.toggle("invis"),t.classList.toggle("invis"),!o.classList.contains("invis")){let e=o.getBoundingClientRect();"scrollBehavior"in document.documentElement.style?window.scrollTo({top:window.pageYOffset+e.top-40,behavior:"smooth"}):require(["smoothscroll"],function(){window.scrollTo({top:window.pageYOffset+e.top-40,behavior:"smooth"})})}}),t.addEventListener("click",function(e){e.preventDefault(),t.classList.add("invis"),o.classList.add("invis")});let i=document.querySelector(".mn-container"),n=document.querySelector(".real-logo"),s=document.querySelector(".mn-trigger"),c=document.querySelector(".mn-close");s.addEventListener("click",()=>{i.classList.add("mn-inframe"),document.body.classList.add("no-scroll"),n.classList.add("no-filter")}),c.addEventListener("click",()=>{i.classList.remove("mn-inframe"),document.body.classList.remove("no-scroll"),n.classList.remove("no-filter")})}); |