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
+2 -1
View File
@@ -4,6 +4,7 @@ go 1.25
require (
github.com/ArcadiaLin/go-epub v0.1.1
github.com/a-h/templ v0.3.977
github.com/fsnotify/fsnotify v1.9.0
github.com/go-playground/validator/v10 v10.30.1
github.com/golang-jwt/jwt v3.2.2+incompatible
@@ -23,7 +24,7 @@ require (
github.com/labstack/gommon v0.4.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/net v0.47.0 // indirect