From 04fdcac1dce2cc439dd8ad1b115507671040737e Mon Sep 17 00:00:00 2001 From: Miqdd Date: Mon, 22 Jan 2024 06:39:54 +0700 Subject: Publish --- layouts/partials/header.html | 104 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 layouts/partials/header.html (limited to 'layouts/partials/header.html') diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..ad3ae4c --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,104 @@ + + + + {{- $title := ( .Title ) -}} + {{- $siteTitle := ( .Site.Title ) -}} + {{- if .IsHome -}} + {{ $siteTitle }} | Home + {{- else -}} + {{ $title }} - {{ $siteTitle }} + {{- end -}} + + {{- if isset .Site.Params "favicon" -}} + + {{- end -}} + + + + + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{- template "_internal/opengraph.html" . -}} + {{- template "_internal/twitter_cards.html" . -}} + {{ if and (isset .Site.Params "social") (.Site.Params.useCDN | default false) -}} + + {{- else if or (isset .Site.Params "social") (eq .Site.Params.mode "toggle") -}} + + {{ end }} + {{ if .Site.Params.useCDN | default false -}} + + + + {{- else -}} + {{ $fontstyle := resources.Get "css/fonts.css" | fingerprint }} + + {{ end }} + + {{ $style := resources.Get "css/main.css" | fingerprint }} + + + {{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") (eq .Site.Params.mode "toggle") -}} + {{ $darkstyle := resources.Get "css/dark.css" | fingerprint }} + + {{ end }} + + + {{ with .Site.Params.mathjax }} + + + + + {{ end }} + + + {{ with .Site.Params.katex }} + + + + + + + {{ end }} + + + {{- if isset .Site.Params "customcss" }} + {{ range .Site.Params.customCSS }} + {{ $customstyle := resources.Get . | fingerprint }} + + {{ end }} + {{- end -}} + {{- range .Site.Params.customJS }} + {{- if or (hasPrefix . "http://") (hasPrefix . "https://") }} + + {{- else if (hasPrefix . " + {{- end }} + {{- end }} + -- cgit v1.2.3