mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-04-05 17:33:31 -04:00
removed verse snippet from share
This commit is contained in:
@@ -12,17 +12,19 @@
|
|||||||
class="flex flex-col items-center justify-center bg-white/50 backdrop-blur-sm px-4 py-4 rounded-2xl border border-white/50 shadow-sm flex-1 text-center"
|
class="flex flex-col items-center justify-center bg-white/50 backdrop-blur-sm px-4 py-4 rounded-2xl border border-white/50 shadow-sm flex-1 text-center"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
class="text-4xl font-triodion font-black text-orange-500 leading-none tabular-nums"
|
class="text-5xl font-triodion font-black text-orange-500 leading-none tabular-nums"
|
||||||
>
|
>
|
||||||
{streak}
|
{streak}
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
class="text-xs uppercase tracking-[0.2em] text-gray-500 font-bold mt-1 leading-tight"
|
class="text-xs uppercase justify-center tracking-widest text-gray-500 font-triodion font-bold py-2 leading-tight"
|
||||||
>
|
>
|
||||||
day{streak === 1 ? "" : "s"}<br />in a row
|
day{streak === 1 ? "" : "s"} in a row
|
||||||
</p>
|
</p>
|
||||||
{#if streakPercentile !== null && streakPercentile <= 50}
|
{#if streakPercentile !== null && streakPercentile <= 50}
|
||||||
<p class="text-xs text-gray-700 font-semibold mt-2">
|
<p
|
||||||
|
class="text-xs text-black w-full tracking-widest uppercase font-semibold border-t border-t-stone-400 pt-2"
|
||||||
|
>
|
||||||
Top {streakPercentile}%
|
Top {streakPercentile}%
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
>
|
>
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<p class="text-2xl sm:text-3xl md:text-4xl leading-tight">
|
<p class="text-2xl sm:text-3xl md:text-4xl leading-tight">
|
||||||
{congratulationsMessage} The verse is from<br />
|
{congratulationsMessage} The verse is from
|
||||||
<span class="font-black font-triodion text-3xl md:text-4xl"
|
<span class="font-black font-triodion text-3xl md:text-4xl"
|
||||||
>{bookName}</span
|
>{bookName}</span
|
||||||
>.
|
>.
|
||||||
@@ -112,11 +112,13 @@
|
|||||||
You guessed correctly after {guessCount}
|
You guessed correctly after {guessCount}
|
||||||
{guessCount === 1 ? "guess" : "guesses"}.
|
{guessCount === 1 ? "guess" : "guesses"}.
|
||||||
</p>
|
</p>
|
||||||
{#if streak >= 7}
|
<!-- {#if streak >= 7}
|
||||||
<p class="text-gray-700! big-text">
|
<p
|
||||||
Thank you for making Bibdle part of your daily routine!
|
class="italic tracking-wider px-8 font-semibold text-gray-500"
|
||||||
|
>
|
||||||
|
Thank you for making BIBDLE part of your daily routine!
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if} -->
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function getVerseSnippet(verseText: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const start = posAfterWord(10);
|
const start = posAfterWord(10);
|
||||||
const end = posAfterWord(25);
|
const end = posAfterWord(18);
|
||||||
|
|
||||||
// Find first punctuation mark between words 10 and 25
|
// Find first punctuation mark between words 10 and 25
|
||||||
const range = text.substring(start, end);
|
const range = text.substring(start, end);
|
||||||
@@ -74,13 +74,13 @@ export function generateShareText(params: {
|
|||||||
const bookEmoji = isLoggedIn ? "📜" : "📖";
|
const bookEmoji = isLoggedIn ? "📜" : "📖";
|
||||||
|
|
||||||
const guessWord = guesses.length === 1 ? "guess" : "guesses";
|
const guessWord = guesses.length === 1 ? "guess" : "guesses";
|
||||||
const streakPart = streak !== undefined && streak > 1 ? ` (${streak} days🔥)` : "";
|
const streakPart = streak !== undefined && streak > 1 ? ` ${streak} days 🔥` : "";
|
||||||
const chapterStar = guesses.length === 1 && chapterCorrect ? " ⭐" : "";
|
const chapterStar = guesses.length === 1 && chapterCorrect ? " ⭐" : "";
|
||||||
|
|
||||||
const lines = [
|
const lines = [
|
||||||
`${bookEmoji} Bibdle | ${formattedDate} ${bookEmoji}`,
|
`${bookEmoji} Bibdle | ${formattedDate} ${bookEmoji}`,
|
||||||
getVerseSnippet(verseText),
|
`${guesses.length} ${guessWord},${streakPart}`,
|
||||||
`${emojis}${chapterStar} ${guesses.length} ${guessWord}${streakPart}`,
|
`${emojis}${chapterStar}`,
|
||||||
origin,
|
origin,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user