From fecc9b268410c8fefcd1ca32bc4228bba9002178 Mon Sep 17 00:00:00 2001 From: GNUxeava Date: Fri, 11 Mar 2022 10:32:10 +0530 Subject: use theme --- layouts/partials/scripts.html | 135 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 layouts/partials/scripts.html (limited to 'layouts/partials/scripts.html') diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..71fe659 --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,135 @@ + +{{- if .Site.Params.highlightInClient -}} + +{{- end -}} + + +{{- if .Site.Params.publicCDN.enable }} + {{ .Site.Params.publicCDN.jquery | safeHTML }} + {{ .Site.Params.publicCDN.slideout | safeHTML }} + {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJS | safeHTML }}{{ end }} +{{- else -}} + + + {{ if .Site.Params.fancybox }}{{ end }} +{{- end -}} + + +{{- if and (or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false))) (or .IsPage .IsHome) }} + {{- if .Site.Params.publicCDN.enable }} + {{ .Site.Params.publicCDN.timeagoJS | safeHTML }} + {{ .Site.Params.publicCDN.timeagoLocalesJS | safeHTML }} + {{- else }} + + + {{- end }} + +{{- end -}} + + +{{- if and (or .Params.flowchartDiagrams.enable (and .Site.Params.flowchartDiagrams.enable (ne .Params.flowchartDiagrams.enable false))) (or .IsPage .IsHome) -}} + + {{- if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.flowchartDiagramsJS | safeHTML }} + {{- else -}} + + + {{- end -}} +{{- end -}} + + +{{- if and (or .Params.sequenceDiagrams.enable (and .Site.Params.sequenceDiagrams.enable (ne .Params.sequenceDiagrams.enable false))) (or .IsPage .IsHome) -}} + + {{- if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.sequenceDiagramsJS | safeHTML }} + {{ .Site.Params.publicCDN.sequenceDiagramsCSS | safeHTML }} + {{- else -}} + + + + + + {{- end -}} +{{- end }} +{{ $even := resources.Get "js/even.js" }} +{{ $main := resources.Get "js/main.js" }} +{{ $js := slice $even $main | resources.Concat "js/main.js" | minify | fingerprint }} + + +{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }} + + {{ if .Site.Params.mathjaxUseLocalFiles -}} + + {{- else -}} + + {{- end }} +{{- end }} + + +{{- if (in (slice (getenv "HUGO_ENV") hugo.Environment) "production") | and .Site.GoogleAnalytics -}} + {{ template "_internal/google_analytics_async.html" . }} +{{- end -}} + +{{- with .Site.Params.baiduAnalytics -}} + +{{- end }} + + +{{- if .Site.Params.baiduPush -}} + +{{- end }} + + +{{ range .Site.Params.customJS -}} + +{{ end }} -- cgit v1.2.3