fehlerbehebung

This commit is contained in:
xoy 2023-01-29 19:06:30 +01:00
parent ce5bd86c11
commit 3e8f81ed4c
2 changed files with 9 additions and 9 deletions

View File

@ -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/"))

14
main.go
View File

@ -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() {