From 3e8f81ed4c91badad7c7bebc5221823b7f382a1e Mon Sep 17 00:00:00 2001 From: xoy Date: Sun, 29 Jan 2023 19:06:30 +0100 Subject: [PATCH] fehlerbehebung --- html.go | 4 ++-- main.go | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/html.go b/html.go index 5e114ea..fd7e6f7 100644 --- a/html.go +++ b/html.go @@ -84,8 +84,8 @@ func htmlReplacer(input string, activePage string) string { tempB += "!SPLIT" } output = strings.ReplaceAll(output, "!EVENTS", htmlElement("div", strings.ReplaceAll(tempB, "!SPLIT", ""), "class=\"eventList\"")) - tempC := strings.Split(tempB, "!SPLIT") - output = strings.ReplaceAll(output, "!NEXTEVENTS", htmlElement("div", tempC[0]+tempC[1]+tempC[2]+tempC[3], "class=\"eventList\"")) + //tempC := strings.Split(tempB, "!SPLIT") + //output = strings.ReplaceAll(output, "!NEXTEVENTS", htmlElement("div", tempC[0]+tempC[1]+tempC[2]+tempC[3], "class=\"eventList\"")) } output = strings.ReplaceAll(output, "!NEWBANNER", htmlNewBanner("Rundgang", "https://www.chaostreff-dortmund.de/rundgang/")) diff --git a/main.go b/main.go index c73d9c9..0adbea0 100644 --- a/main.go +++ b/main.go @@ -43,19 +43,19 @@ func handler() { //events handleEvents() - //pages - logger("----------------HANDLE PAGES----------------") - httpHandleFunc("", "./web/pages/home.html", "text/html") - handleFilesInFolder("", "./web/pages/", true) - logger("----------------HANDLE END----------------") + //images + handleImages() //styles logger("----------------HANDLE STYLES----------------") handleFilesInFolder("style/", "./web/styles/", false) logger("----------------HANDLE END----------------") - //images - handleImages() + //pages + logger("----------------HANDLE PAGES----------------") + httpHandleFunc("", "./web/pages/home.html", "text/html") + handleFilesInFolder("", "./web/pages/", true) + logger("----------------HANDLE END----------------") } func handleEvents() {