From dcde92d11885bbabb9d75469b89da0b8e5f89fc3 Mon Sep 17 00:00:00 2001 From: Admin Date: Sun, 1 Mar 2026 22:15:58 +0500 Subject: [PATCH] Flatten all UI buttons: remove background fills, use text-only styling All filled/pill buttons across home, ranking, book detail, and chapter pages now use transparent backgrounds with colored text only, consistent with the chapter reader nav bar style: - Home: Browse Rankings (amber text), Scrape (amber text) - Ranking: View Markdown, page numbers, fetch buttons, Scrape/Source on cards - Book detail: Source, Refresh, Resume, chapter pagination - Chapter: bottom Prev/Next nav, article-end nav links --- scraper/internal/server/ui.go | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scraper/internal/server/ui.go b/scraper/internal/server/ui.go index f734fdf..34cd58d 100644 --- a/scraper/internal/server/ui.go +++ b/scraper/internal/server/ui.go @@ -123,7 +123,7 @@ const homeTmpl = `

{{len .Books}} book{{if ne (len .Books) 1}}s{{end}} on disk

@@ -158,7 +158,7 @@ const homeTmpl = `
@@ -540,7 +540,7 @@ const rankingTmpl = ` hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML" - class="text-sm px-3 py-1.5 rounded-lg bg-zinc-700 hover:bg-zinc-600 text-white inline-flex items-center gap-1"> + class="text-sm px-3 py-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 transition-colors inline-flex items-center gap-1"> View Markdown @@ -567,14 +567,14 @@ const rankingTmpl = ` {{if eq .Num 0}} {{else if eq .Num $cur}} - {{.Num}} + {{.Num}} {{else}} + class="text-xs w-8 h-7 rounded-lg text-zinc-400 hover:text-zinc-200 transition-colors flex items-center justify-center"> {{.Num}} {{end}} @@ -602,7 +602,7 @@ const rankingTmpl = ` hx-swap="innerHTML"> @@ -646,7 +646,7 @@ const rankingTmpl = ` {{if .SourceURL}}
+ class="inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded text-zinc-400 hover:text-zinc-200 transition-colors"> @@ -1057,7 +1057,7 @@ const bookTmpl = ` {{if .Meta.SourceURL}} + class="inline-flex items-center gap-1 text-xs px-2 py-1 rounded text-zinc-400 hover:text-zinc-200 transition-colors"> @@ -1066,7 +1066,7 @@ const bookTmpl = `
@@ -1091,7 +1091,7 @@ const bookTmpl = ` hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML" - class="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-amber-700 hover:bg-amber-600 text-white text-sm font-medium transition-colors cursor-pointer"> + class="inline-flex items-center gap-2 px-4 py-2 rounded-lg text-amber-400 hover:text-amber-300 text-sm font-medium transition-colors cursor-pointer"> ▶ Resume — Chapter
@@ -1128,18 +1128,18 @@ const bookTmpl = ` hx-swap="innerHTML" hx-push-url="/books/{{.Slug}}?page={{prev .CurrentPage}}" hx-on::after-request="applyProgress('{{.Slug}}')" - class="px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-300 text-sm transition-colors cursor-pointer">« + class="px-3 py-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 text-sm transition-colors cursor-pointer">« {{end}} {{range pages .TotalPages}} {{if eq . $.CurrentPage}} - {{.}} + {{.}} {{else}} {{.}} + class="px-3 py-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 text-sm transition-colors cursor-pointer">{{.}} {{end}} {{end}} {{if lt .CurrentPage .TotalPages}} @@ -1148,7 +1148,7 @@ const bookTmpl = ` hx-swap="innerHTML" hx-push-url="/books/{{.Slug}}?page={{next .CurrentPage}}" hx-on::after-request="applyProgress('{{.Slug}}')" - class="px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-300 text-sm transition-colors cursor-pointer">» + class="px-3 py-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 text-sm transition-colors cursor-pointer">» {{end}} {{end}} @@ -1287,7 +1287,7 @@ const chapterPageTmpl = `{{range .Chapters}} hx-swap="innerHTML" hx-push-url="/books/{{.Slug}}?page={{prev .CurrentPage}}" hx-on::after-request="applyProgress('{{.Slug}}')" - class="px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-300 text-sm transition-colors cursor-pointer">« + class="px-3 py-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 text-sm transition-colors cursor-pointer">« {{end}} {{range pages .TotalPages}} {{if eq . $.CurrentPage}} @@ -1307,7 +1307,7 @@ const chapterPageTmpl = `{{range .Chapters}} hx-swap="innerHTML" hx-push-url="/books/{{.Slug}}?page={{next .CurrentPage}}" hx-on::after-request="applyProgress('{{.Slug}}')" - class="px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-300 text-sm transition-colors cursor-pointer">» + class="px-3 py-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 text-sm transition-colors cursor-pointer">» {{end}} ` @@ -1532,7 +1532,7 @@ const chapterTmpl = ` hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML" - class="text-sm px-4 py-2 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-300 transition-colors"> + class="text-sm px-4 py-2 rounded-lg text-zinc-400 hover:text-zinc-200 transition-colors"> ← Previous chapter {{else}}{{end}} @@ -1542,7 +1542,7 @@ const chapterTmpl = ` hx-target="#main-content" hx-push-url="true" hx-swap="innerHTML" - class="text-sm px-4 py-2 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-zinc-300 transition-colors"> + class="text-sm px-4 py-2 rounded-lg text-zinc-400 hover:text-zinc-200 transition-colors"> Next chapter → {{else}}{{end}}