Commit f893b50 1 parent 60c5c3b commit f893b50 Copy full SHA for f893b50
File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*!
2
+ * This is a Docsy-adapted version of https://github.com/twbs/examples/blob/main/color-modes/js/color-modes.js.
3
+ *
4
+ * Original header:
5
+ *
2
6
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
3
7
* Copyright 2011-2024 The Bootstrap Authors
4
8
* Licensed under the Creative Commons Attribution 3.0 Unported License.
7
11
( ( ) => {
8
12
'use strict'
9
13
10
- const getStoredTheme = ( ) => localStorage . getItem ( 'theme' )
11
- const setStoredTheme = theme => localStorage . setItem ( 'theme' , theme )
14
+ const themeKey = 'td-color-theme'
15
+ const getStoredTheme = ( ) => localStorage . getItem ( themeKey )
16
+ const setStoredTheme = theme => localStorage . setItem ( themeKey , theme )
12
17
13
18
const getPreferredTheme = ( ) => {
14
19
const storedTheme = getStoredTheme ( )
Original file line number Diff line number Diff line change 74
74
{{ end -}}
75
75
76
76
{{ if .Site.Params.ui.showLightDarkModeMenu -}}
77
- {{ $jsArray = $jsArray | append (resources.Get "js/color -mode.js") -}}
77
+ {{ $jsArray = $jsArray | append (resources.Get "js/dark -mode.js") -}}
78
78
{{ end -}}
79
79
80
80
{{ $js := $jsArray | resources.Concat "js/main.js" -}}
You can’t perform that action at this time.
0 commit comments