Repository navigation
Expand file tree
/
Copy path404.html
More file actions
74 lines (74 loc) · 2.36 KB
/
Copy path404.html
File metadata and controls
74 lines (74 loc) · 2.36 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page not found | Adil Kabylda</title>
<script>
(function () {
var saved = localStorage.getItem('theme');
if (saved) {
document.documentElement.setAttribute('data-theme', saved);
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
document.documentElement.setAttribute('data-theme', 'light');
}
})();
</script>
<style>
:root[data-theme="light"] {
--text-color: #484848;
--bg-color: #ffffff;
--link-color: #B22222;
--link-hover: #8e1b1b;
}
:root[data-theme="dark"] {
--text-color: #e0e0e0;
--bg-color: #1a1a1a;
--link-color: #ff6b6b;
--link-hover: #ff8585;
}
* {
font-family: -apple-system, "San Francisco", BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: var(--text-color);
box-sizing: border-box;
}
body {
max-width: 1000px;
margin: auto;
padding: 2em;
background-color: var(--bg-color);
}
a {
color: var(--link-color);
text-decoration: none;
}
a:hover {
color: var(--link-hover);
text-decoration: underline;
}
button {
background: none;
border: none;
cursor: pointer;
font-size: 1.2em;
padding: 5px;
}
</style>
</head>
<body>
<main>
<button onclick="toggleTheme()" aria-label="Toggle colour theme">🌓</button>
<h1>Page not found</h1>
<p>The page you requested does not exist.</p>
<p><a href="/">Return to Adil Kabylda's homepage</a></p>
</main>
<script>
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
}
</script>
</body>
</html>