fix: remove duplicate inline chapter nav, upgrade player prev/next to SVG chevrons with chapter number
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
Admin
2026-03-02 12:56:35 +05:00
parent da3370ba9b
commit 1254e90a65

View File

@@ -2251,25 +2251,6 @@ const chapterTmpl = `
{{.HTML}}
</article>
<!-- Bottom chapter nav (inline, below content) -->
<div class="flex items-center justify-between gap-4 mt-10 pt-6 border-t border-zinc-800/50">
{{if .PrevN}}
<a href="/books/{{.Slug}}/chapters/{{.PrevN}}"
hx-get="/books/{{.Slug}}/chapters/{{.PrevN}}"
hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML"
class="flex items-center gap-1.5 text-sm text-zinc-400 hover:text-amber-400 no-underline transition-colors">
← Prev
</a>
{{else}}<span></span>{{end}}
{{if .NextN}}
<a href="/books/{{.Slug}}/chapters/{{.NextN}}"
hx-get="/books/{{.Slug}}/chapters/{{.NextN}}"
hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML"
class="flex items-center gap-1.5 text-sm text-zinc-400 hover:text-amber-400 no-underline transition-colors">
Next →
</a>
{{else}}<span></span>{{end}}
</div>
</main>
<!-- ─── Fixed bottom player ───────────────────────────────────────────────── -->
@@ -2301,10 +2282,11 @@ const chapterTmpl = `
hx-get="/books/{{.Slug}}/chapters/{{.PrevN}}"
hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML"
title="Previous chapter" aria-label="Previous chapter"
class="flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors no-underline text-sm">
class="flex-shrink-0 flex flex-col items-center justify-center w-10 h-10 rounded-xl text-zinc-400 hover:text-zinc-100 hover:bg-zinc-800 transition-colors no-underline gap-0.5">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18"><polyline points="15 18 9 12 15 6"/></svg>
<span class="text-[0.55rem] tabular-nums leading-none text-zinc-600">{{.PrevN}}</span>
</a>
{{else}}<span class="flex-shrink-0 w-8"></span>{{end}}
{{else}}<span class="flex-shrink-0 w-10"></span>{{end}}
<!-- Play / Pause -->
<button id="player-play-btn" type="button" onclick="ttsToggle()"
@@ -2336,10 +2318,11 @@ const chapterTmpl = `
hx-get="/books/{{.Slug}}/chapters/{{.NextN}}"
hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML"
title="Next chapter" aria-label="Next chapter"
class="flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors no-underline text-sm">
class="flex-shrink-0 flex flex-col items-center justify-center w-10 h-10 rounded-xl text-zinc-400 hover:text-zinc-100 hover:bg-zinc-800 transition-colors no-underline gap-0.5">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18"><polyline points="9 18 15 12 9 6"/></svg>
<span class="text-[0.55rem] tabular-nums leading-none text-zinc-600">{{.NextN}}</span>
</a>
{{else}}<span class="flex-shrink-0 w-8"></span>{{end}}
{{else}}<span class="flex-shrink-0 w-10"></span>{{end}}
</div>
</div>