feat: translation middleware

This commit is contained in:
2026-03-02 22:37:11 +01:00
parent dd5e32cc4d
commit 9a1f7e0d99
35 changed files with 1467 additions and 83 deletions
+25
View File
@@ -0,0 +1,25 @@
package handlehome
import (
"net/http"
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/components/page"
)
type Handler struct {
src pageService
}
func New(mux *http.ServeMux, srv pageService) *Handler {
h := &Handler{
src: srv,
}
mux.HandleFunc("GET /{$}", h.home)
mux.HandleFunc("GET /{uid}", h.page)
return h
}
type pageService interface {
GetPages() ([]page.Page, error)
}