diff --git a/cmd/httpServer.go b/cmd/httpServer.go index 331a47f..6588ccb 100644 --- a/cmd/httpServer.go +++ b/cmd/httpServer.go @@ -29,6 +29,8 @@ func WebServer() { LoadHTMLFromEmbedFS(r, templatesFolder, "templates/*.html") r.StaticFileFS("/style.css", "./templates/style.css", http.FS(templatesFolder)) r.StaticFileFS("/htmx.js", "./templates/htmx.js", http.FS(templatesFolder)) + setFavicons(r) + r.GET("/", getRoot) r.GET("/command/:clientid", getCommands) r.POST("/command/:clientid", execCMD) @@ -111,3 +113,13 @@ func execCMD(c *gin.Context) { prettyOut := strings.Replace(out, "\n", "
", -1) c.String(http.StatusOK, "$ "+command+"
"+prettyOut) } + +func setFavicons(r *gin.Engine) { + r.StaticFileFS("/favicon.ico", "./templates/assets/favicon.ico", http.FS(templatesFolder)) + r.StaticFileFS("/favicon-32x32.png", "./templates/assets/favicon-32x32.png", http.FS(templatesFolder)) + r.StaticFileFS("/favicon-16x16.png", "./templates/assets/favicon-16x16.png", http.FS(templatesFolder)) + r.StaticFileFS("/apple-touch-icon.png", "./templates/assets/apple-touch-icon.png", http.FS(templatesFolder)) + r.StaticFileFS("/android-chrome-512x512.png", "./templates/assets/android-chrome-512x512.png", http.FS(templatesFolder)) + r.StaticFileFS("/android-chrome-192x192.png", "./templates/assets/android-chrome-192x192.png", http.FS(templatesFolder)) + r.StaticFileFS("/site.webmanifest", "./templates/assets/site.webmanifest", http.FS(templatesFolder)) +} diff --git a/cmd/templates/assets/android-chrome-192x192.png b/cmd/templates/assets/android-chrome-192x192.png new file mode 100644 index 0000000..09a9a11 Binary files /dev/null and b/cmd/templates/assets/android-chrome-192x192.png differ diff --git a/cmd/templates/assets/android-chrome-512x512.png b/cmd/templates/assets/android-chrome-512x512.png new file mode 100644 index 0000000..0070eac Binary files /dev/null and b/cmd/templates/assets/android-chrome-512x512.png differ diff --git a/cmd/templates/assets/apple-touch-icon.png b/cmd/templates/assets/apple-touch-icon.png new file mode 100644 index 0000000..8338edb Binary files /dev/null and b/cmd/templates/assets/apple-touch-icon.png differ diff --git a/cmd/templates/assets/favicon-16x16.png b/cmd/templates/assets/favicon-16x16.png new file mode 100644 index 0000000..4ae71e2 Binary files /dev/null and b/cmd/templates/assets/favicon-16x16.png differ diff --git a/cmd/templates/assets/favicon-32x32.png b/cmd/templates/assets/favicon-32x32.png new file mode 100644 index 0000000..8992765 Binary files /dev/null and b/cmd/templates/assets/favicon-32x32.png differ diff --git a/cmd/templates/assets/favicon.ico b/cmd/templates/assets/favicon.ico new file mode 100644 index 0000000..f3bd4f4 Binary files /dev/null and b/cmd/templates/assets/favicon.ico differ diff --git a/cmd/templates/assets/site.webmanifest b/cmd/templates/assets/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/cmd/templates/assets/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file