refactored view package

This commit is contained in:
2026-02-09 19:30:47 +11:00
parent fa3b8e3982
commit 0b3301f921
47 changed files with 653 additions and 490 deletions

View File

@@ -3,10 +3,9 @@ package handlers
import (
"net/http"
"git.haelnorr.com/h/oslstats/internal/throw"
"git.haelnorr.com/h/oslstats/internal/view/page"
"git.haelnorr.com/h/golib/hws"
"git.haelnorr.com/h/oslstats/internal/throw"
homeview "git.haelnorr.com/h/oslstats/internal/view/homeview"
)
// Index handles responses to the / path. Also serves a 404 Page for paths that
@@ -17,7 +16,7 @@ func Index(s *hws.Server) http.Handler {
if r.URL.Path != "/" {
throw.NotFound(s, w, r, r.URL.Path)
}
renderSafely(page.Index(), s, r, w)
renderSafely(homeview.IndexPage(), s, r, w)
},
)
}