fix(series): remove library switcher from detail page, add title tooltips to BookCard

Remove the library selector dropdown from the series detail page
since the page is scoped to the library from the browse page.
Replace it with a simple '← All Series' back link in the sticky bar.

Add title attributes to the shared BookCard template so the full
book title and author are visible on hover (useful for truncated
text with line-clamp).
This commit is contained in:
2026-05-08 20:58:43 -04:00
parent 52464581dc
commit 93991dfb0a
5 changed files with 175 additions and 244 deletions
+6 -25
View File
@@ -5,7 +5,7 @@ import (
"fmt"
)
templ SeriesDetail(user User, seriesName string, books []handlers.BookInfo, libData []LibraryData, currentLibraryID string, errorMessage string) {
templ SeriesDetail(user User, seriesName string, books []handlers.BookInfo, currentLibraryID string, errorMessage string) {
<!DOCTYPE html>
<html lang="en">
<head>
@@ -14,32 +14,13 @@ templ SeriesDetail(user User, seriesName string, books []handlers.BookInfo, libD
<title>{ seriesName } - Bookhoard</title>
<link href="/static/style.css" rel="stylesheet"/>
</head>
<body x-data="seriesDetailPage" x-init="initSeriesDetailPage()" class="theme-{ user.Theme }">
<body class="theme-{ user.Theme }">
@Header(user, "/series")
<!-- Library Selector -->
<div class="sticky top-0 z-40 bg-opacity-95 backdrop-blur border-b" style="background-color: var(--bg-primary);">
<div class="w-full px-4 py-3 flex items-center justify-between">
<div class="flex items-center gap-4">
<a href="/series" class="text-sm hover:opacity-80 transition-opacity" style="color: var(--text-secondary); text-decoration: none;">
All Series
</a>
<span style="color: var(--border);">|</span>
<label class="text-sm font-medium" style="color: var(--text-secondary)">Library:</label>
<select
id="library-select"
name="library_id"
class="px-4 py-2 rounded-lg border focus:ring-2 focus:ring-blue-500"
style="background-color: var(--bg-secondary); color: var(--text-primary);"
>
for _, lib := range libData {
if lib.ID == currentLibraryID {
<option value={ lib.ID } selected>{ lib.Name }</option>
} else {
<option value={ lib.ID }>{ lib.Name }</option>
}
}
</select>
</div>
<div class="w-full px-4 py-3 flex items-center gap-4">
<a href="/series" class="text-sm hover:opacity-80 transition-opacity" style="color: var(--text-secondary); text-decoration: none;">
All Series
</a>
</div>
</div>
<!-- Series Header -->