-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (52 loc) · 1.74 KB
/
index.html
File metadata and controls
55 lines (52 loc) · 1.74 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="assets/images/logo.svg" type="image/x-icon">
<link rel="icon" type="image/x-icon" href="assets/images/logo.svg">
<title>Nothing to See Here</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-family: Arial, sans-serif;
background-color: #000;
color: #fff;
}
h1 {
text-align: center;
}
a {
color: #fff;
text-decoration: none;
cursor: pointer;
}
a.white-mode {
color: #000;
}
</style>
</head>
<body>
<h1>Nothing to see here. <a id="i-link" href="#">I</a> just needed a <a id="domain-link">domain</a>.</h1>
<script>
const domainLink = document.getElementById('domain-link');
const iLink = document.getElementById('i-link');
function toggleColors() {
const isBlack = document.body.style.backgroundColor === 'black';
document.body.style.backgroundColor = isBlack ? 'white' : 'black';
document.body.style.color = isBlack ? 'black' : 'white';
domainLink.classList.toggle('white-mode', isBlack);
iLink.classList.toggle('white-mode', isBlack);
}
domainLink.addEventListener('click', toggleColors);
iLink.addEventListener('click', (event) => {
event.preventDefault();
window.location.href = 'https://github.com/SamsungFridgeCoder';
});
</script>
</body>
</html>