chore: replace main color

pull/1628/head
Noah Hsu 2022-09-08 22:21:52 +08:00
parent dea87d098d
commit 362d48aa98
1 changed files with 6 additions and 4 deletions

View File

@ -33,13 +33,15 @@ func UpdateIndex() {
title := setting.GetStr(conf.SiteTitle)
customizeHead := setting.GetStr(conf.CustomizeHead)
customizeBody := setting.GetStr(conf.CustomizeBody)
mainColor := setting.GetStr(conf.MainColor)
conf.ManageHtml = conf.RawIndexHtml
replaceMap1 := map[string]string{
"https://jsd.nn.ci/gh/alist-org/logo@main/logo.svg": favicon,
"Loading...": title,
"cdn: undefined": fmt.Sprintf("cdn: '%s'", cdn),
"base_path: undefined": fmt.Sprintf("base_path: '%s'", basePath),
"api: undefined": fmt.Sprintf("api: '%s'", apiUrl),
"Loading...": title,
"cdn: undefined": fmt.Sprintf("cdn: '%s'", cdn),
"base_path: undefined": fmt.Sprintf("base_path: '%s'", basePath),
"api: undefined": fmt.Sprintf("api: '%s'", apiUrl),
"main_color: undefined": fmt.Sprintf("main_color: '%s'", mainColor),
}
for k, v := range replaceMap1 {
conf.ManageHtml = strings.Replace(conf.ManageHtml, k, v, 1)