Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-12 19:45:19 +0300
committerGitHub <noreply@github.com>2020-05-12 19:45:19 +0300
commit762a7e538d291e0ede8ca4d64b2fcf12ec5d8e9c (patch)
treef06f89d019773095e90e74f06d3bf699d0e9da44 /layouts/_default
parent6aa05a7f3e4ab75d4c7847d15a4af36375d1c4f0 (diff)
feat(compatibility): improve compatibility for Hugo basic version (#352)
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/baseof.html6
1 files changed, 2 insertions, 4 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index cf923ba..9490a6e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -27,9 +27,7 @@
{{- end -}}
{{- .Scratch.Set "params" $params -}}
-
-{{- $this := dict "desktop" .Site.Params.header.desktopMode "mobile" .Site.Params.header.mobileMode | dict "headerMode" | dict "config" -}}
-{{- .Scratch.Set "this" $this -}}
+{{- .Scratch.Set "this" dict -}}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
@@ -47,7 +45,7 @@
{{- partial "head/link.html" . -}}
{{- partial "head/seo.html" . -}}
</head>
- <body>
+ <body header-desktop="{{ .Site.Params.header.desktopMode }}" header-mobile="{{ .Site.Params.header.mobileMode }}">
{{- /* Check theme isDark before body rendering */ -}}
{{- $theme := .Site.Params.defaulttheme -}}
<script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ $theme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ $theme }}' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>