added favicon
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2024-05-14 11:46:29 +02:00
parent 3c797f0850
commit bb2a195007
4 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,8 @@ func GetStatic(staticfiles *embed.FS, c echo.Context) (err error) {
c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJavaScript) c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJavaScript)
} else if strings.HasSuffix(name, ".css") { } else if strings.HasSuffix(name, ".css") {
c.Response().Header().Set(echo.HeaderContentType, "text/css") c.Response().Header().Set(echo.HeaderContentType, "text/css")
} else if strings.HasSuffix(name, ".ico") {
c.Response().Header().Set(echo.HeaderContentType, "image/x-icon")
} }
c.Response().Header().Add(echo.HeaderCacheControl, "max-age=172800") c.Response().Header().Add(echo.HeaderCacheControl, "max-age=172800")
return c.String(http.StatusOK, string(content)) return c.String(http.StatusOK, string(content))

BIN
static/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -8,4 +8,5 @@ import (
// //
//go:embed css/* //go:embed css/*
//go:embed js/* //go:embed js/*
//go:embed images/*
var Static embed.FS var Static embed.FS

View File

@ -4,6 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="static/images/favicon.ico"/>
<link rel="stylesheet" href="static/css/main.css" /> <link rel="stylesheet" href="static/css/main.css" />
<link rel="stylesheet" href="static/css/uikit.min.css" /> <link rel="stylesheet" href="static/css/uikit.min.css" />
<link rel="stylesheet" href="static/css/font-awesome.min.css" /> <link rel="stylesheet" href="static/css/font-awesome.min.css" />