Visual fixes, typo fixes, and updated todo + metadata

This commit is contained in:
George Powell
2025-12-27 00:48:06 -05:00
parent d8cff2ff7a
commit 54c7e3cdbb
6 changed files with 396 additions and 364 deletions

3
.gitignore vendored
View File

@@ -27,3 +27,6 @@ vite.config.ts.timestamp-*
llms-*
engwebu_usfx.xml
embeddings-cache-L12.json
embeddings-cache-L6.json

View File

@@ -20271,7 +20271,7 @@
<chapter number="56">
<verse number="1">Thus says the Lord: “Keep justice, and do righteousness, For My salvation is about to come, And My righteousness to be revealed.</verse>
<verse number="2">Blessed is the man who does this, And the son of man who lays hold on it; Who keeps from defiling the Sabbath, And keeps his hand from doing any evil.”</verse>
<verse number="3">Do not let the son of the foreigner Who has joined himself to the LordSpeak, saying, “The Lord has utterly separated me from His people”; Nor let the eunuch say, “Here I am, a dry tree.”</verse>
<verse number="3">Do not let the son of the foreigner Who has joined himself to the Lord speak, saying, “The Lord has utterly separated me from His people”; Nor let the eunuch say, “Here I am, a dry tree.”</verse>
<verse number="4">For thus says the Lord: “To the eunuchs who keep My Sabbaths, And choose what pleases Me, And hold fast My covenant,</verse>
<verse number="5">Even to them I will give in My house And within My walls a place and a name Better than that of sons and daughters; I will give them an everlasting name That shall not be cut off.</verse>
<verse number="6">“Also the sons of the foreigner Who join themselves to the Lord, to serve Him, And to love the name of the Lord, to be His servants— Everyone who keeps from defiling the Sabbath, And holds fast My covenant—</verse>

View File

@@ -6,13 +6,16 @@
let displayReference = $derived(
dailyVerse.reference.replace(/^Psalms /, "Psalm ")
);
let displayVerseText = $derived(
dailyVerse.verseText.replace(/^([a-z])/, (c) => c.toUpperCase())
);
</script>
<div class="bg-gray-50 rounded-2xl shadow-xl p-8 sm:p-12 mb-4 sm:mb-12 w-full">
<blockquote
class="text-xl sm:text-2xl font-triodion leading-relaxed text-gray-700 text-center"
>
{dailyVerse.verseText}
{displayVerseText}
</blockquote>
{#if isWon}
<p class="text-center text-lg! big-text text-green-600! font-bold mt-8">

View File

@@ -167,8 +167,8 @@
{statsData.averageGuesses}
</div>
<div class="text-xs sm:text-sm opacity-90 mt-1">
People guessed correctly after {statsData.averageGuesses} guesses on
average
People guessed correctly after {statsData.averageGuesses}
{statsData.averageGuesses === 1 ? "guess" : "guesses"} on average
</div>
</div>
</div>

View File

@@ -49,14 +49,17 @@
year: "numeric",
month: "long",
day: "numeric",
})
}),
);
let isWon = $derived(guesses.some((g) => g.book.id === correctBookId));
let grade = $derived(
isWon
? getGrade(guesses.length, getBookById(correctBookId)?.popularity ?? 0)
: ""
? getGrade(
guesses.length,
getBookById(correctBookId)?.popularity ?? 0,
)
: "",
);
function getBookById(id: string): BibleBook | undefined {
@@ -83,7 +86,7 @@
const adjacent = isAdjacent(book.id, correctBookId);
console.log(
`Guess: ${book.name} (order ${book.order}), Correct: ${correctBook.name} (order ${correctBook.order}), Adjacent: ${adjacent}`
`Guess: ${book.name} (order ${book.order}), Correct: ${correctBook.name} (order ${correctBook.order}), Adjacent: ${adjacent}`,
);
guesses = [
@@ -107,7 +110,8 @@
// Fallback UUID v4 generator for older browsers
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
const r = window.crypto.getRandomValues(new Uint8Array(1))[0] % 16 | 0;
const r =
window.crypto.getRandomValues(new Uint8Array(1))[0] % 16 | 0;
const v = c === "x" ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
@@ -166,7 +170,7 @@
if (!browser) return;
localStorage.setItem(
`bibdle-guesses-${dailyVerse.date}`,
JSON.stringify(guesses.map((g) => g.book.id))
JSON.stringify(guesses.map((g) => g.book.id)),
);
});
@@ -191,7 +195,7 @@
(async () => {
try {
const response = await fetch(
`/api/submit-completion?anonymousId=${anonymousId}&date=${dailyVerse.date}`
`/api/submit-completion?anonymousId=${anonymousId}&date=${dailyVerse.date}`,
);
const result = await response.json();
console.log("Stats response:", result);
@@ -201,7 +205,7 @@
statsData = result.stats;
localStorage.setItem(
`bibdle-stats-submitted-${dailyVerse.date}`,
"true"
"true",
);
} else if (result.error) {
console.error("Server error:", result.error);
@@ -245,7 +249,7 @@
statsSubmitted = true;
localStorage.setItem(
`bibdle-stats-submitted-${dailyVerse.date}`,
"true"
"true",
);
} else if (result.error) {
console.error("Server error:", result.error);
@@ -279,7 +283,7 @@
year: "numeric",
});
const formattedDate = dateFormatter.format(
new Date(`${dailyVerse.date}T00:00:00`)
new Date(`${dailyVerse.date}T00:00:00`),
);
const siteUrl = window.location.origin;
return [
@@ -365,7 +369,7 @@
<title>Bibdle &mdash; A daily bible game{isDev ? " (dev)" : ""}</title>
<meta
name="description"
content="A Wordle-inspired Bible game (short for Bible Daily)"
content="Guess which book of the Bible a verse comes from."
/>
</svelte:head>

34
todo.md
View File

@@ -1,20 +1,36 @@
# in progress
- root menu: classic / imposter mode / impossible mode (complete today's classic and imposter modes to unlock)
# todo
- Difficulty levels
- difficult mode (guess old or new testament, first try _only_)
- impossible mode (1894 scrivener koine greek NT or some hebrew version for OT) three guesses only
- impossible mode (1904 greek bible) three guesses only.
- share both classic and impossible mode with both buttons
- "login to see your stats, unlock practice mode, and more"
- add imposter mode
- instructions
- classic mode: identify what book the verse is from (e.g. Genesis, John, Revelations...) in as few guesses as possible.
- imposter mode: out of four options, identify the verse that is not in the Bible
- impossible mode: identify which book of the bible the verse is from in less than three guesses.
- add login + saved stats + streak etc.
- add deuterocanonical books
<!-- Login features -->
- Practice mode: Unlimited verses
- Create public or private leaderboards
- Passport book with badges:
- Guess each Gospel first try
- "Guessed all Gospels", "Perfect week", "Old Testament expert"
- Theologian: Guess each book first try
- instructions
- difficult mode (guess old or new testament, first try _only_) (???)
# places to send
@@ -36,6 +52,12 @@ I created Bibdle from a combination of two things. The first is my lifelong desi
# done
## december 26th
- created embeddings for every bible verse (verse similarity finder)
- failed at having AI write a USFX format parser
- found a npm library for parsing USFX
## december 23rd
- switched to local copy of NKJV