jahresbericht2017/assets/js/views/layouts/default.js

1 line
1.0 KiB
JavaScript
Raw Normal View History

2024-01-12 13:52:51 +00:00
require(["modernizr","domready!"],function(e){let i=document.querySelector.bind(document),n=(document.querySelectorAll.bind(document),i("body")),t=i(".imprint"),o=i(".imprint-close"),s=i(".imprint-toggle");s.addEventListener("click",function(e){if(e.preventDefault(),t.classList.toggle("invis"),o.classList.toggle("invis"),!t.classList.contains("invis")){let e=t.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"})})}}),o.addEventListener("click",function(e){e.preventDefault(),o.classList.add("invis"),t.classList.add("invis")});let l=i(".mn-trigger"),c=i(".mn-container"),r=i(".real-logo"),d=i(".mn-close");l.addEventListener("click",e=>{c.classList.add("mn-inframe"),n.classList.add("no-scroll"),r.classList.add("no-filter")}),d.addEventListener("click",e=>{c.classList.remove("mn-inframe"),n.classList.remove("no-scroll"),r.classList.remove("no-filter")})});