diff --git a/src/routes/racepicks/+page.svelte b/src/routes/racepicks/+page.svelte index 82e401b..5748506 100644 --- a/src/routes/racepicks/+page.svelte +++ b/src/routes/racepicks/+page.svelte @@ -11,8 +11,10 @@ Accordion, AccordionItem, getModalStore, + popup, type ModalSettings, type ModalStore, + type PopupSettings, } from "@skeletonlabs/skeleton"; import type { PageData } from "./$types"; import { @@ -90,6 +92,14 @@ const graphicfallback = (graphic: string | undefined, fallback: string): string => graphic ?? get_by_value(data.graphics, "name", fallback)?.file_url ?? "Invalid"; + const race_popupsettings = (target: string): PopupSettings => { + return { + event: "click", + target: target, + placement: "right", + }; + }; + // Define the background colors the picks will have depending on the raceresult const pxxcolors: string[] = []; pxxcolors[-1] = "auto"; @@ -143,7 +153,6 @@ Race: {formatdate(data.currentrace.racedate)} -
@@ -291,7 +300,10 @@ {#each data.raceresults as result} {@const race = getrace(result.race)} -
+
@@ -300,6 +312,30 @@
+ +
+
+ {#each result.pxxs as pxx, index} + {@const driver = getdriver(pxx)} +
+ P{(race?.pxx ?? -100) - 3 + index}: + + {driver?.code} + +
+ {/each} + + {#each result.dnfs as dnf} + {@const driver = getdriver(dnf)} +
+ DNF: + + {driver?.code} + +
+ {/each} +
+
{/each}
@@ -315,11 +351,11 @@ src={graphicfallback(user.avatar_url, "driver_headshot_template")} imgwidth={AVATAR_WIDTH} imgheight={AVATAR_HEIGHT} - containerstyle="height: 35px; width: 35px;" + containerstyle="height: 40px; width: 40px;" imgclass="bg-surface-400 rounded-full" />