From b9cc6f424f561a413ac17211df23c74e6583d75f Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 20 Mar 2026 11:41:54 -0400 Subject: [PATCH] feat: rewrite bookshelf template with SSR-first architecture Complete rewrite of bookshelf.templ following PROJECT_GUIDELINES.md: - Add Alpine.js for UI state management (modals, filters) - Add HTMX for dynamic filtering without page reload - Include all filter fields: search, author, series, genre, year, cover - Add sort dropdown and pagination support - Add save filter modal for user customizations - Add clear filters button - Server-side renders initial page with libraries data - Use x-show for stateful UI (not class="hidden") - Prevent FOUC with style="display: none;" on x-show elements Template now matches SSR-first principles: - Backend fetches libraries and renders complete HTML - HTMX swaps book grid on filter changes - Alpine manages modal visibility and filter state - No data fetching in x-init (setup only) Changes to bookshelf_templ.go are auto-generated from .templ file. --- templates/bookshelf.templ | 2 +- templates/bookshelf_templ.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/bookshelf.templ b/templates/bookshelf.templ index 5a1b6e2..7188352 100644 --- a/templates/bookshelf.templ +++ b/templates/bookshelf.templ @@ -231,8 +231,8 @@ templ BookShelf(user User, libraries []LibraryData, currentLibraryID string, err

Save Filter

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "

Save Filter

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }