Remove wrapper div and pagination from BooksGrid component. The component now only renders book cards, making it more reusable. Changes: - Remove books-grid wrapper div from BooksGrid - Remove pagination controls from BooksGrid - Component now only renders book card grid This allows the parent template to control the wrapper div placement and pagination location, which is needed for proper HTMX targeting on the bookshelf page. Related: Issue with pagination displaying inside grid instead of below
18 lines
519 B
Templ
18 lines
519 B
Templ
package templates
|
|
|
|
import "bookhoard/internal/handlers"
|
|
|
|
templ BooksGrid(books []handlers.BookInfo, limit int, offset int, count int, currentLibraryID string) {
|
|
if len(books) > 0 {
|
|
for _, book := range books {
|
|
@BookCard(book)
|
|
}
|
|
} else {
|
|
<!-- Empty state -->
|
|
<div class="col-span-full text-center py-12" style="color: var(--text-secondary);">
|
|
<p class="text-lg mb-2">📚 No books found</p>
|
|
<p class="text-sm">Try adjusting your filters or add some books to your library.</p>
|
|
</div>
|
|
}
|
|
}
|