build: compile templates and JavaScript after theme fixes
- Regenerate admin_library_templ.go with admin sidebar integration - Regenerate admin_users_templ.go with sidebar layout and theme fixes - Regenerate bookshelf_templ.go with dynamic theme rendering - Regenerate index_templ.go with progressive enhancement script - Regenerate login_templ.go with progressive enhancement script - Regenerate register_templ.go with progressive enhancement script - Compile header.js with consolidated theme logic
This commit is contained in:
+3
-29
@@ -23,36 +23,10 @@ const toggleUserMenu = () => {
|
||||
}
|
||||
};
|
||||
const changeThemeTo = (theme) => {
|
||||
// Apply the theme
|
||||
if (theme.startsWith('wood-')) {
|
||||
// Apply wood background theme
|
||||
document.body.className = `theme-${theme}`;
|
||||
// Set wood background style
|
||||
let woodGradient = '';
|
||||
switch (theme) {
|
||||
case 'wood-light':
|
||||
woodGradient = 'linear-gradient(135deg, #deb887 0%, #d2a679 50%, #c9975b 100%)';
|
||||
break;
|
||||
case 'wood-dark':
|
||||
woodGradient = 'linear-gradient(135deg, #8b7355 0%, #6b5344 50%, #5a4636 100%)';
|
||||
break;
|
||||
case 'wood-mahogany':
|
||||
woodGradient = 'linear-gradient(135deg, #a0522d 0%, #8b4513 50%, #7a3c10 100%)';
|
||||
break;
|
||||
}
|
||||
document.body.style.background = woodGradient;
|
||||
document.body.style.backgroundSize = 'cover';
|
||||
document.body.style.backgroundAttachment = 'fixed';
|
||||
// Apply the theme using the consolidated function from theme.ts
|
||||
if (window.applyTheme) {
|
||||
window.applyTheme(theme);
|
||||
}
|
||||
else {
|
||||
// Apply regular theme
|
||||
document.body.className = `theme-${theme}`;
|
||||
document.body.style.background = '';
|
||||
document.body.style.backgroundSize = '';
|
||||
document.body.style.backgroundAttachment = '';
|
||||
}
|
||||
// Save to localStorage
|
||||
localStorage.setItem('theme', theme);
|
||||
// Save to server if logged in
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
|
||||
Reference in New Issue
Block a user