some changed

This commit is contained in:
2026-06-25 12:39:58 +01:00
parent fbc181c890
commit 2f3005ba2a
14 changed files with 1701 additions and 1678 deletions

View File

@@ -7,11 +7,16 @@
<svelte:head><link rel="icon" href={favicon} /></svelte:head>
<div class="header goldman align-center flex h-15 w-full">
<div class="header goldman flex h-15 w-full">
<a
class="align-text-middle mx-3 my-1 h-auto content-center rounded-sm border-2 border-solid border-red-500 px-2"
class="align-text-middle justify-left mx-3 my-1 h-auto content-center rounded-sm border-2 border-solid border-red-500 px-2"
href="/">home</a
>
<div class="w-full"></div>
<a
class="align-text-middle justify-right mx-3 my-1 h-auto content-center rounded-sm border-2 border-solid border-red-500 px-2"
href="/login">login</a
>
</div>
{@render children()}

View File

@@ -94,7 +94,7 @@
{#if leaderboard[0]}
{@const team = leaderboard[0]}
<a
href="/team/{team.id}"
href="/"
class="score-box winner"
style="--c:{team.color}"
aria-label="{team.name}, 1st place, {team.points} points"
@@ -127,7 +127,7 @@
<div class="runners-grid" style="--runner-count:{Math.min(leaderboard.length - 1, 5)}">
{#each leaderboard.slice(1) as team, i (team.name)}
<a
href="/team/{team.id}"
href="/"
class="score-box runner"
style="--c:{team.color}"
aria-label="{team.name}, {ordinal(i + 2)} place, {team.points} points"

View File

@@ -62,9 +62,11 @@
{@const event = eventData[0]}
<div class="flex justify-center">
<div class="w-full flex-col px-[5vw] text-center">
{console.log(event)}
<div class="align-text-middle h-10 w-full bg-red-500">{event.name} - {event.division}</div>
div
<div
class="align-text-middle my-7 h-10 w-full rounded-2xl border-2 border-solid border-ctp-surface1"
>
{event.name} - {event.division}
</div>
{#each event.registeredPlayers as bracket, bi}
{#if bi > 0}
<div class="bracket-sep" aria-hidden="true"></div>
@@ -75,7 +77,7 @@
<div class="bracket-vertical-sep"></div>
</div>
{#each bracket.items as player}
<div class="player-box" style="--c:{player.teamColor}">
<div class="player-box h-30" style="--c:{player.teamColor}">
<div class="player-ghost" aria-hidden="true">
<svg viewBox="0 0.1 100 0.6" preserveAspectRatio="none" class="ghost-svg">
<text
@@ -90,7 +92,7 @@
</svg>
</div>
<div class="player-name-wrap" use:marquee>
<span class="marquee-inner">
<span class=" text-xl">
{player.firstName}
{player.lastName}
</span>
@@ -106,4 +108,10 @@
{/each}
</div>
</div>
<div class="mt-10 flex w-full justify-center">
<a
class="flex justify-center rounded border-2 border-solid border-white bg-ctp-surface2 p-4"
href="/event/scoring/{eventId}">Score This Event</a
>
</div>
{/await}

View File

@@ -215,17 +215,21 @@
{:else}
<div class="flex justify-center">
<div class="w-full flex-col px-[2vw] text-center">
<div class="align-text-middle h-10 w-full bg-red-500">
<div
class="align-text-middle my-7 h-10 w-full rounded-2xl border-2 border-solid border-ctp-surface1"
>
{event.name} - {event.division} - scoring
</div>
<button onclick={() => (sortByScore = !sortByScore)}>
{sortByScore ? 'Sort: Score' : 'Sort: Manual'}
</button>
<button class="mb-4 rounded border-2 border-ctp-peach p-2">Start event</button>
<!-- <button onclick={() => (sortByScore = !sortByScore)}> -->
<!-- {sortByScore ? 'Sort: Score' : 'Sort: Manual'} -->
<!-- </button> -->
<div class="flex flex-row justify-center">
<div class="flex w-50 min-w-0 flex-col">
<div class="brackets-name text-bold">some</div>
<div class="brackets-name text-bold">=</div>
{#each Array.from({ length: highestPlayer + 1 }, (_, i) => i) as placement}
<div style="--player-color:white" class="scoring-player-card flex-1">
<div
@@ -307,12 +311,13 @@
}}
/>
{/each}
{#if event.resultPresets[0].averageResults == 1}{/if}
</div>
</div>
<div class="text-sm opacity-60">
avg: {avgScore.toFixed(2)}
</div>
{#if event.resultPresets[0].averageResults == 1}
<div class="text-sm opacity-60">
avg: {avgScore.toFixed(2)}
</div>
{/if}
</div>
{/each}
</div>

View File

@@ -9,12 +9,18 @@
<form method="POST">
<label>
Username
<input name="username" type="text" autocomplete="username" required />
<input class="text-black" name="username" type="text" autocomplete="username" required />
</label>
<label>
Password
<input name="password" type="password" autocomplete="current-password" required />
<input
class="text-black"
name="password"
type="password"
autocomplete="current-password"
required
/>
</label>
{#if form?.message}
@@ -24,7 +30,7 @@
<button type="submit">Log in</button>
</form>
<p class="switch">No account? <a href="/signup">Sign up</a></p>
<!-- <p class="switch">No account? <a href="/signup">Sign up</a></p> -->
</div>
<style>