-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (29 loc) · 1.1 KB
/
script.js
File metadata and controls
33 lines (29 loc) · 1.1 KB
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
document.addEventListener("DOMContentLoaded", () => {
const aboutBtn = document.querySelector(".about-btn");
aboutBtn.style.background = "linear-gradient(90deg, #6a11cb, #2575fc)";
});
function changeBackground(color) {
document.body.style.backgroundColor = color;
const aboutBtn = document.querySelector(".about-btn");
switch (color) {
case "#f5f984ff":
aboutBtn.style.background = "linear-gradient(90deg, #f9d423, #ff4e50)";
break;
case "#00b894":
aboutBtn.style.background = "linear-gradient(90deg, #2ed867ff, #13dfbaff)";
break;
case "#7777ff":
aboutBtn.style.background = "linear-gradient(90deg, #6a11cb, #2575fc)";
break;
default:
aboutBtn.style.background = "linear-gradient(90deg, #6a11cb, #2575fc)";
}
}
function showAbout() {
document.getElementById('home-view').style.display = 'none';
document.getElementById('about-view').style.display = 'block';
}
function goBack() {
document.getElementById('about-view').style.display = 'none';
document.getElementById('home-view').style.display = 'block';
}