From 0f6870344f050a9bf52ba8edd5f415826183cd7e Mon Sep 17 00:00:00 2001 From: George Powell Date: Sun, 4 Jan 2026 01:25:49 -0500 Subject: [PATCH] major styling and spacing --- src/lib/components/Container.svelte | 16 +++ src/lib/components/CountdownTimer.svelte | 134 +++++++++++----------- src/lib/components/Feedback.svelte | 20 ++-- src/lib/components/SearchInput.svelte | 94 ++++++++------- src/lib/components/VerseDisplay.svelte | 9 +- src/lib/components/WinScreen.svelte | 138 ++++++++++++----------- src/routes/+page.svelte | 43 +++---- todo.md | 9 +- 8 files changed, 249 insertions(+), 214 deletions(-) create mode 100644 src/lib/components/Container.svelte diff --git a/src/lib/components/Container.svelte b/src/lib/components/Container.svelte new file mode 100644 index 0000000..b4d9674 --- /dev/null +++ b/src/lib/components/Container.svelte @@ -0,0 +1,16 @@ + + +
+ {@render children()} +
diff --git a/src/lib/components/CountdownTimer.svelte b/src/lib/components/CountdownTimer.svelte index e873ff7..8390bc0 100644 --- a/src/lib/components/CountdownTimer.svelte +++ b/src/lib/components/CountdownTimer.svelte @@ -1,90 +1,88 @@ -
-
-

- Next Verse In -

-

- {timeUntilNext} -

-
+
+
+

+ Next Verse In +

+

+ {timeUntilNext} +

+
diff --git a/src/lib/components/Feedback.svelte b/src/lib/components/Feedback.svelte index 81530c9..35b59c5 100644 --- a/src/lib/components/Feedback.svelte +++ b/src/lib/components/Feedback.svelte @@ -1,5 +1,5 @@ -
-
-

- A project by George Powell & Silent Summit Co. -

- -
+
diff --git a/src/lib/components/SearchInput.svelte b/src/lib/components/SearchInput.svelte index efc3f32..2eb9cad 100644 --- a/src/lib/components/SearchInput.svelte +++ b/src/lib/components/SearchInput.svelte @@ -1,55 +1,53 @@ -
- - {#if searchQuery && filteredBooks.length > 0} - - {:else if searchQuery} -

No books found

- {/if} +
+ + {#if searchQuery && filteredBooks.length > 0} +
    + {#each filteredBooks as book (book.id)} +
  • + +
  • + {/each} +
+ {:else if searchQuery} +

No books found

+ {/if}
diff --git a/src/lib/components/VerseDisplay.svelte b/src/lib/components/VerseDisplay.svelte index e045399..54a27b8 100644 --- a/src/lib/components/VerseDisplay.svelte +++ b/src/lib/components/VerseDisplay.svelte @@ -1,5 +1,6 @@ -
+
{displayVerseText}
{#if isWon} -

+

{displayReference}

{/if} -
+ diff --git a/src/lib/components/WinScreen.svelte b/src/lib/components/WinScreen.svelte index 487a634..79e8eb8 100644 --- a/src/lib/components/WinScreen.svelte +++ b/src/lib/components/WinScreen.svelte @@ -2,6 +2,8 @@ import { fade } from "svelte/transition"; import { getBookById, toOrdinal, getNextGradeMessage } from "$lib/utils/game"; import { onMount } from "svelte"; + import Container from "./Container.svelte"; + import CountdownTimer from "./CountdownTimer.svelte"; interface StatsData { solveRank: number; @@ -36,7 +38,7 @@ const congratulationsMessages: WeightedMessage[] = [ { text: "Congratulations!", weight: 10 }, { text: "You got it!", weight: 1000 }, - { text: "Yup,", weight: 100 }, + { text: "Yup.", weight: 100 }, { text: "Very nice!", weight: 1 }, ]; @@ -73,75 +75,81 @@ let congratulationsMessage = $derived(getRandomCongratulationsMessage()); -
- -

- {congratulationsMessage} The verse is from - {bookName}. -

-

+ - Your grade: {grade} -

+

+ {congratulationsMessage} The verse is from + {bookName}. +

+

+ You guessed correctly after {guessCount} + {guessCount === 1 ? "guess" : "guesses"}. + {grade} +

- {#if hasWebShare} - - - {:else} - - {/if} +
+ {#if hasWebShare} + + + + {:else} + + + {/if} +
-

- {getNextGradeMessage(guessCount)} -

+

+ {getNextGradeMessage(guessCount)} +

+ + + {#if statsData} -
-
+ +
#{statsData.solveRank}
-
+
You were the {toOrdinal(statsData.solveRank)} person to solve today
@@ -155,7 +163,7 @@ 100 )}%
-
+
You ranked {toOrdinal(statsData.guessRank)} of {statsData.totalSolves} total solves
@@ -166,15 +174,19 @@
{statsData.averageGuesses}
-
+
People guessed correctly after {statsData.averageGuesses} {statsData.averageGuesses === 1 ? "guess" : "guesses"} on average
-
+
{:else if !statsSubmitted} -
Submitting stats...
+ +
Submitting stats...
+
{/if}
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5e09c86..1305e5b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -7,7 +7,6 @@ import VerseDisplay from "$lib/components/VerseDisplay.svelte"; import SearchInput from "$lib/components/SearchInput.svelte"; import GuessesTable from "$lib/components/GuessesTable.svelte"; - import CountdownTimer from "$lib/components/CountdownTimer.svelte"; import WinScreen from "$lib/components/WinScreen.svelte"; import Feedback from "$lib/components/Feedback.svelte"; import TitleAnimation from "$lib/components/TitleAnimation.svelte"; @@ -408,28 +407,30 @@ >
- +
+ - {#if !isWon} - - {:else} - - - {/if} + {#if !isWon} + + {:else} + + {/if} - - {#if isWon} - - {/if} + + + {#if isWon} + + {/if} +
{#if isDev}