docs: add theme fix and admin sidebar implementation plans
- Add THEME_FIX_PLAN.md: comprehensive plan for theme system consistency - Add ADMIN_SIDEBAR_PLAN.md: reusable admin sidebar component plan - Add WOOD_PANELING_PLAN.md: wood paneling and full-width layout plan
This commit is contained in:
+8
-15
@@ -50,20 +50,23 @@ When users change themes via the header dropdown, new pages do not consistently
|
||||
#### Phase 1: Update Authenticated Pages
|
||||
|
||||
**Files to modify:**
|
||||
- `templates/admin_library.templ`
|
||||
- `templates/admin_users.templ`
|
||||
- `templates/bookshelf.templ`
|
||||
- `templates/admin_library.templ` → `theme-{ user.Theme }`
|
||||
- `templates/admin_users.templ` → `theme-{ currentUser.Theme }` (note: parameter is `currentUser`, not `user`)
|
||||
- `templates/bookshelf.templ` → `theme-{ user.Theme }`
|
||||
|
||||
**Change:**
|
||||
```templ
|
||||
<!-- Before -->
|
||||
<body class="theme-tokyo-night">
|
||||
|
||||
<!-- After -->
|
||||
<!-- After (admin_library.templ, bookshelf.templ) -->
|
||||
<body class="theme-{ user.Theme }">
|
||||
|
||||
<!-- After (admin_users.templ) -->
|
||||
<body class="theme-{ currentUser.Theme }">
|
||||
```
|
||||
|
||||
**Requires:** Ensure `user` parameter is available in these templates (it should be already).
|
||||
**Requires:** Verify the correct parameter name in each template (`user` vs `currentUser`).
|
||||
|
||||
#### Phase 2: Update Public Pages with Default Theme
|
||||
|
||||
@@ -72,16 +75,6 @@ When users change themes via the header dropdown, new pages do not consistently
|
||||
- `templates/login.templ`
|
||||
- `templates/register.templ`
|
||||
|
||||
**For `index.templ`:**
|
||||
- Check if user object available (if logged in)
|
||||
- If logged in: use `user.Theme`
|
||||
- If not logged in: use default theme with localStorage check
|
||||
|
||||
```templ
|
||||
<body class="theme-{ index.User.Theme }">
|
||||
```
|
||||
|
||||
**For `login.templ` and `register.templ`:**
|
||||
- Use default theme since no user context
|
||||
- Consider reading localStorage via inline JavaScript (progressive enhancement)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user