From d7d6b817bdd7c46d0631753283bf710ee4daab85 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 12 Nov 2023 15:26:10 +0000 Subject: [PATCH] Theme Files Update --- layouts/404.html | 8 +++--- layouts/_default/baseof.html | 37 +++++++++++++++------------ layouts/_default/single.html | 2 +- layouts/partials/header.html | 12 ++++----- layouts/partials/structured-data.html | 6 ++--- layouts/partials/svg.html | 18 +++++++++++++ layouts/posts/single.html | 8 +++--- 7 files changed, 54 insertions(+), 37 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index 38a201d..4739c64 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,14 +1,12 @@ {{ define "main" }}
-

- 404-lighthouse -

+

{{- partial "svg.html" (dict "context" . "name" "404-lighthouse") -}}

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f44d642..108853f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,15 +1,20 @@ - -{{- partial "analytics.html" . }} +{{- partial "analytics.html" . -}} + -{{- with .Site.Params.themeColor }} + + +{{ $author := (.Params.author | default .Site.Params.author.name) -}} + +{{ with .Site.Params.themeColor -}} {{- end -}} +{{- with .Params.description -}}{{- end -}} {{- partial "structured-data.html" . -}} {{- partial "favicons.html" -}} {{.Title}} @@ -19,21 +24,19 @@ {{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}} {{- range .Params.custom_css -}}{{- end -}} -{{- block "head" . -}}{{- end }} -{{- if templates.Exists "partials/extra-head.html" -}}{{ partial "extra-head.html" . }}{{- end }} - - +{{- block "head" . -}}{{- end -}} +{{- if templates.Exists "partials/extra-head.html" -}}{{- partial "extra-head.html" . -}}{{- end -}} - {{ block "header" . -}}{{ end -}} - {{ block "main" . -}}{{ end -}} - {{ block "footer" . -}}{{ end }} - {{ partial "scroll-to-top.html" . }} - {{ $main := resources.Get "js/main.js" -}} - {{ if .Site.Params.code_copy_button | default true -}} + {{- block "header" . -}}{{ end -}} + {{- block "main" . -}}{{ end -}} + {{- block "footer" . -}}{{ end }} + {{- partial "scroll-to-top.html" . }} + {{- $main := resources.Get "js/main.js" -}} + {{- if .Site.Params.code_copy_button | default true -}} {{ $codeCopy := resources.Get "js/code-copy.js" -}} {{ $script := slice $main $codeCopy | resources.Concat "js/bundle.js" | minify | fingerprint -}} - {{ else -}} + {{- else -}} {{ $script := $main | minify | fingerprint -}} {{- end -}} @@ -41,9 +44,9 @@ {{ $linkshare := resources.Get "js/link-share.js" | minify | fingerprint -}} {{- end -}} - {{ range .Params.custom_js -}}{{- end }} - {{ partial "mathjax.html" . }} - {{- if templates.Exists "partials/extra-foot.html" -}}{{ partial "extra-foot.html" . }}{{- end }} + {{- range .Params.custom_js -}}{{- end }} + {{- partial "mathjax.html" . -}} + {{- if templates.Exists "partials/extra-foot.html" -}}{{- partial "extra-foot.html" . -}}{{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9ba7177..8511109 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -19,7 +19,7 @@

{{ .Title }}

- {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }} + {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }}
{{- if .Params.comments }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index da5ce02..8562162 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -4,22 +4,20 @@ - +
{{ if (or .Params.images .Params.featuredImg) -}} - + {{- end }} {{- with .Params.toc -}} - + {{- end -}} {{- with .Site.Params.socialLinks -}} - {{ partialCached "social-icons.html" . }} + {{- partialCached "social-icons.html" . -}} {{- end -}} {{- if and (not (eq .Site.Params.shareSocial nil)) (.Site.Params.shareSocial) -}}{{- partial "social-share.html" . -}}{{- end -}} - +
diff --git a/layouts/partials/structured-data.html b/layouts/partials/structured-data.html index 4bfb909..5693634 100644 --- a/layouts/partials/structured-data.html +++ b/layouts/partials/structured-data.html @@ -1,6 +1,6 @@ {{/* We use some Hugo built-in templates, you can find their source here: */}} {{/* https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}} -{{- template "_internal/schema.html" . }} -{{- template "_internal/opengraph.html" . }} -{{- template "_internal/twitter_cards.html" . }} +{{- template "_internal/schema.html" . -}} +{{- template "_internal/opengraph.html" . -}} +{{- template "_internal/twitter_cards.html" . -}} \ No newline at end of file diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 32d6a78..cd8bbc3 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -82,6 +82,24 @@ {{- else if (eq .name "share_2") -}} +{{- else if (eq .name "toc") -}} + +{{- else if (eq .name "featuredImg") -}} + +{{- else if (eq .name "menuBtn") -}} + +{{- else if (eq .name "content-anchor") -}} + +{{- else if (eq .name "next") -}} + +{{- else if (eq .name "previous") -}} + +{{- else if (eq .name "404-lighthouse") -}} +404-lighthouse +{{- else if (eq .name "404-home") -}} + +{{- else if (eq .name "404-archive") -}} + {{- else -}} {{- end -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index f5d8f38..499832a 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -24,7 +24,7 @@

{{ .Title }}

- {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }} + {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }}
{{- if .Site.Params.relatedPosts }} {{- partial "related-posts.html" . -}} @@ -41,7 +41,7 @@
- {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }} + {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }}
{{- if .Site.Params.relatedPosts }} {{- partial "related-posts.html" . -}} @@ -57,12 +57,12 @@
{{- with .NextInSection }} {{- end }} {{- with .PrevInSection }} {{- end }}