|
|
|
|
@@ -649,40 +649,44 @@
|
|
|
|
|
|
|
|
|
|
<!-- ── Focus mode floating nav ───────────────────────────────────────────── -->
|
|
|
|
|
{#if layout.focusMode}
|
|
|
|
|
<div class="fixed bottom-[4.5rem] left-1/2 -translate-x-1/2 z-50 flex items-center gap-2">
|
|
|
|
|
{#if data.prev}
|
|
|
|
|
<a
|
|
|
|
|
href="/books/{data.book.slug}/chapters/{data.prev}"
|
|
|
|
|
class="flex items-center gap-1 px-3 py-1.5 rounded-full bg-(--color-surface-2)/90 backdrop-blur border border-(--color-border) text-(--color-muted) hover:text-(--color-text) text-xs transition-colors shadow-md"
|
|
|
|
|
<div class="fixed {audioStore.active ? 'bottom-[4.5rem]' : 'bottom-6'} left-1/2 -translate-x-1/2 z-50">
|
|
|
|
|
<div class="flex items-center divide-x divide-(--color-border) rounded-full bg-(--color-surface-2)/95 backdrop-blur border border-(--color-border) shadow-lg text-xs text-(--color-muted) overflow-hidden">
|
|
|
|
|
{#if data.prev}
|
|
|
|
|
<a
|
|
|
|
|
href="/books/{data.book.slug}/chapters/{data.prev}"
|
|
|
|
|
class="flex items-center gap-1 px-3 py-2 hover:text-(--color-text) hover:bg-(--color-surface-3) transition-colors"
|
|
|
|
|
aria-label="Previous chapter"
|
|
|
|
|
>
|
|
|
|
|
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
|
|
|
|
|
</svg>
|
|
|
|
|
{m.reader_chapter_n({ n: String(data.prev) })}
|
|
|
|
|
</a>
|
|
|
|
|
{/if}
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
onclick={() => setLayout('focusMode', false)}
|
|
|
|
|
class="flex items-center gap-1 px-3 py-2 hover:text-(--color-brand) hover:bg-(--color-surface-3) transition-colors"
|
|
|
|
|
aria-label="Exit focus mode"
|
|
|
|
|
>
|
|
|
|
|
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
|
|
|
</svg>
|
|
|
|
|
{m.reader_chapter_n({ n: String(data.prev) })}
|
|
|
|
|
</a>
|
|
|
|
|
{/if}
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
onclick={() => setLayout('focusMode', false)}
|
|
|
|
|
class="flex items-center gap-1 px-3 py-1.5 rounded-full bg-(--color-surface-2)/90 backdrop-blur border border-(--color-border) text-(--color-muted) hover:text-(--color-brand) text-xs transition-colors shadow-md"
|
|
|
|
|
aria-label="Exit focus mode"
|
|
|
|
|
>
|
|
|
|
|
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
|
|
|
</svg>
|
|
|
|
|
Exit focus
|
|
|
|
|
</button>
|
|
|
|
|
{#if data.next}
|
|
|
|
|
<a
|
|
|
|
|
href="/books/{data.book.slug}/chapters/{data.next}"
|
|
|
|
|
class="flex items-center gap-1 px-3 py-1.5 rounded-full bg-(--color-surface-2)/90 backdrop-blur border border-(--color-border) text-(--color-muted) hover:text-(--color-text) text-xs transition-colors shadow-md"
|
|
|
|
|
>
|
|
|
|
|
{m.reader_chapter_n({ n: String(data.next) })}
|
|
|
|
|
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
|
|
|
</svg>
|
|
|
|
|
</a>
|
|
|
|
|
{/if}
|
|
|
|
|
Exit focus
|
|
|
|
|
</button>
|
|
|
|
|
{#if data.next}
|
|
|
|
|
<a
|
|
|
|
|
href="/books/{data.book.slug}/chapters/{data.next}"
|
|
|
|
|
class="flex items-center gap-1 px-3 py-2 hover:text-(--color-text) hover:bg-(--color-surface-3) transition-colors"
|
|
|
|
|
aria-label="Next chapter"
|
|
|
|
|
>
|
|
|
|
|
{m.reader_chapter_n({ n: String(data.next) })}
|
|
|
|
|
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
|
|
|
</svg>
|
|
|
|
|
</a>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|