55
55
--lmcccm-btn-secondary-hover-text : var (--lmcccm-link-hover-text );
56
56
--lmcccm-btn-secondary-active-text : var (--lmcccm-link-active-text );
57
57
}
58
-
59
- # darkmode-icon-moon {
60
- display : none;
61
- }
62
-
63
- .c_darkmode # darkmode-icon-moon {
64
- display : inline;
65
- }
66
-
67
- .c_darkmode # darkmode-icon-sun {
68
- display : none;
69
- }
70
58
</ style >
71
59
</ head >
72
60
< body style ="padding-bottom: 380px ">
@@ -138,8 +126,17 @@ <h2 class="mt-4 mt-md-5 mb-3">Without Spirit Design System</h2>
138
126
Head over to < a href ="https://github.com/lmc-eu/cookie-consent-manager#without-spirit-design-system "> README</ a >
139
127
to get the full list of available CSS custom properties.
140
128
</ p >
129
+ < div class ="mb-4 p-3 border rounded d-flex ">
130
+ < label class ="form-check-label flex-fill " for ="f_custom-theme ">
131
+ < i class ="bi bi-palette me-2 "> </ i >
132
+ Apply custom theme
133
+ </ label >
134
+ < div class ="form-check form-switch ">
135
+ < input class ="form-check-input " type ="checkbox " id ="f_custom-theme " onchange ="document.documentElement.classList.toggle('custom-theme') " autocomplete ="off ">
136
+ </ div >
137
+ </ div >
141
138
< details class ="mb-4 ">
142
- < summary class ="link-primary "> Example theme: </ summary >
139
+ < summary class ="link-primary "> Show source </ summary >
143
140
< pre class ="mt-4 "> < code class ="language-css "> :root {
144
141
--lmcccm-font-family: 'Noto Sans', 'Roboto', 'Open Sans', system-ui, sans-serif;
145
142
--lmcccm-base-font-size: 14px;
@@ -160,28 +157,24 @@ <h2 class="mt-4 mt-md-5 mb-3">Without Spirit Design System</h2>
160
157
--lmcccm-btn-secondary-active-text: var(--lmcccm-link-active-text);
161
158
}</ code > </ pre >
162
159
</ details >
163
- < p >
164
- < button type ="button " class ="btn btn-outline-primary " onclick ="document.documentElement.classList.toggle('custom-theme') ">
165
- < i class ="bi bi-palette "> </ i >
166
- Toggle custom theme
167
- </ button >
168
- </ p >
169
160
170
161
< h2 class ="mt-4 mt-md-5 mb-3 "> Dark Mode</ h2 >
171
162
< p class ="mb-4 ">
172
- Default dark mode of Cookie Consent Manager is rather a dark version than a real dark mode
163
+ The default dark mode of Cookie Consent Manager is rather a dark version than a real dark mode,
173
164
which is not yet supported by Spirit (if it was, it would apply less contrasting colors).
174
165
But it's available for you to have more design choices to choose from. You can
175
166
< a href ="https://github.com/lmc-eu/cookie-consent-manager#dark-mode "> customize</ a >
176
167
dark mode colors the same way as the default light color scheme.
177
168
</ p >
178
- < p >
179
- < button type ="button " class ="btn btn-outline-dark " onclick ="document.body.classList.toggle('c_darkmode') ">
180
- < i id ="darkmode-icon-moon " class ="bi bi-moon "> </ i >
181
- < i id ="darkmode-icon-sun " class ="bi bi-sun "> </ i >
182
- Toggle dark mode
183
- </ button >
184
- </ p >
169
+ < div class ="p-3 border rounded d-flex ">
170
+ < label class ="form-check-label flex-fill " for ="f_dark-mode ">
171
+ < i class ="bi bi-moon me-2 "> </ i >
172
+ Turn on dark mode
173
+ </ label >
174
+ < div class ="form-check form-switch ">
175
+ < input class ="form-check-input " type ="checkbox " id ="f_dark-mode " onchange ="document.body.classList.toggle('c_darkmode'); " autocomplete ="off ">
176
+ </ div >
177
+ </ div >
185
178
186
179
</ div >
187
180
</ div >
0 commit comments