update custom.css

This commit is contained in:
aichy126 2022-12-14 16:50:40 +08:00
parent ac97e2b4fa
commit aa6524a246
3 changed files with 64 additions and 1 deletions

View File

@ -155,6 +155,22 @@ func (sc *SiteInfoController) GetRobots(ctx *gin.Context) {
ctx.String(http.StatusOK, resp.Robots)
}
// GetRobots get site robots information
// @Summary get site robots information
// @Description get site robots information
// @Tags site
// @Produce json
// @Success 200 {string} txt ""
// @Router /custom.css [get]
func (sc *SiteInfoController) GetCss(ctx *gin.Context) {
resp, err := sc.siteInfoService.GetSiteCustomCssHTML(ctx)
if err != nil {
ctx.String(http.StatusOK, "")
return
}
ctx.String(http.StatusOK, resp.CustomCss)
}
// UpdateSeo update site seo information
// @Summary update site seo information
// @Description update site seo information

View File

@ -32,6 +32,7 @@ func (a *TemplateRouter) RegisterTemplateRouter(r *gin.RouterGroup) {
r.GET("/sitemap/:page", a.templateController.SitemapPage)
r.GET("/robots.txt", a.siteInfoController.GetRobots)
r.GET("/custom.css", a.siteInfoController.GetCss)
r.GET("/", a.templateController.Index)
r.GET("/index", a.templateController.Index)

View File

@ -1 +1,47 @@
<!doctype html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Answer</title><script defer="defer" src="/static/js/main.9de9552b.js"></script><link href="/static/css/main.d4180d41.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><style>@keyframes _doc-spin{to{transform:rotate(360deg)}}#doc-spinner{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}#doc-spinner .spinner{box-sizing:border-box;display:inline-block;width:2rem;height:2rem;vertical-align:-.125em;border:.25rem solid currentColor;border-right-color:transparent;color:rgba(108,117,125,.75);border-radius:50%;animation:.75s linear infinite _doc-spin}</style><div id="doc-spinner"><div class="spinner"></div></div></div></body></html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/manifest.json" />
<link href="/custom.css" rel="stylesheet">
<title>Answer</title>
<script defer="defer" src="/static/js/main.9de9552b.js"></script>
<link href="/static/css/main.d4180d41.css" rel="stylesheet" />
{{.HeadCode}}
</head>
<body>
{{.HeaderCode}}
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root">
<style>
@keyframes _doc-spin {
to {
transform: rotate(360deg);
}
}
#doc-spinner {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#doc-spinner .spinner {
box-sizing: border-box;
display: inline-block;
width: 2rem;
height: 2rem;
vertical-align: -0.125em;
border: 0.25rem solid currentColor;
border-right-color: transparent;
color: rgba(108, 117, 125, 0.75);
border-radius: 50%;
animation: 0.75s linear infinite _doc-spin;
}
</style>
<div id="doc-spinner"><div class="spinner"></div></div>
</div>
</body>
{{.FooterCode}}
</html>