replaced trailing punctuation in verses with ellipses

This commit is contained in:
George Powell
2026-01-05 18:12:10 -05:00
parent 1b1bc7bd3c
commit cb11d793f6
2 changed files with 46 additions and 32 deletions

View File

@@ -1,36 +1,38 @@
<script lang="ts"> <script lang="ts">
import type { PageData } from "../../routes/$types.js"; // Approximate type; adjust if needed import type { PageData } from "../../routes/$types.js"; // Approximate type; adjust if needed
import Container from "./Container.svelte"; import Container from "./Container.svelte";
let { let {
data, data,
isWon, isWon,
blurChapter = false, blurChapter = false,
}: { data: PageData; isWon: boolean; blurChapter?: boolean } = $props(); }: { data: PageData; isWon: boolean; blurChapter?: boolean } = $props();
let dailyVerse = $derived(data.dailyVerse); let dailyVerse = $derived(data.dailyVerse);
let displayReference = $derived( let displayReference = $derived(
blurChapter blurChapter
? dailyVerse.reference ? dailyVerse.reference
.replace(/^Psalms /, "Psalm ") .replace(/^Psalms /, "Psalm ")
.replace(/\s(\d+):/, " ?:") .replace(/\s(\d+):/, " ?:")
: dailyVerse.reference.replace(/^Psalms /, "Psalm ") : dailyVerse.reference.replace(/^Psalms /, "Psalm "),
); );
let displayVerseText = $derived( let displayVerseText = $derived(
dailyVerse.verseText.replace(/^([a-z])/, (c) => c.toUpperCase()) dailyVerse.verseText
); .replace(/^([a-z])/, (c) => c.toUpperCase())
.replace(/[,:;-—]$/, "..."),
);
</script> </script>
<Container class="w-full p-8 sm:p-12 bg-white/70"> <Container class="w-full p-8 sm:p-12 bg-white/70">
<blockquote <blockquote
class="text-xl sm:text-2xl font-triodion leading-relaxed text-gray-700 text-center" class="text-xl sm:text-2xl font-triodion leading-relaxed text-gray-700 text-center"
> >
{displayVerseText} {displayVerseText}
</blockquote> </blockquote>
{#if isWon} {#if isWon}
<p <p
class="text-center text-lg! big-text text-green-600! font-bold mt-8 bg-white/70 rounded-xl px-4 py-2" class="text-center text-lg! big-text text-green-600! font-bold mt-8 bg-white/70 rounded-xl px-4 py-2"
> >
{displayReference} {displayReference}
</p> </p>
{/if} {/if}
</Container> </Container>

16
todo.md
View File

@@ -1,8 +1,7 @@
# in progress # in progress
- Show new/old testament after 3 guesses and section after 7 guesses - Show new/old testament after 3 guesses and section after 7 guesses
- Verses ending in semicolons, commas, etc. will be replaced with "..."
- For bonus points: guess the verse/psalm number
- How do you balance rewarding knowledge vs incentivising learning? - How do you balance rewarding knowledge vs incentivising learning?
# todo # todo
@@ -54,6 +53,19 @@ I created Bibdle from a combination of two things. The first is my lifelong desi
# done # done
## january 5th
- Verses ending in semicolons, commas, etc. will be replaced with "..."
## january 4th
- For bonus points: guess the verse/psalm number
- major UI styling revamp
## december 30th
- merged the embeddings/similarity route into production
## december 27th ## december 27th
- add event log to submitting first-guess or correct-guess to umami (to make bounce rate more accurate) - add event log to submitting first-guess or correct-guess to umami (to make bounce rate more accurate)