This commit is contained in:
parent
3c797f0850
commit
bb2a195007
@ -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
BIN
static/images/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -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
|
||||||
|
@ -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" />
|
||||||
|
Loading…
Reference in New Issue
Block a user