feat: implement Hybrid SSR for bookshelf page
- Add LibraryData type to templates/types.go - Update bookshelf template to accept libraries parameter - Render libraries server-side for faster initial page load - Libraries now populated from server data instead of AJAX fetch - JavaScript still uses API for dynamic content (bookshelf items) - Update /bookshelf route to fetch libraries server-side before render - Properly handle UUID and pgtype.Text conversions - Maintain API endpoint compatibility for JavaScript calls This improves initial page load performance while preserving dynamic functionality via API calls.
This commit is contained in:
@@ -38,6 +38,13 @@ type BookData struct {
|
||||
CoverImagePath string
|
||||
}
|
||||
|
||||
type LibraryData struct {
|
||||
ID string
|
||||
Name string
|
||||
Description string
|
||||
TypeName string
|
||||
}
|
||||
|
||||
type DeviceData struct {
|
||||
ID string
|
||||
DeviceName string
|
||||
|
||||
Reference in New Issue
Block a user