add param to set dark theme as default

This commit is contained in:
zwbetz 2020-06-02 21:14:46 -05:00
parent b1b83b6fe6
commit 1ca7249810
3 changed files with 9 additions and 1 deletions

View File

@ -130,4 +130,8 @@
}
}
});
{{ if .Site.Params.darkThemeAsDefault }}
darkTheme('screen');
{{ end }}
}());

View File

@ -24,6 +24,7 @@ params:
dateFormat: Jan 2, 2006
codePenUser: someUser
katex: true
darkThemeAsDefault: false
# A list of custom css files can be provided, which must be placed inside
# 'static/'.
# This is useful to override just specific css classes, instead of copying

View File

@ -1,2 +1,5 @@
<script src="{{ "js/prism.js" | absURL }}"></script>
<script src="{{ "js/dom-scripts.js" | absURL }}"></script>
{{ $templateDomScripts := resources.Get "js/template-dom-scripts.js" }}
{{ $domScripts := $templateDomScripts | resources.ExecuteAsTemplate "js/dom-scripts.js" . }}
<script src="{{ $domScripts.Permalink }}"></script>