Skip to content

Commit 125577a

Browse files
committed
More UI tweaking
1 parent 46776ad commit 125577a

2 files changed

Lines changed: 35 additions & 21 deletions

File tree

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
11
<script lang="ts">
2-
import Container from '$lib/components/Container.svelte';
2+
import { metaApi } from '$lib/api';
3+
import { handleApiError } from '$lib/errorhandling/apiErrorHandling';
4+
import { onMount } from 'svelte';
5+
6+
let deviceCount = $state(0);
7+
8+
onMount(async () => {
9+
try {
10+
const { data } = await metaApi.publicGetOnlineDevicesStatistics();
11+
deviceCount = data.devicesOnline;
12+
} catch (err) {
13+
handleApiError(err);
14+
}
15+
});
316
</script>
417

5-
<Container>
6-
<div class="flex flex-col">
7-
<h1 class="text-5xl leading-none font-bold text-gray-800 dark:text-white">
8-
Welcome to <span class="text-blue-600">OpenShock</span>
9-
</h1>
10-
<p class="text-2xl font-light text-gray-600">[Put a slogan here]</p>
11-
<div class="mt-8 flex flex-row items-center justify-start space-x-4">
12-
<a href="signup" class="rounded bg-blue-600 px-4 py-2 font-bold text-white hover:bg-blue-700">
13-
Get Started
14-
</a>
15-
<a
16-
href="https://wiki.openshock.org/"
17-
class="rounded bg-gray-200 px-4 py-2 font-bold text-gray-700 hover:bg-gray-300"
18-
>
19-
Documentation
20-
</a>
21-
</div>
18+
<section
19+
class="flex flex-col items-center justify-center h-full text-white text-center space-y-6 px-6"
20+
>
21+
<span class="flex">
22+
<img class="h-20 pr-4" src="/IconSpinning.svg" alt="logo" />
23+
<img class="h-20" src="/LogoBakedFont.svg" alt="logo" />
24+
</span>
25+
<p class="text-lg md:text-2xl opacity-75">
26+
The go-to platform for safe, reliable, real low-latency remote shocking.<br />
27+
<span class="font-semibold">{deviceCount}</span> people online right now.
28+
</p>
29+
<div class="flex space-x-4 pt-8 text-sm opacity-75">
30+
<a href="https://openshock.org" target="_blank" rel="noopener" class="hover:underline">
31+
Learn More
32+
</a>
33+
<span>·</span>
34+
<a href="https://wiki.openshock.org" target="_blank" rel="noopener" class="hover:underline">
35+
Wiki
36+
</a>
2237
</div>
23-
<div class="placeholder h-3/4 w-1/2 rounded-none"></div>
24-
</Container>
38+
</section>

src/routes/(anonymous)/login/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@
7777

7878
<Button type="submit" disabled={!canSubmit}>Log In</Button>
7979

80-
<a class="text-blue-500 underline" href="/forgot-password">I forgot my password</a>
80+
<a class=" text-sm opacity-75 hover:underline" href="/forgot-password">Forgot your password?</a>
8181
</form>
8282
</Container>

0 commit comments

Comments
 (0)