frontend: remove error causing hx-boost attribute on form and make title responsive and centered

This commit is contained in:
Patryk Hegenberg 2023-12-06 13:09:43 +01:00
parent 309ade3e72
commit faf7c2f782
4 changed files with 9 additions and 7 deletions

View file

@ -12,7 +12,7 @@ import (
func MainHandler(content embed.FS, monsters *[]model.Monster) http.HandlerFunc {
log.Print("MainHandler called")
return func(w http.ResponseWriter, r *http.Request) {
tmpl, err := template.ParseFS(content, "templates/main.html", "templates/monsterForm.html", "templates/monster.html", "templates/monsterTable.html")
tmpl, err := template.ParseFS(content, "templates/main.html", "templates/monsterForm.html", "templates/monster.html", "templates/monsterTable.html", "templates/base.html")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return

View file

@ -46,7 +46,6 @@ func SubmitHandler(content embed.FS, chars *[]model.Character, Monsters *[]model
return
}
log.Printf("Monster hinzugefügt. Anzahl der Monster jetzt: %d\n", len(*Monsters))
// JSON-Daten in die Datei schreiben
err = model.WriteToFile(filename, charJSON)
if err != nil {