diff options
author | Darshan Baral <darshanbaral@gmail.com> | 2019-05-11 05:53:59 +0300 |
---|---|---|
committer | Darshan Baral <darshanbaral@gmail.com> | 2019-05-11 05:53:59 +0300 |
commit | 85edb517826c9505aa7ff30ec4756010f3c0e5cd (patch) | |
tree | 14138f3fd01c9d2897de70425ec90026e449db1a | |
parent | ce1364720db399894d3063422e5cf5bb6c7a07ae (diff) |
Can chhose base theme in config.toml
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/partials/main.html | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index b7ff329..7c4c6f1 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,7 +7,7 @@ theme = "aafu" author = "Darshan Baral"
description = "Website title"
copyright = "aaa"
- copyright_link = "#"
+ useDarkTheme = false
# Profile section
[params.profile]
diff --git a/layouts/partials/main.html b/layouts/partials/main.html index da0e74a..780f848 100644 --- a/layouts/partials/main.html +++ b/layouts/partials/main.html @@ -24,5 +24,11 @@ </div>
{{ end }}
<script src="{{ .Site.BaseURL }}/js/accordion.js"></script>
+ <script>
+ let isBaseThemeDark = {{ .Site.Params.useDarkTheme }};
+ if (isBaseThemeDark) {
+ toggleTheme();
+ }
+ </script>
</div>
</div>
|