diff --git a/.eslintrc.json b/.eslintrc.json index a1a2d0a..e66b0f7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -37,10 +37,6 @@ "error", 4 ], - "linebreak-style": [ - "error", - "unix" - ], "quotes": [ "error", "double" diff --git a/src/components/event/TeamList.svelte b/src/components/event/TeamList.svelte new file mode 100644 index 0000000..aee3aae --- /dev/null +++ b/src/components/event/TeamList.svelte @@ -0,0 +1,54 @@ + + +
+

Angemeldete Teams

+
+ {#each teams as team} +
+ {team.kuerzel} + + {team.name} + +
+ {/each} + {#if teams.length === 0} +

Keine Teams angemeldet.

+ {/if} +
+
diff --git a/src/pages/events/[slug].astro b/src/pages/events/[slug].astro index 54cc9c2..07ee7bb 100644 --- a/src/pages/events/[slug].astro +++ b/src/pages/events/[slug].astro @@ -4,6 +4,7 @@ import PageLayout from "@layouts/PageLayout.astro"; import { astroI18n, createGetStaticPaths } from "astro-i18n"; import { getCollection, type CollectionEntry } from "astro:content"; import EventFights from "@components/event/EventFights.svelte"; +import TeamList from "@components/event/TeamList.svelte"; export const getStaticPaths = createGetStaticPaths(async () => { const events = await Promise.all( @@ -27,25 +28,6 @@ export const getStaticPaths = createGetStaticPaths(async () => { const { event, page } = Astro.props as { event: ExtendedEvent; page: CollectionEntry<"events"> }; const { Content } = await page.render(); - -const colorMap: Record = { - "0": "#000000", - "1": "#0000AA", - "2": "#00AA00", - "3": "#00AAAA", - "4": "#AA0000", - "5": "#AA00AA", - "6": "#FFAA00", - "7": "#AAAAAA", - "8": "#555555", - "9": "#5555FF", - a: "#55FF55", - b: "#55FFFF", - c: "#FF5555", - d: "#FF55FF", - e: "#FFFF55", - f: "#FFFFFF", -}; --- @@ -73,23 +55,7 @@ const colorMap: Record = {
- { - event.teams.length > 0 && ( -
-

Angemeldete Teams

-
- {event.teams.map((team) => ( -
- {team.kuerzel} - - {team.name} - -
- ))} -
-
- ) - } + { page.data.viewConfig && (