refactor(theme): fix theme consistency and persistence
- Apply server-side theme rendering to authenticated pages
- bookshelf.templ: use dynamic theme-{ user.Theme }
- admin pages: use dynamic theme rendering
- Add progressive enhancement for public pages
- index.templ, login.templ, register.templ: inline localStorage check
- Prevents theme flash on page load
- Consolidate wood theme logic into theme.ts
- Move wood gradient handling from header.ts to theme.ts
- Apply wood themes consistently via applyTheme()
- Export applyTheme to window for use by header.ts
- Fix theme selector by adding theme.js to header template
This commit is contained in:
@@ -12,7 +12,7 @@ templ BookShelf(user User, libraries []LibraryData) {
|
||||
<script src="/static/search.js"></script>
|
||||
<link href="/static/style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="theme-tokyo-night">
|
||||
<body class="theme-{ user.Theme }">
|
||||
@Header(user, "/bookshelf")
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:8 py-8">
|
||||
<!-- Library Selector -->
|
||||
|
||||
Reference in New Issue
Block a user