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.
This commit is contained in:
2026-03-20 11:47:01 -04:00
parent 513ff7c82f
commit b9cc6f424f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -231,8 +231,8 @@ templ BookShelf(user User, libraries []LibraryData, currentLibraryID string, err
<!-- Save Filter Modal -->
<div
x-show="showSaveModal"
x-transition
@click.self="showSaveModal = false"
x-transition
class="fixed inset-0 z-50 flex items-center justify-center"
style="background-color: rgba(0, 0, 0, 0.7); display: none;"
>