chapter page: show book title in nav header, simplify back button and heading
This commit is contained in:
@@ -211,10 +211,16 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<header class="border-b border-zinc-700 bg-zinc-900 sticky top-0 z-50">
|
<header class="border-b border-zinc-700 bg-zinc-900 sticky top-0 z-50">
|
||||||
<nav class="max-w-6xl mx-auto px-4 h-14 flex items-center gap-6">
|
<nav class="max-w-6xl mx-auto px-4 h-14 flex items-center gap-6">
|
||||||
<a href="/" class="text-amber-400 font-bold text-lg tracking-tight hover:text-amber-300">
|
<a href="/" class="text-amber-400 font-bold text-lg tracking-tight hover:text-amber-300 shrink-0">
|
||||||
libnovel
|
libnovel
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{#if page.data.book?.title && /\/books\/[^/]+\/chapters\//.test(page.url.pathname)}
|
||||||
|
<span class="text-zinc-400 text-sm truncate min-w-0 flex-1 sm:flex-none sm:max-w-xs">
|
||||||
|
{page.data.book.title}
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if data.user}
|
{#if data.user}
|
||||||
<!-- Desktop nav links (hidden on mobile) -->
|
<!-- Desktop nav links (hidden on mobile) -->
|
||||||
<a
|
<a
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg class="w-4 h-4" 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="M15 19l-7-7 7-7" />
|
||||||
</svg>
|
</svg>
|
||||||
{data.book.title}
|
Chapters
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
@@ -93,7 +93,6 @@
|
|||||||
|
|
||||||
<!-- Chapter heading -->
|
<!-- Chapter heading -->
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<p class="text-zinc-500 text-sm mb-1">Chapter {data.chapter.number}</p>
|
|
||||||
<h1 class="text-xl font-bold text-zinc-100">
|
<h1 class="text-xl font-bold text-zinc-100">
|
||||||
{data.chapter.title || `Chapter ${data.chapter.number}`}
|
{data.chapter.title || `Chapter ${data.chapter.number}`}
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user