This commit is contained in:
Chaoscaot
2023-10-01 10:04:04 +02:00
parent 7728d9e177
commit e0f2702eca
49 changed files with 2589 additions and 68 deletions

View File

@ -0,0 +1,22 @@
<script lang="ts">
import {Card} from "flowbite-svelte";
import {link} from 'svelte-spa-router'
import type {ShortEvent} from "../../types/event.js";
export let event: ShortEvent;
$: sameDate = new Intl.DateTimeFormat().format(event.start) === new Intl.DateTimeFormat().format(event.end);
</script>
<a href="/event/{event.id}" use:link>
<Card class="hover:scale-105 transition">
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{event.name}</h5>
{#if !sameDate}
<p>Startet: {new Intl.DateTimeFormat().format(event.start)}</p>
<p>Endet: {new Intl.DateTimeFormat().format(event.end)}</p>
{:else}
<p>Am: {new Intl.DateTimeFormat().format(event.start)}</p>
<p>&nbsp;</p>
{/if}
</Card>
</a>