Embed CSS to binary

This commit is contained in:
raul 2024-05-24 07:59:10 +02:00
parent 478ca2cdfa
commit 97f4effe72
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,9 @@ func server() {
} }
r := gin.Default() r := gin.Default()
LoadHTMLFromEmbedFS(r, templateFolder, "templates/*.html") LoadHTMLFromEmbedFS(r, templateFolder, "templates/*.html")
r.Static("/css", "./cmd/templates/css")
//r.Static("/css", "./cmd/templates/css")
r.StaticFileFS("/css/style.css", "./templates/css/style.css", http.FS(templateFolder))
r.GET("/", returnIndex) r.GET("/", returnIndex)
r.GET("/cacert", returnCacert) r.GET("/cacert", returnCacert)