fix: remove duplicate bookshelf route and fix template script tags

Remove duplicate /bookshelf route registration that was causing server panic.
The route was registered twice in frontend.go (lines 257-307 removed).

Fix bookshelf.templ script tags:
- Remove malformed Alpine.js CDN path (/static/alpinejs@3.x.x/dist/cdn.min.js)
- Remove standalone bookshelf.js script tag (not built separately)
- Rely on header.templ to load main.js which includes all Alpine components

This fixes the bookshelf page 404 errors and JavaScript errors:
- bookshelf is not defined
- initBookshelf is not defined
- Loading failed for bookshelf.js

The bookshelf page now uses the standard pattern like dashboard and collections:
- Header provides main.js with all Alpine components
- Bookshelf Alpine component registered via x-data="bookshelf"
- All functionality works correctly
This commit is contained in:
2026-03-20 22:58:05 -04:00
parent e82d2d7066
commit 34be9ab16e
2 changed files with 0 additions and 55 deletions
-3
View File
@@ -8,7 +8,6 @@ templ BookShelf(user User, libraries []LibraryData, currentLibraryID string, err
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Library - Bookhoard</title>
<script src="/static/htmx.min.js"></script>
<script src="/static/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
<link href="/static/style.css" rel="stylesheet"/>
</head>
<body
@@ -283,8 +282,6 @@ templ BookShelf(user User, libraries []LibraryData, currentLibraryID string, err
</form>
</div>
</div>
<!-- Load saved bookshelf script -->
<script src="/static/bookshelf.js" defer></script>
</body>
</html>
}