- 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
13 lines
155 B
Go
13 lines
155 B
Go
package templates
|
|
|
|
type User struct {
|
|
ID string
|
|
Username string
|
|
Email string
|
|
}
|
|
|
|
type PageData struct {
|
|
User User
|
|
CurrentPage string
|
|
}
|