blob: 5bcf34542605dbda384b92c3c853385b2708b458 (
plain) (
blame)
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
|
<script>
// @ts-nocheck
/* hitler-clicer
* landing page
* © 2025 hitler.rip <git@hitler.rip>
* licensed under AGPLv3-or-later; see licenses/code.md for more information
*/
import { slide, scale } from 'svelte/transition';
import { page } from '$app/state';
import Login from '$lib/login.svelte';
let axis = $state(0);
let allies = $state(0);
let soviets = $state(0);
const timer = ms => new Promise(response => setTimeout(response, ms))
async function getstats() {
fetch("http://localhost:8000/index.php").then((response) => {
return response.json().then((data) => {
if (data) {
axis = Number(data.axis.clicks);
allies = Number(data.allies.clicks);
soviets = Number(data.soviet.clicks);
}
})
})
await timer(3000);
getstats();
}
getstats();
</script>
<svelte:head>
<link rel="icon" type="image/png" href="hitler-idle.png" />
</svelte:head>
<main class="
flex flex-col items-center justify-center my-10 mx-15 text-center
">
<h1 class="text-6xl font-bold my-5">Welcome to Hitler Clicker!</h1>
<p class="text-2xl">a stupid game where you have to click in order to score points for your team</p>
<h2 class="text-3xl font-bold mt-5 text-amber-900 dark:text-amber-700">࿕ Axis ࿕</h2>
{#key axis}
<div transition:slide>
<h3 class="text-3xl font-bold mb-2 text-amber-900 dark:text-amber-700">{axis}</h3>
</div>
{/key}
<h2 class="text-3xl font-bold mt-5 text-sky-700 dark:text-sky-400">⊙ Allies ⊙</h2>
{#key allies}
<div transition:slide>
<h3 class="text-3xl font-bold mb-2 text-sky-700 dark:text-sky-400">{allies}</h3>
</div>
{/key}
<h2 class="text-3xl font-bold mt-5 text-red-800 dark:text-red-600">☭ Soviets ☭</h2>
{#key soviets}
<div transition:slide>
<h3 class="text-3xl font-bold mb-5 text-red-800 dark:text-red-600">{soviets}</h3>
</div>
{/key}
</main>
<section class="flex items-center justify-center">
<button class="
py-5 px-10
bg-amber-300 dark:bg-amber-300 text-stone-900
hover:bg-amber-400 hover:dark:bg-amber-400
active:translate-y-0.5 active:shadow-none
border-2 border-amber-500
font-bold text-2xl
rounded-2xl
shadow-sm shadow-amber-500
" onclick={() => {
window.location.href = `rank`;
}}>Leaderboard</button>
</section>
<Login />
<footer class="flex flex-col items-center justify-center text-center my-15 mx-25 mx-0">
<hr class="text-neutral-400 dark:text-neutral-700 w-[90%] max-w-[90%] md:w-1/2 md:max-w-1/2 mb-3" />
<span class="text-md text-neutral-400 dark:text-neutral-700">
© 2025 hitler.rip <web@hitler.rip><br />
licensed under <a href="https://www.gnu.org/licenses/agpl-3.0-standalone.html" target="_blank" rel="noopener noreferrer" class="text-neutral-400 dark:text-neutral-700 underline">AGPv3-or-later</a>
</span>
</footer>
|