This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
javascript.js
51 lines (45 loc) · 1.66 KB
/
javascript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
window.addEventListener('resize', sizeChanged);
document.addEventListener('keydown', (e) => {
if (e.code === "ArrowRight") {
window.open(document.getElementById("next").href, "_self")
}
else if (e.code === "ArrowLeft") {
window.open(document.getElementById("previous").href, "_self")
}
});
function sizeChanged() {
if (document.documentElement.clientWidth > 760) {
document.getElementById("sideButton").style.marginLeft = "";
document.getElementById("sidenavLeft").style.width = "";
document.getElementById("paypalMenu").style.display = "none";
}
}
function toggleNav() {
if (document.getElementById("sidenavLeft").style.width == 0) {
document.getElementById('sideButton').classList.add('pressed');
document.getElementById("sidenavLeft").style.width = "23.5em";
}
else {
document.getElementById("sidenavLeft").style.width = "";
document.getElementById('sideButton').classList.remove('pressed');
document.getElementById("paypalMenu").style.display = "none";
}
}
function titleGlow(enable) {
if (enable) {
document.getElementById("title").classList.add("glow");
document.getElementById("backdrop").classList.add("blur");
}
else {
document.getElementById("title").classList.remove("glow");
document.getElementById("backdrop").classList.remove("blur");
}
}
function toggleDonationMenu() {
if (document.getElementById("paypalMenu").style.display == "none") {
document.getElementById("paypalMenu").style.display = "block";
}
else {
document.getElementById("paypalMenu").style.display = "none";
}
}