forked from washington254/watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.c10090b4.js.map
1 lines (1 loc) · 3.08 KB
/
script.c10090b4.js.map
1
{"version":3,"sources":["assets/js/script.js"],"names":["overlay","document","querySelector","navbar","menuCloseBtn","menuOpenBtn","elemArr","i","length","addEventListener","classList","toggle","navbarLinks","querySelectorAll","header","backTopBtn","window","scrollY","add","remove"],"mappings":"AAAA,YAAY;;AAIZ;AACA;AACA;AAEA,IAAMA,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,gBAAgB,CAAC;AACxD,IAAMC,MAAM,GAAGF,QAAQ,CAACC,aAAa,CAAC,eAAe,CAAC;AACtD,IAAME,YAAY,GAAGH,QAAQ,CAACC,aAAa,CAAC,sBAAsB,CAAC;AACnE,IAAMG,WAAW,GAAGJ,QAAQ,CAACC,aAAa,CAAC,qBAAqB,CAAC;AAEjE,IAAMI,OAAO,GAAG,CAACN,OAAO,EAAEI,YAAY,EAAEC,WAAW,CAAC;AAEpD,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,OAAO,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;EACvCD,OAAO,CAACC,CAAC,CAAC,CAACE,gBAAgB,CAAC,OAAO,EAAE,YAAY;IAC/CN,MAAM,CAACO,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IACjCX,OAAO,CAACU,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;EACpC,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;;AAEA,IAAMC,WAAW,GAAGX,QAAQ,CAACY,gBAAgB,CAAC,gBAAgB,CAAC;AAE/D,KAAK,IAAIN,EAAC,GAAG,CAAC,EAAEA,EAAC,GAAGK,WAAW,CAACJ,MAAM,EAAED,EAAC,EAAE,EAAE;EAC3CK,WAAW,CAACL,EAAC,CAAC,CAACE,gBAAgB,CAAC,OAAO,EAAE,YAAY;IACnDN,MAAM,CAACO,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;IACjCX,OAAO,CAACU,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC;EACpC,CAAC,CAAC;AACJ;;AAMA;AACA;AACA;AACA;;AAEA,IAAMG,MAAM,GAAGb,QAAQ,CAACC,aAAa,CAAC,eAAe,CAAC;AACtD,IAAMa,UAAU,GAAGd,QAAQ,CAACC,aAAa,CAAC,qBAAqB,CAAC;AAEhEc,MAAM,CAACP,gBAAgB,CAAC,QAAQ,EAAE,YAAY;EAC5C,IAAIO,MAAM,CAACC,OAAO,IAAI,GAAG,EAAE;IACzBH,MAAM,CAACJ,SAAS,CAACQ,GAAG,CAAC,QAAQ,CAAC;IAC9BH,UAAU,CAACL,SAAS,CAACQ,GAAG,CAAC,QAAQ,CAAC;EACpC,CAAC,MAAM;IACLJ,MAAM,CAACJ,SAAS,CAACS,MAAM,CAAC,QAAQ,CAAC;IACjCJ,UAAU,CAACL,SAAS,CAACS,MAAM,CAAC,QAAQ,CAAC;EACvC;AACF,CAAC,CAAC","file":"script.c10090b4.js","sourceRoot":"..","sourcesContent":["'use strict';\n\n\n\n/**\n * navbar toggle\n */\n\nconst overlay = document.querySelector(\"[data-overlay]\");\nconst navbar = document.querySelector(\"[data-navbar]\");\nconst menuCloseBtn = document.querySelector(\"[data-nav-close-btn]\");\nconst menuOpenBtn = document.querySelector(\"[data-nav-open-btn]\");\n\nconst elemArr = [overlay, menuCloseBtn, menuOpenBtn];\n\nfor (let i = 0; i < elemArr.length; i++) {\n elemArr[i].addEventListener(\"click\", function () {\n navbar.classList.toggle(\"active\");\n overlay.classList.toggle(\"active\");\n });\n}\n\n/**\n * toggle navbar when any navbar link will be clicked\n */\n\nconst navbarLinks = document.querySelectorAll(\"[data-navlink]\");\n\nfor (let i = 0; i < navbarLinks.length; i++) {\n navbarLinks[i].addEventListener(\"click\", function () {\n navbar.classList.toggle(\"active\");\n overlay.classList.toggle(\"active\");\n });\n}\n\n\n\n\n\n/**\n * add active class on header and back-to-top btn\n * when window will scroll 100px from top\n */\n\nconst header = document.querySelector(\"[data-header]\");\nconst backTopBtn = document.querySelector(\"[data-back-top-btn]\");\n\nwindow.addEventListener(\"scroll\", function () {\n if (window.scrollY >= 100) {\n header.classList.add(\"active\");\n backTopBtn.classList.add(\"active\");\n } else {\n header.classList.remove(\"active\");\n backTopBtn.classList.remove(\"active\");\n }\n});"]}