Updated the page style
This commit is contained in:
parent
26ed07ba42
commit
762458c88d
9 changed files with 738 additions and 200 deletions
30
scripts/web.js
Normal file
30
scripts/web.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
!(function () {
|
||||
const e = document,
|
||||
t = e.documentElement,
|
||||
n = e.body,
|
||||
i = e.getElementById("lights-toggle"),
|
||||
s = (window.sr = ScrollReveal());
|
||||
function a() {
|
||||
let e = i.parentNode.querySelector(".label-text");
|
||||
i.checked
|
||||
//? (n.classList.remove("lights-off"), e && (e.innerHTML = "dark"))
|
||||
? (n.classList.add("lights-off"), e && (e.innerHTML = "light"))
|
||||
: (n.classList.add("lights-off"), e && (e.innerHTML = "light"));
|
||||
}
|
||||
t.classList.remove("no-js"),
|
||||
t.classList.add("js"),
|
||||
window.addEventListener("load", function () {
|
||||
n.classList.add("is-loaded");
|
||||
}),
|
||||
n.classList.contains("has-animations") &&
|
||||
window.addEventListener("load", function () {
|
||||
s.reveal(".feature", {
|
||||
duration: 600,
|
||||
distance: "20px",
|
||||
easing: "cubic-bezier(0.215, 0.61, 0.355, 1)",
|
||||
origin: "right",
|
||||
viewFactor: 0.2,
|
||||
});
|
||||
}),
|
||||
i && (window.addEventListener("load", a), i.addEventListener("change", a));
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue