From 004b8233a19da8558c0498521ce6d0135085191e Mon Sep 17 00:00:00 2001 From: Sebastian Flick Date: Sat, 12 Oct 2024 10:54:24 +0200 Subject: [PATCH] fix link-generation in einzelverssynopse --- src/lib/components/VerseSelector.svelte | 9 ++++++++- .../einzelverssynopse/[thirties]/[verse]/+page.svelte | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lib/components/VerseSelector.svelte b/src/lib/components/VerseSelector.svelte index 03569da..6b1e679 100644 --- a/src/lib/components/VerseSelector.svelte +++ b/src/lib/components/VerseSelector.svelte @@ -19,6 +19,8 @@ let additional = ''; + let thirtiesVal = Number(coordinates[0]); + function handleInput(/** @type {Event} */ e) { if (e.target instanceof HTMLInputElement) { validateMinMax(e.target); @@ -41,6 +43,11 @@ } } }; + $: if (thirtiesVal === 257) { + verse.max = '32'; + } else if (verse?.max) { + verse.max = '30'; + }
. {/if} - {#if !(parseInt(thirties) === 827 && parseInt(verse) === 30)} + {#if !(parseInt(thirties) === 827 && parseInt(verse) >= 30)} = 30 ? parseInt(thirties) + 1 - : thirties}/{parseInt(verse) === 30 ? 1 : parseInt(verse) + 1}" + : thirties}/{parseInt(verse) >= 30 ? 1 : parseInt(verse) + 1}" > nächster Vers