aboutsummaryrefslogtreecommitdiff
path: root/backend/home.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/home.go')
-rw-r--r--backend/home.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/backend/home.go b/backend/home.go
index 8577fec..a7f2ae1 100644
--- a/backend/home.go
+++ b/backend/home.go
@@ -1,18 +1,21 @@
package backend
import (
- "html/template"
"net/http"
"github.com/go-chi/chi/v5"
)
func HandleHome(r *chi.Mux) {
- r.Get("/", func(w http.ResponseWriter, r *http.Request) {
- t := template.Must(template.ParseFS(templates, "templates/home.html", "templates/base.html"))
- err := t.ExecuteTemplate(w, "base.html", &data{})
- if err != nil {
- panic(err)
+ r.Get("/", func(w http.ResponseWriter, _ *http.Request) {
+ d := &data{
+ title: "",
+ Article: false,
+ Domain: "anhgelus.world",
+ URL: "/",
+ Image: "",
+ Description: "",
}
+ d.handleGeneric(w, "home")
})
}