feat: translation middleware

This commit is contained in:
2026-02-19 21:13:01 +01:00
parent bbae5b1c93
commit cbc2a1a803
35 changed files with 1500 additions and 82 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)
}