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:
@@ -0,0 +1,12 @@
|
||||
package templates
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
Username string
|
||||
Email string
|
||||
}
|
||||
|
||||
type PageData struct {
|
||||
User User
|
||||
CurrentPage string
|
||||
}
|
||||
Reference in New Issue
Block a user