Compare commits

..

No commits in common. "b8f271fdb20cd005b330c0679baa671daa65903d" and "3a71072bc98976421ba8b2e892a04c306cf1c836" have entirely different histories.

3 changed files with 2 additions and 36 deletions

View File

@ -1,27 +0,0 @@
<script lang="ts">
const { date }: { date: Date } = $props();
const difference = new Date().getTime() / 1000 - date.getTime() / 1000;
const seconds = ~~(difference % 60);
const minutes = ~~(difference / 60) % 60;
const hours = ~~(difference / 3600) % 24;
const days = ~~(difference / 86400);
</script>
<p class="group underline">
<span class="group-hover:hidden">
about
{#if minutes == 0}
<span>{seconds}s</span>
{:else if hours == 0}
<span>{minutes}m</span>
{:else if days == 0}
<span>{hours}h</span>
{:else}
<span>{days}d</span>
{/if}
ago
</span>
<span class="hidden group-hover:block">
{date.toLocaleString()}
</span>
</p>

View File

@ -1,14 +1,8 @@
<footer class="bg-medium"> <footer class="bg-medium">
<div class="mx-auto flex w-full max-w-screen-xl flex-col p-4 md:flex-row md:justify-between"> <div class="mx-auto w-full max-w-screen-xl p-4">
<p> <p>
made with <a href="https://svelte.dev/">sveltekit</a>, powered by made with <a href="https://svelte.dev/">sveltekit</a>, powered by
<a href="https://cloudflare.com/">cloudflare</a> <a href="https://cloudflare.com/">cloudflare</a>
</p> </p>
<p>
you can find the repo of the website <a href="https://tea.metatable.sh/meta/yukiotoko-webui"
>here</a
>
</p>
</div> </div>
</footer> </footer>

View File

@ -5,7 +5,6 @@
import GameVersion from './GameVersion.svelte'; import GameVersion from './GameVersion.svelte';
import Separator from './Separator.svelte'; import Separator from './Separator.svelte';
import type { Room } from './types'; import type { Room } from './types';
import Date from './Date.svelte';
let { room }: { room: Room } = $props(); let { room }: { room: Room } = $props();
@ -44,7 +43,7 @@
{room.players.length} / 4 {room.players.length} / 4
<Separator /> <Separator />
<Calendar class="inline-block w-6" /> <Calendar class="inline-block w-6" />
<Date date={room.createdAt} /> {room.createdAt.toLocaleString()}
</p> </p>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 sm:grid-rows-2"> <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 sm:grid-rows-2">