rename web dir to assets

This commit is contained in:
2025-01-02 15:48:55 +01:00
parent 7ca4016294
commit f80889ff95
6 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ func Index(w http.ResponseWriter, req *http.Request) {
}
// render template
t := template.Must(template.ParseFiles("web/templates/article.html", "web/templates/layout.html"))
t := template.Must(template.ParseFiles("assets/templates/article.html", "assets/templates/layout.html"))
err = t.ExecuteTemplate(w, "base", articleVMs)
if err != nil { http.Error(w, "Failed to render template", http.StatusInternalServerError); return; }
}

View File

@@ -62,7 +62,7 @@ func UpSearch(w http.ResponseWriter, req *http.Request) {
}
// render template
t := template.Must(template.ParseFiles("web/templates/article.html"))
t := template.Must(template.ParseFiles("assets/templates/article.html"))
err = t.ExecuteTemplate(w, "content", articleVMs)
if err != nil { http.Error(w, "Failed to render template", http.StatusInternalServerError); return; }
}