package templates import "bookhoard/internal/handlers" templ Collection(user User, collections []CollectionData, errorMessage string) { Collections - Bookhoard @Header(user, "/collections")
@Icon("folder", "h-5 w-5")

My Collections

Organize your books into custom collections

if len(collections) == 0 {
@Icon("folder", "h-7 w-7")

No Collections Yet

Create collections to organize your books

} for _, col := range collections {
{ col.Icon }

{ col.Name }

{ col.Description }

}
@ErrorToast(errorMessage) } templ CollectionDetail(user User, collection CollectionData, books []handlers.BookInfo, libraryID string, libData []LibraryData) { { collection.Name } - Bookhoard @Header(user, "/collections") @LibrarySwitcher(libData, libraryID)
@Icon("arrow-left", "h-4 w-4") Back to Collections
{ collection.Icon }

{ collection.Name }

{ collection.Description }

Books in this Collection

if !collection.IsSystem {
}
if len(books) == 0 {
No books in this collection yet.
} for _, book := range books {
if !collection.IsSystem {
}

{ book.Title }

if book.Author != "" {

by { book.Author }

}
if !collection.IsSystem {
}
}
if !collection.IsSystem { } } templ BookPickerGrid(books []handlers.BookInfo) { for _, book := range books {
if book.CoverImagePath != "" { { } else { { }

{ book.Title }

} }