From d043e75dfd35789170b6af9bb73380158c811560 Mon Sep 17 00:00:00 2001 From: xing Date: Sun, 19 Feb 2023 13:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/theme/common/siteicon.go | 2 +- internal/theme/twentyfifteen/colorschemecss.go | 2 +- internal/theme/twentyfifteen/layout/base.gohtml | 7 ++----- internal/theme/twentyfifteen/layout/head.gohtml | 12 +++++++----- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/internal/theme/common/siteicon.go b/internal/theme/common/siteicon.go index ebbb19b..960a9bf 100644 --- a/internal/theme/common/siteicon.go +++ b/internal/theme/common/siteicon.go @@ -30,7 +30,7 @@ func (h *Handle) CalSiteIcon() (r string) { case "site_icon-270": return fmt.Sprintf(``, m, s.File), true case "site_icon-180": - return fmt.Sprintf(`"`, m, s.File), true + return fmt.Sprintf(``, m, s.File), true default: ss := strings.Replace(t, "site_icon-", "", 1) return fmt.Sprintf(``, m, s.File, ss, ss), true diff --git a/internal/theme/twentyfifteen/colorschemecss.go b/internal/theme/twentyfifteen/colorschemecss.go index c60ec3a..53a1c95 100644 --- a/internal/theme/twentyfifteen/colorschemecss.go +++ b/internal/theme/twentyfifteen/colorschemecss.go @@ -11,7 +11,7 @@ func (h *handle) colorSchemeCss() string { s := slice.Filter([]string{h.calColorSchemeCss(), h.calSidebarTextColorCss(), h.calHeaderBackgroundColorCss()}, func(s string) bool { return s != "" }) - return fmt.Sprintf(`\n`, "twentyfifteen-style", "", strings.Join(s, "\n")) + return fmt.Sprintf(``, "twentyfifteen-style", "", strings.Join(s, "\n")) } func (h *handle) calColorSchemeCss() (r string) { color := h.getColorScheme() diff --git a/internal/theme/twentyfifteen/layout/base.gohtml b/internal/theme/twentyfifteen/layout/base.gohtml index 9c5558f..53be8fd 100644 --- a/internal/theme/twentyfifteen/layout/base.gohtml +++ b/internal/theme/twentyfifteen/layout/base.gohtml @@ -1,11 +1,8 @@ {{ define "layout/base"}} - - {{template "layout/head" .}} - {{block "head" .}} - {{end}} - + {{template "layout/head" .}} + {{template "svg"}}
diff --git a/internal/theme/twentyfifteen/layout/head.gohtml b/internal/theme/twentyfifteen/layout/head.gohtml index 2f529bc..56c155e 100644 --- a/internal/theme/twentyfifteen/layout/head.gohtml +++ b/internal/theme/twentyfifteen/layout/head.gohtml @@ -1,4 +1,5 @@ {{define "layout/head"}} + @@ -44,6 +45,9 @@ + {{if .colorScheme}} + {{.colorScheme|unescaped}} + {{end}}