+21
-1
src/App.svelte
+21
-1
src/App.svelte
···
9
9
10
10
let posts: Post[] = [];
11
11
12
+
let hue: number = 1;
13
+
const cycleColors = async () => {
14
+
while (true) {
15
+
hue += 1;
16
+
if (hue > 360) {
17
+
hue = 0;
18
+
}
19
+
document.documentElement.style.setProperty("--primary-h", hue.toString());
20
+
await new Promise((resolve) => setTimeout(resolve, 10));
21
+
}
22
+
}
23
+
let clickCounter = 0;
24
+
const carameldansenfusion = async () => {
25
+
clickCounter++;
26
+
if (clickCounter >= 10) {
27
+
clickCounter = 0;
28
+
cycleColors();
29
+
}
30
+
};
31
+
12
32
onMount(() => {
13
33
// Fetch initial posts
14
34
getNextPosts().then((initialPosts) => {
···
39
59
<p>Loading...</p>
40
60
{:then accountsData}
41
61
<div id="Account">
42
-
<h1 id="Header">ATProto PDS</h1>
62
+
<h1 onclick={carameldansenfusion} id="Header">ATProto PDS</h1>
43
63
<p>Home to {accountsData.length} accounts</p>
44
64
<div id="accountsList">
45
65
{#each accountsData as accountObject}