feat(series): add series browse template, nav link, and clickable badge
Create templates/series.templ with: - Library selector dropdown (sticky, same pattern as dashboard) - Loading spinner overlay for AJAX library switching - Series grid with stacked-cascade multi-cover cards - Empty state when no series found - Pagination with Previous/Next links - SeriesCard sub-template linking to filtered bookshelf view Add 'Series' nav link in header between 'All Books' and 'Collections'. Make series badge on book detail page clickable, linking to /bookshelf?series_filter=<name>&sort=series. Add 'Continue Series' option to restore system collection modal.
This commit is contained in:
@@ -3,6 +3,8 @@ package templates
|
||||
import (
|
||||
"bookhoard/internal/handlers"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
"strings"
|
||||
)
|
||||
@@ -119,15 +121,16 @@ templ BookDetail(user User, book handlers.MediaDetail, errorMessage string) {
|
||||
<!-- Series Badge -->
|
||||
if book.Series.Valid && book.Series.String != "" {
|
||||
<div class="mb-4">
|
||||
<span
|
||||
class="px-3 py-1 rounded-full text-sm font-semibold"
|
||||
style="background-color: var(--accent); color: white;"
|
||||
<a
|
||||
href={ "/bookshelf?series_filter=" + url.QueryEscape(book.Series.String) + "&sort=series" }
|
||||
class="px-3 py-1 rounded-full text-sm font-semibold inline-block hover:opacity-80 transition-opacity"
|
||||
style="background-color: var(--accent); color: white; text-decoration: none;"
|
||||
>
|
||||
{ book.Series.String }
|
||||
if book.SeriesNumber.Valid && book.SeriesNumber.Int32 > 0 {
|
||||
#{ book.SeriesNumber.Int32 }
|
||||
}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<!-- Reading Direction Badge (for manga/comics) -->
|
||||
|
||||
Reference in New Issue
Block a user