mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
SetThemeAuto: disable auto theme set by default
- user needs to add + params: SetThemeAuto: true
This commit is contained in:
parent
8a0783adfb
commit
338027b046
@ -6,9 +6,11 @@
|
||||
</head>
|
||||
|
||||
<body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}">
|
||||
{{- if $.Site.Params.SetThemeAuto -}}
|
||||
<script>
|
||||
setTheme();
|
||||
</script>
|
||||
{{- end -}}
|
||||
<header class="header">
|
||||
{{- partial "header.html" . }}
|
||||
</header>
|
||||
|
@ -32,5 +32,7 @@
|
||||
{{- template "_internal/opengraph.html" . }}
|
||||
{{- end }}
|
||||
<!-- Script -->
|
||||
{{- if $.Site.Params.SetThemeAuto -}}
|
||||
{{ $settheme := resources.Get "set-theme.js" | minify }}
|
||||
<script src="{{ $settheme.Permalink }}"></script>
|
||||
<script src="{{ $settheme.Permalink }}"></script>
|
||||
{{- end -}}
|
Loading…
Reference in New Issue
Block a user