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
|
// Random Background color
// aboutPage = document.querySelector(".aboutPage")
// function getRandomColor() {
// const letters = "0123456789ABCDEF";
// let color = "#";
// for (let i = 0; i < 6; i++) {
// color += letters[Math.floor(Math.random() * 16)];
// }
// return color;
// }
// function setRandomGradient() {
// const rand3 = Math.floor(Math.random() * 3) + 1;
// if (rand3 === 1) {
// aboutPage.style.background = `linear-gradient(${Math.floor(
// Math.random() * 180
// )}deg, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()})`;
// } else if (rand3 === 2) {
// aboutPage.style.background = `linear-gradient(${Math.floor(
// Math.random() * 180
// )}deg, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}),
// linear-gradient(${Math.floor(
// Math.random() * 180
// )}deg, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()})`;
// } else {
// aboutPage.style.background = `linear-gradient(${Math.floor(
// Math.random() * 180
// )}deg, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}),
// linear-gradient(${Math.floor(
// Math.random() * 180
// )}deg, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}),
// linear-gradient(${Math.floor(
// Math.random() * 180
// )}deg, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()}, ${getRandomColor()})`;
// }
// }
// setRandomGradient();
// Execute setRandomGradient() every 1 minute
// setInterval(setRandomGradient, 60000);
|