package templates import ( "bookhoard/internal/handlers" "fmt" ) templ Dashboard(user User, sections []handlers.SectionData, allSections []handlers.SectionData, libData []LibraryData, currentLibraryID string, hiddenCollections []string, itemsPerSection int, errorMessage string) { Dashboard - Bookhoard @Header(user, "/dashboard") @LibrarySwitcher(libData, currentLibraryID, DashboardActions())

Your Library

Pick up where you left off, or explore something new.

for _, section := range sections { @CollectionCarousel(section) }
@DashboardSettingsModal(allSections, hiddenCollections, itemsPerSection) @ErrorToast(errorMessage) } templ CollectionCarousel(section handlers.SectionData) {
{ section.Icon }

{ section.Title }

if section.Description != "" {

{ section.Description }

}
if section.ViewAllURL != "" { View All @Icon("arrow-right", "h-4 w-4") }
} templ BookCard(item handlers.BookInfo) {
if item.CoverImagePath != "" { { } else { { }

{ item.Title }

if item.Author != "" {

{ item.Author }

}
if item.HasConflict { @Icon("book-open", "h-5 w-5") } else { @Icon("book-open", "h-5 w-5") }
} templ DashboardSettingsModal(sections []handlers.SectionData, hiddenCollections []string, itemsPerSection int) { }