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

github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzossig <zzossig@gmail.com>2020-10-21 07:19:52 +0300
committerzzossig <zzossig@gmail.com>2020-10-21 07:19:52 +0300
commit8f765a8b357eef623c2f8bdde4fbdbb4a527d892 (patch)
tree9d763f768a67bd8d45b0e7d0cc959e7df2dfc81a /layouts
parent8bfeed9247f03d5a795ec7c603e9ee89137b164d (diff)
exampleSite update
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/comments/utterances.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/comments/utterances.html b/layouts/partials/comments/utterances.html
index 77bdebf..9644dd1 100644
--- a/layouts/partials/comments/utterances.html
+++ b/layouts/partials/comments/utterances.html
@@ -7,8 +7,11 @@
var owner = JSON.parse({{ $owner | jsonify }});
{{ $repo:= .Site.Params.utterances.repo }}
var repo = JSON.parse({{ $repo | jsonify }});
+ {{ $baseTheme:= index .Site.Params.themeOptions 0 }}
+ var baseTheme = JSON.parse({{ $baseTheme | jsonify }});
var localTheme = localStorage.getItem('theme');
- var utterTheme = localTheme === "dark" || localTheme === "hacker" ? 'photon-dark' : localTheme === 'kimbie' ? 'github-dark-orange' : 'github-light'
+ var currentTheme = localTheme || baseTheme;
+ var utterTheme = currentTheme === "dark" ? 'photon-dark' : 'github-light'
var myScript = document.createElement('script');
myScript.setAttribute('src', 'https://utteranc.es/client.js');