-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.html
164 lines (155 loc) · 5.94 KB
/
settings.html
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<meta name="author" content="Andrew Blake" />
<meta name="Description" content="Information about clubs in Katikati college." />
<title>KKC clubs</title>
<script src="script.js"></script>
<link href="css.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet" />
<meta name="theme-color" content="#0094ff" />
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon.png" />
<style>
/* transition css for dark theme toggle */
.bodyText {
transition: background 0.15s ease;
}
.navbar {
transition: background 0.15s ease;
}
p,
h1,
h2,
h3,
th,
td {
transition: color 0.15s ease;
}
tr:nth-child(even) {
transition: background-color 0.15s ease;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", (event) => {
startSettings();
});
function toggleTheme() {
// sets site theme
const themePref = localStorage.getItem("themePref");
if (themePref == "dark") {
light();
localStorage.setItem("themePref", "light");
} else {
dark();
localStorage.setItem("themePref", "dark");
}
}
function startSettings() {
// sets toggle button state
const themePref = localStorage.getItem("themePref");
if (themePref == "dark") {
document.getElementById("themeSwitch").checked = true;
} else {
document.getElementById("themeSwitch").checked = false;
}
document.getElementById(bgPref).checked = true;
}
</script>
</head>
<body>
<div id="myNavbar" class="navbar"></div>
<div class="wrapper">
<a href="index.html" class="titleRow">
<img src="img/favicon.png" />
<h1>KKC clubs</h1>
</a>
<div class="bodyContainer">
<div class="bodyText" style="min-width: 86%">
<h2 style="display: inline-block; margin: 0.6vh 0 0 0">Dark theme</h2>
<input class="tgl tgl-skewed" aria-label="Dark theme" type="checkbox" id="themeSwitch" onclick="toggleTheme()" />
<label class="tgl-btn" data-tg-off="OFF" data-tg-on="ON" for="themeSwitch"></label>
</div>
<div class="bodyText">
<h2>Theme</h2>
<div class="selectorContainer">
<input onclick="bgSelector('default')" type="radio" name="bg" id="default" class="input-hidden" />
<label for="default">
<div class="default selector"></div>
</label>
<input onclick="bgSelector('mint')" type="radio" name="bg" id="mint" class="input-hidden" />
<label for="mint">
<div class="mint selector"></div>
</label>
<input onclick="bgSelector('evening')" type="radio" name="bg" id="evening" class="input-hidden" />
<label for="evening">
<div class="evening selector"></div>
</label>
<input onclick="bgSelector('rain')" type="radio" name="bg" id="rain" class="input-hidden" />
<label for="rain">
<div class="rain selector"></div>
</label>
<input onclick="bgSelector('charcoal')" type="radio" name="bg" id="charcoal" class="input-hidden" />
<label for="charcoal">
<div class="charcoal selector"></div>
</label>
</div>
<br />
</div>
<div class="bodyText">
<h2 style="border-bottom: 2px solid var(--accentBlue)">Playground</h2>
<a style="color: var(--mainText); font-size: 125%; transition: color 0.15s ease;" href="#" onclick="createUIPrompt('This can say anything 🔥')">Example notification</a>
<br />
<p>todo: List of references with links to the sources from where you took help</p>
<p>todo: comments</p>
</div>
<div class="bodyText">
<h2>Example table</h2>
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
</div>
<div class="bodyText">
<h2>Sign in to access more settings</h2>
<div class="form__group">
<input type="text" class="form__field" placeholder="Username" name="uername" id="username" required />
<label for="username" class="form__label">Username</label>
</div>
<div class="form__group">
<input type="password" class="form__field" placeholder="Password" name="password" id="password" required />
<label for="password" class="form__label">Password</label>
</div>
<input type="submit" value="Submit" onclick="createUIPrompt('Signed in (not really)')"/>
</div>
</div>
</div>
<footer>
<div>
<a href="https://github.com/andrewthegreat5/andrewthegreat5.github.io" target="_blank" rel="noopener">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="42" height="42" viewbox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" style="float: left">
<path stroke="none" d="M0 0h24v24H0z" />
<path d="M9 19c-4.286 1.35-4.286-2.55-6-3m12 5v-3.5c0-1 .099-1.405-.5-2 2.791-.3 5.5-1.366 5.5-6.04a4.567 4.567 0 0 0 -1.333 -3.21 4.192 4.192 0 00-.08-3.227s-1.05-.3-3.476 1.267a12.334 12.334 0 0 0 -6.222 0C6.462 2.723 5.413 3.023 5.413 3.023a4.192 4.192 0 0 0 -.08 3.227A4.566 4.566 0 004 9.486c0 4.64 2.709 5.68 5.5 6.014-.591.589-.56 1.183-.5 2V21" />
</svg>
GitHub
</a>
<p>Version 6.4.0</p>
<p>Author: Andrew Blake</p>
</div>
</footer>
</body>
</html>