From 94476bf56f2b28aeb49391bf5cd1bff799b071b8 Mon Sep 17 00:00:00 2001 From: team3 Date: Thu, 8 Oct 2026 16:13:15 +0200 Subject: [PATCH] Buchansicht: am Anfang nicht zum Vorwort scrollen, mobile Knopfleiste bleibt oben Co-Authored-By: Claude Fable 5.1 --- frontend/src/components/Guide.vue | 3 ++- frontend/src/style.css | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Guide.vue b/frontend/src/components/Guide.vue index b19ba73..41fefa8 100644 --- a/frontend/src/components/Guide.vue +++ b/frontend/src/components/Guide.vue @@ -88,7 +88,8 @@ async function laden() { spy() // Gemerkte Position hat Vorrang (die Adresse spiegelt nur den letzten Scrollstand); zuletzt im Lesemodus gelesen → dessen Stelle const ziel = idVonLesemodus(pos) || pos.abschnitt || idVonNr(props.nr) - if (ziel && !aktiv.value) document.getElementById(ziel)?.scrollIntoView({ block: 'start' }) + // Am Buchanfang (Vorwort) nicht scrollen, damit Titel und Knopfleiste sichtbar bleiben + if (ziel && ziel !== 'vorwort' && !aktiv.value) document.getElementById(ziel)?.scrollIntoView({ block: 'start' }) } watch(() => [props.slug, props.version], () => { aktiv.value = ''; cache.clear(); laden() }, { immediate: true }) // Zurück-Taste oder getippte Adresse: zum Abschnitt springen, wenn er nicht schon aktiv ist diff --git a/frontend/src/style.css b/frontend/src/style.css index a3b0049..d323a81 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -216,7 +216,7 @@ kbd { font: 11px system-ui, sans-serif; border: 1px solid var(--rand); border-ra .topbar { gap: 8px; padding: 8px 10px; flex-wrap: nowrap; } .topbar .badge { display: none; } .topbar .titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } - .mobil-leiste { display: flex; gap: 8px; padding: 10px 16px 0; align-items: center; } + .mobil-leiste { display: flex; gap: 8px; padding: 10px 16px 8px; align-items: center; position: sticky; top: 0; z-index: 5; background: var(--lese-bg); border-bottom: 1px solid var(--lese-rand); } .guide-nav.offen .schliessen { display: inline-block; margin: 10px 10px 4px; } .lese { overflow-x: hidden; } .sidebar:not(.offen) { display: none; }