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>
|
</head>
|
||||||
|
|
||||||
<body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}">
|
<body class="{{ if eq .Kind `page` }}single{{ else }}list{{ if .IsHome }} home{{ end }}{{ end }}">
|
||||||
|
{{- if $.Site.Params.SetThemeAuto -}}
|
||||||
<script>
|
<script>
|
||||||
setTheme();
|
setTheme();
|
||||||
</script>
|
</script>
|
||||||
|
{{- end -}}
|
||||||
<header class="header">
|
<header class="header">
|
||||||
{{- partial "header.html" . }}
|
{{- partial "header.html" . }}
|
||||||
</header>
|
</header>
|
||||||
|
@ -32,5 +32,7 @@
|
|||||||
{{- template "_internal/opengraph.html" . }}
|
{{- template "_internal/opengraph.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<!-- Script -->
|
<!-- Script -->
|
||||||
|
{{- if $.Site.Params.SetThemeAuto -}}
|
||||||
{{ $settheme := resources.Get "set-theme.js" | minify }}
|
{{ $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