Migrate to templ: Convert all HTML templates to type-safe templ components

- Add templ dependency for type-safe HTML rendering
- Convert index.html, login.html, register.html, dashboard.html, admin.html, admin_profile.html, admin_library.html to .templ files
- Generate Go code with templ generate for compile-time safety
- Update server routes to use templ components with proper rendering
- Refactor JavaScript in dashboard to avoid backtick parsing conflicts
- Delete old HTML template files
- Clean up project by removing unnecessary files and binaries
This commit is contained in:
2026-01-23 16:33:08 -05:00
parent fcc9b0f0b3
commit 5f5870b95d
20 changed files with 1371 additions and 1648 deletions
+12
View File
@@ -0,0 +1,12 @@
package templates
type User struct {
ID string
Username string
Email string
}
type PageData struct {
User User
CurrentPage string
}