This commit is contained in:
team3
2026-07-13 16:11:00 +02:00
parent 9cd8e02e22
commit a8e8e077bd
14 changed files with 454 additions and 62 deletions

View File

@@ -61,6 +61,24 @@ function taste(e) {
else if (e.key === 'ArrowLeft') zurueck()
}
// Wisch-Navigation (mobil): klar horizontal + kurz genug = blättern.
// Vertikales Scrollen und Text-Markieren bleiben unberührt (dy-Vergleich).
let wisch = null
function wischStart(e) {
const t = e.touches[0]
wisch = { x: t.clientX, y: t.clientY }
}
function wischEnde(e) {
if (!wisch) return
const t = e.changedTouches[0]
const dx = t.clientX - wisch.x
const dy = t.clientY - wisch.y
wisch = null
if (Math.abs(dx) < 60 || Math.abs(dx) < 2 * Math.abs(dy)) return
if (dx < 0) vor()
else zurueck()
}
// ── Abrufprüfung (Karteikarten) ────────────────────────────────────────────────
const stapel = ref([])
const zeigeAntwort = ref(false)
@@ -155,7 +173,8 @@ onUnmounted(() => {
</script>
<template>
<div ref="wurzel" class="lesemodus">
<div ref="wurzel" class="lesemodus"
@touchstart.passive="wischStart" @touchend.passive="wischEnde">
<header class="lm-kopf">
<span class="lm-fort">{{ fortschrittText }}</span>
<button class="lm-x" title="Schließen" @click="schliessen"></button>
@@ -205,7 +224,6 @@ onUnmounted(() => {
'pf-wahr': urteil(x.id) === true,
'pf-falsch2': urteil(x.id) === false }"
@click.prevent="toggle(x.id)">
<input type="checkbox" :checked="auswahl.has(x.id)" @click.stop="toggle(x.id)" />
<span class="markdown" v-html="render(x.text)"></span>
</label>
</div>