Commit Graph

5 Commits

Author SHA1 Message Date
2ce810a4dd Refactoring cont. 2025-04-23 09:44:19 +01:00
5c3a847900 Massive refactor! 2025-04-22 23:26:11 +01:00
2498b33a9c Refactor: Centralize template loading and improve error handling
- Introduced helpers.LoadTemplateFiles() for consistent layout + topbar rendering
- Replaced repeated template.ParseFiles() calls across handlers
- Created generic RenderError(w, r, statusCode) helper
- Replaced old Render403 with flexible RenderError
- Updated AdminOnly middleware to render 403 errors with context
- Added 500.html template for graceful panic fallback
- Prepared structure for future error codes (404, 429, etc.)
2025-04-02 09:12:13 +01:00
5ea780fcab Cleanup: Finalize template context integration and remove legacy code
- Replaced legacy TemplateContext calls with structured TemplateData usage
- Removed unused variables and redundant storage calls in notifications handler
- Ensured consistent use of BuildTemplateData across user-facing handlers
- Resolved all compile-time errors from refactor
- Ready for runtime testing and further layout integration
2025-04-01 21:20:05 +01:00
c3a7480c65 expand on admin functionality, hardening still needs to be implemented. 2025-03-31 10:52:12 +01:00