diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/handlers.go | 15 | ||||
| -rw-r--r-- | internal/models.go | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/internal/handlers.go b/internal/handlers.go index c151904..92f7a4f 100644 --- a/internal/handlers.go +++ b/internal/handlers.go @@ -46,7 +46,8 @@ func (s *Server) handleHTMXPage(c echo.Context) error { log.Printf("Error rendering content for %s: %v", page, err) return c.String( http.StatusInternalServerError, - "Error loading content") + "Error loading content", + ) } data := PageData { @@ -79,10 +80,14 @@ func (s *Server) renderFullPage(c echo.Context, page, section string) error { if err != nil { log.Printf( "Error rendering content for %s/%s: %v", - page, section, err) + page, + section, + err, + ) return c.String( http.StatusInternalServerError, - "Error loading content") + "Error loading content", + ) } data := PageData{ @@ -100,7 +105,9 @@ func (s *Server) renderContent(c echo.Context, page, section string) error { if err != nil { log.Printf("Error rendering content for %s/%s: %v", page, section, err) return c.String( - http.StatusInternalServerError, "Error loading content") + http.StatusInternalServerError, + "Error loading content", + ) } return c.HTML(http.StatusOK, string(content)) diff --git a/internal/models.go b/internal/models.go index 4c8b4e0..097b852 100644 --- a/internal/models.go +++ b/internal/models.go @@ -9,14 +9,14 @@ const ( PageContact = "contact" ) -var ValidPages = []string{ +var ValidPages = []string { PageHome, PageProjects, PageResume, PageContact, } -var PageSections = map[string][]string{ +var PageSections = map[string][]string { PageHome: {"intro", "about"}, PageProjects: {"intro", "kal"}, PageResume: {"intro", "BSc Comp. Sci."}, |