admin-lte 4.0.0-rc6 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/README.md +44 -18
- package/dist/UI/general.html +311 -92
- package/dist/UI/icons.html +311 -92
- package/dist/UI/timeline.html +311 -92
- package/dist/css/adminlte.css +2814 -1138
- package/dist/css/adminlte.css.map +1 -1
- package/dist/css/adminlte.min.css +2 -2
- package/dist/css/adminlte.min.css.map +1 -1
- package/dist/css/adminlte.rtl.css +2814 -1138
- package/dist/css/adminlte.rtl.css.map +1 -1
- package/dist/css/adminlte.rtl.min.css +2 -2
- package/dist/css/adminlte.rtl.min.css.map +1 -1
- package/dist/docs/browser-support.html +291 -385
- package/dist/docs/color-mode.html +283 -381
- package/dist/docs/components/main-header.html +269 -363
- package/dist/docs/components/main-sidebar.html +284 -378
- package/dist/docs/customization.html +1056 -0
- package/dist/docs/deployment.html +1121 -0
- package/dist/docs/faq.html +887 -397
- package/dist/docs/getting-started.html +967 -0
- package/dist/docs/how-to-contribute.html +365 -450
- package/dist/docs/index.html +16 -0
- package/dist/docs/integrations.html +1207 -0
- package/dist/docs/introduction.html +483 -434
- package/dist/docs/javascript/accessibility.html +925 -0
- package/dist/docs/javascript/card-widget.html +995 -0
- package/dist/docs/javascript/direct-chat.html +872 -0
- package/dist/docs/javascript/fullscreen.html +881 -0
- package/dist/docs/javascript/layout.html +884 -0
- package/dist/docs/javascript/plugins-overview.html +1120 -0
- package/dist/docs/javascript/pushmenu.html +522 -377
- package/dist/docs/javascript/treeview.html +498 -390
- package/dist/docs/layout-blueprint.html +1063 -0
- package/dist/docs/layout.html +316 -402
- package/dist/docs/license.html +282 -375
- package/dist/docs/migration.html +1125 -0
- package/dist/docs/recipes.html +1161 -0
- package/dist/docs/rtl.html +933 -0
- package/dist/examples/lockscreen.html +66 -2
- package/dist/examples/login-v2.html +65 -1
- package/dist/examples/login.html +65 -1
- package/dist/examples/register-v2.html +65 -1
- package/dist/examples/register.html +65 -1
- package/dist/forms/elements.html +1381 -0
- package/dist/forms/{general.html → layout.html} +382 -452
- package/dist/forms/validation.html +1251 -0
- package/dist/forms/wizard.html +1386 -0
- package/dist/generate/theme.html +135 -5
- package/dist/index.html +311 -92
- package/dist/index2.html +314 -92
- package/dist/index3.html +311 -92
- package/dist/js/adminlte.js +135 -314
- package/dist/js/adminlte.js.map +1 -1
- package/dist/js/adminlte.min.js +3 -3
- package/dist/js/adminlte.min.js.map +1 -1
- package/dist/layout/collapsed-sidebar-without-hover.html +1120 -0
- package/dist/layout/collapsed-sidebar.html +311 -92
- package/dist/layout/fixed-complete.html +311 -92
- package/dist/layout/fixed-footer.html +311 -92
- package/dist/layout/fixed-header.html +311 -92
- package/dist/layout/fixed-sidebar.html +311 -92
- package/dist/layout/layout-custom-area.html +311 -92
- package/dist/layout/layout-rtl.html +311 -92
- package/dist/layout/logo-switch.html +135 -5
- package/dist/layout/sidebar-mini.html +311 -92
- package/dist/layout/unfixed-sidebar.html +311 -92
- package/dist/mailbox/compose.html +1127 -0
- package/dist/mailbox/inbox.html +1477 -0
- package/dist/mailbox/read.html +1178 -0
- package/dist/pages/404.html +213 -0
- package/dist/pages/500.html +201 -0
- package/dist/pages/calendar.html +1242 -0
- package/dist/pages/chat.html +1403 -0
- package/dist/pages/faq.html +1359 -0
- package/dist/pages/file-manager.html +1811 -0
- package/dist/pages/invoice.html +1175 -0
- package/dist/pages/kanban.html +1415 -0
- package/dist/pages/maintenance.html +204 -0
- package/dist/pages/pricing.html +1255 -0
- package/dist/pages/profile.html +1358 -0
- package/dist/pages/projects.html +1620 -0
- package/dist/pages/settings.html +1363 -0
- package/dist/tables/data.html +1295 -0
- package/dist/tables/simple.html +311 -92
- package/dist/widgets/cards.html +311 -92
- package/dist/widgets/info-box.html +311 -92
- package/dist/widgets/small-box.html +311 -92
- package/netlify.toml +16 -0
- package/package.json +32 -26
- package/src/scss/_accessibility.scss +44 -0
- package/src/scss/_app-footer.scss +9 -0
- package/src/scss/_app-header.scss +27 -0
- package/src/scss/_app-sidebar.scss +73 -74
- package/src/scss/_bootstrap-variables.scss +12 -5
- package/src/scss/_docs.scss +816 -0
- package/src/scss/_table.scss +4 -4
- package/src/scss/adminlte.scss +4 -1
- package/src/scss/pages/_login_and_register.scss +1 -1
- package/src/ts/accessibility.ts +9 -7
- package/src/ts/adminlte.ts +2 -14
- package/src/ts/fullscreen.ts +8 -4
- package/src/ts/layout.ts +34 -16
- package/src/ts/push-menu.ts +257 -104
- package/src/ts/util/index.ts +10 -0
- package/.claude/settings.local.json +0 -33
- package/CLAUDE.md +0 -79
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<a href="login.html" class="text-decoration-none">Or sign in as a different user</a>
|
|
95
95
|
</div>
|
|
96
96
|
<div class="lockscreen-footer text-center">
|
|
97
|
-
Copyright © 2014-
|
|
97
|
+
Copyright © 2014-2026
|
|
98
98
|
<b
|
|
99
99
|
><a
|
|
100
100
|
href="https://adminlte.io"
|
|
@@ -153,7 +153,71 @@
|
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
155
|
</script>
|
|
156
|
-
<!--end::OverlayScrollbars Configure-->
|
|
156
|
+
<!--end::OverlayScrollbars Configure--><!--begin::Color Mode Toggle (#6010)-->
|
|
157
|
+
<script>
|
|
158
|
+
(() => {
|
|
159
|
+
'use strict';
|
|
160
|
+
|
|
161
|
+
const STORAGE_KEY = 'lte-theme';
|
|
162
|
+
|
|
163
|
+
const getStoredTheme = () => localStorage.getItem(STORAGE_KEY);
|
|
164
|
+
const setStoredTheme = (theme) => localStorage.setItem(STORAGE_KEY, theme);
|
|
165
|
+
|
|
166
|
+
const prefersDark = () => globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
167
|
+
|
|
168
|
+
const getPreferredTheme = () => {
|
|
169
|
+
const stored = getStoredTheme();
|
|
170
|
+
if (stored) return stored;
|
|
171
|
+
return prefersDark() ? 'dark' : 'light';
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const setTheme = (theme) => {
|
|
175
|
+
const resolved = theme === 'auto' ? (prefersDark() ? 'dark' : 'light') : theme;
|
|
176
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
setTheme(getPreferredTheme());
|
|
180
|
+
|
|
181
|
+
const showActiveTheme = (theme) => {
|
|
182
|
+
// Highlight the active dropdown option
|
|
183
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((el) => {
|
|
184
|
+
el.classList.remove('active');
|
|
185
|
+
el.setAttribute('aria-pressed', 'false');
|
|
186
|
+
const check = el.querySelector('.bi-check-lg');
|
|
187
|
+
if (check) check.classList.add('d-none');
|
|
188
|
+
});
|
|
189
|
+
const active = document.querySelector(`[data-bs-theme-value="${theme}"]`);
|
|
190
|
+
if (active) {
|
|
191
|
+
active.classList.add('active');
|
|
192
|
+
active.setAttribute('aria-pressed', 'true');
|
|
193
|
+
const check = active.querySelector('.bi-check-lg');
|
|
194
|
+
if (check) check.classList.remove('d-none');
|
|
195
|
+
}
|
|
196
|
+
// Sync the topbar trigger icon
|
|
197
|
+
document.querySelectorAll('[data-lte-theme-icon]').forEach((icon) => {
|
|
198
|
+
icon.classList.toggle('d-none', icon.dataset.lteThemeIcon !== theme);
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
203
|
+
const stored = getStoredTheme();
|
|
204
|
+
if (!stored || stored === 'auto') setTheme(getPreferredTheme());
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
208
|
+
showActiveTheme(getPreferredTheme());
|
|
209
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
|
|
210
|
+
toggle.addEventListener('click', () => {
|
|
211
|
+
const theme = toggle.getAttribute('data-bs-theme-value');
|
|
212
|
+
setStoredTheme(theme);
|
|
213
|
+
setTheme(theme);
|
|
214
|
+
showActiveTheme(theme);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
})();
|
|
219
|
+
</script>
|
|
220
|
+
<!--end::Color Mode Toggle-->
|
|
157
221
|
</body>
|
|
158
222
|
<!--end::Body-->
|
|
159
223
|
</html>
|
|
@@ -185,7 +185,71 @@
|
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
</script>
|
|
188
|
-
<!--end::OverlayScrollbars Configure-->
|
|
188
|
+
<!--end::OverlayScrollbars Configure--><!--begin::Color Mode Toggle (#6010)-->
|
|
189
|
+
<script>
|
|
190
|
+
(() => {
|
|
191
|
+
'use strict';
|
|
192
|
+
|
|
193
|
+
const STORAGE_KEY = 'lte-theme';
|
|
194
|
+
|
|
195
|
+
const getStoredTheme = () => localStorage.getItem(STORAGE_KEY);
|
|
196
|
+
const setStoredTheme = (theme) => localStorage.setItem(STORAGE_KEY, theme);
|
|
197
|
+
|
|
198
|
+
const prefersDark = () => globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
199
|
+
|
|
200
|
+
const getPreferredTheme = () => {
|
|
201
|
+
const stored = getStoredTheme();
|
|
202
|
+
if (stored) return stored;
|
|
203
|
+
return prefersDark() ? 'dark' : 'light';
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const setTheme = (theme) => {
|
|
207
|
+
const resolved = theme === 'auto' ? (prefersDark() ? 'dark' : 'light') : theme;
|
|
208
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
setTheme(getPreferredTheme());
|
|
212
|
+
|
|
213
|
+
const showActiveTheme = (theme) => {
|
|
214
|
+
// Highlight the active dropdown option
|
|
215
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((el) => {
|
|
216
|
+
el.classList.remove('active');
|
|
217
|
+
el.setAttribute('aria-pressed', 'false');
|
|
218
|
+
const check = el.querySelector('.bi-check-lg');
|
|
219
|
+
if (check) check.classList.add('d-none');
|
|
220
|
+
});
|
|
221
|
+
const active = document.querySelector(`[data-bs-theme-value="${theme}"]`);
|
|
222
|
+
if (active) {
|
|
223
|
+
active.classList.add('active');
|
|
224
|
+
active.setAttribute('aria-pressed', 'true');
|
|
225
|
+
const check = active.querySelector('.bi-check-lg');
|
|
226
|
+
if (check) check.classList.remove('d-none');
|
|
227
|
+
}
|
|
228
|
+
// Sync the topbar trigger icon
|
|
229
|
+
document.querySelectorAll('[data-lte-theme-icon]').forEach((icon) => {
|
|
230
|
+
icon.classList.toggle('d-none', icon.dataset.lteThemeIcon !== theme);
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
235
|
+
const stored = getStoredTheme();
|
|
236
|
+
if (!stored || stored === 'auto') setTheme(getPreferredTheme());
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
240
|
+
showActiveTheme(getPreferredTheme());
|
|
241
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
|
|
242
|
+
toggle.addEventListener('click', () => {
|
|
243
|
+
const theme = toggle.getAttribute('data-bs-theme-value');
|
|
244
|
+
setStoredTheme(theme);
|
|
245
|
+
setTheme(theme);
|
|
246
|
+
showActiveTheme(theme);
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
})();
|
|
251
|
+
</script>
|
|
252
|
+
<!--end::Color Mode Toggle-->
|
|
189
253
|
<!--end::Script-->
|
|
190
254
|
</body>
|
|
191
255
|
<!--end::Body-->
|
package/dist/examples/login.html
CHANGED
|
@@ -175,7 +175,71 @@
|
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
</script>
|
|
178
|
-
<!--end::OverlayScrollbars Configure-->
|
|
178
|
+
<!--end::OverlayScrollbars Configure--><!--begin::Color Mode Toggle (#6010)-->
|
|
179
|
+
<script>
|
|
180
|
+
(() => {
|
|
181
|
+
'use strict';
|
|
182
|
+
|
|
183
|
+
const STORAGE_KEY = 'lte-theme';
|
|
184
|
+
|
|
185
|
+
const getStoredTheme = () => localStorage.getItem(STORAGE_KEY);
|
|
186
|
+
const setStoredTheme = (theme) => localStorage.setItem(STORAGE_KEY, theme);
|
|
187
|
+
|
|
188
|
+
const prefersDark = () => globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
189
|
+
|
|
190
|
+
const getPreferredTheme = () => {
|
|
191
|
+
const stored = getStoredTheme();
|
|
192
|
+
if (stored) return stored;
|
|
193
|
+
return prefersDark() ? 'dark' : 'light';
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const setTheme = (theme) => {
|
|
197
|
+
const resolved = theme === 'auto' ? (prefersDark() ? 'dark' : 'light') : theme;
|
|
198
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
setTheme(getPreferredTheme());
|
|
202
|
+
|
|
203
|
+
const showActiveTheme = (theme) => {
|
|
204
|
+
// Highlight the active dropdown option
|
|
205
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((el) => {
|
|
206
|
+
el.classList.remove('active');
|
|
207
|
+
el.setAttribute('aria-pressed', 'false');
|
|
208
|
+
const check = el.querySelector('.bi-check-lg');
|
|
209
|
+
if (check) check.classList.add('d-none');
|
|
210
|
+
});
|
|
211
|
+
const active = document.querySelector(`[data-bs-theme-value="${theme}"]`);
|
|
212
|
+
if (active) {
|
|
213
|
+
active.classList.add('active');
|
|
214
|
+
active.setAttribute('aria-pressed', 'true');
|
|
215
|
+
const check = active.querySelector('.bi-check-lg');
|
|
216
|
+
if (check) check.classList.remove('d-none');
|
|
217
|
+
}
|
|
218
|
+
// Sync the topbar trigger icon
|
|
219
|
+
document.querySelectorAll('[data-lte-theme-icon]').forEach((icon) => {
|
|
220
|
+
icon.classList.toggle('d-none', icon.dataset.lteThemeIcon !== theme);
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
225
|
+
const stored = getStoredTheme();
|
|
226
|
+
if (!stored || stored === 'auto') setTheme(getPreferredTheme());
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
230
|
+
showActiveTheme(getPreferredTheme());
|
|
231
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
|
|
232
|
+
toggle.addEventListener('click', () => {
|
|
233
|
+
const theme = toggle.getAttribute('data-bs-theme-value');
|
|
234
|
+
setStoredTheme(theme);
|
|
235
|
+
setTheme(theme);
|
|
236
|
+
showActiveTheme(theme);
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
})();
|
|
241
|
+
</script>
|
|
242
|
+
<!--end::Color Mode Toggle-->
|
|
179
243
|
<!--end::Script-->
|
|
180
244
|
</body>
|
|
181
245
|
<!--end::Body-->
|
|
@@ -194,7 +194,71 @@
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
</script>
|
|
197
|
-
<!--end::OverlayScrollbars Configure-->
|
|
197
|
+
<!--end::OverlayScrollbars Configure--><!--begin::Color Mode Toggle (#6010)-->
|
|
198
|
+
<script>
|
|
199
|
+
(() => {
|
|
200
|
+
'use strict';
|
|
201
|
+
|
|
202
|
+
const STORAGE_KEY = 'lte-theme';
|
|
203
|
+
|
|
204
|
+
const getStoredTheme = () => localStorage.getItem(STORAGE_KEY);
|
|
205
|
+
const setStoredTheme = (theme) => localStorage.setItem(STORAGE_KEY, theme);
|
|
206
|
+
|
|
207
|
+
const prefersDark = () => globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
208
|
+
|
|
209
|
+
const getPreferredTheme = () => {
|
|
210
|
+
const stored = getStoredTheme();
|
|
211
|
+
if (stored) return stored;
|
|
212
|
+
return prefersDark() ? 'dark' : 'light';
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const setTheme = (theme) => {
|
|
216
|
+
const resolved = theme === 'auto' ? (prefersDark() ? 'dark' : 'light') : theme;
|
|
217
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
setTheme(getPreferredTheme());
|
|
221
|
+
|
|
222
|
+
const showActiveTheme = (theme) => {
|
|
223
|
+
// Highlight the active dropdown option
|
|
224
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((el) => {
|
|
225
|
+
el.classList.remove('active');
|
|
226
|
+
el.setAttribute('aria-pressed', 'false');
|
|
227
|
+
const check = el.querySelector('.bi-check-lg');
|
|
228
|
+
if (check) check.classList.add('d-none');
|
|
229
|
+
});
|
|
230
|
+
const active = document.querySelector(`[data-bs-theme-value="${theme}"]`);
|
|
231
|
+
if (active) {
|
|
232
|
+
active.classList.add('active');
|
|
233
|
+
active.setAttribute('aria-pressed', 'true');
|
|
234
|
+
const check = active.querySelector('.bi-check-lg');
|
|
235
|
+
if (check) check.classList.remove('d-none');
|
|
236
|
+
}
|
|
237
|
+
// Sync the topbar trigger icon
|
|
238
|
+
document.querySelectorAll('[data-lte-theme-icon]').forEach((icon) => {
|
|
239
|
+
icon.classList.toggle('d-none', icon.dataset.lteThemeIcon !== theme);
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
244
|
+
const stored = getStoredTheme();
|
|
245
|
+
if (!stored || stored === 'auto') setTheme(getPreferredTheme());
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
249
|
+
showActiveTheme(getPreferredTheme());
|
|
250
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
|
|
251
|
+
toggle.addEventListener('click', () => {
|
|
252
|
+
const theme = toggle.getAttribute('data-bs-theme-value');
|
|
253
|
+
setStoredTheme(theme);
|
|
254
|
+
setTheme(theme);
|
|
255
|
+
showActiveTheme(theme);
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
})();
|
|
260
|
+
</script>
|
|
261
|
+
<!--end::Color Mode Toggle-->
|
|
198
262
|
<!--end::Script-->
|
|
199
263
|
</body>
|
|
200
264
|
<!--end::Body-->
|
|
@@ -180,7 +180,71 @@
|
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
</script>
|
|
183
|
-
<!--end::OverlayScrollbars Configure-->
|
|
183
|
+
<!--end::OverlayScrollbars Configure--><!--begin::Color Mode Toggle (#6010)-->
|
|
184
|
+
<script>
|
|
185
|
+
(() => {
|
|
186
|
+
'use strict';
|
|
187
|
+
|
|
188
|
+
const STORAGE_KEY = 'lte-theme';
|
|
189
|
+
|
|
190
|
+
const getStoredTheme = () => localStorage.getItem(STORAGE_KEY);
|
|
191
|
+
const setStoredTheme = (theme) => localStorage.setItem(STORAGE_KEY, theme);
|
|
192
|
+
|
|
193
|
+
const prefersDark = () => globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
194
|
+
|
|
195
|
+
const getPreferredTheme = () => {
|
|
196
|
+
const stored = getStoredTheme();
|
|
197
|
+
if (stored) return stored;
|
|
198
|
+
return prefersDark() ? 'dark' : 'light';
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
const setTheme = (theme) => {
|
|
202
|
+
const resolved = theme === 'auto' ? (prefersDark() ? 'dark' : 'light') : theme;
|
|
203
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
setTheme(getPreferredTheme());
|
|
207
|
+
|
|
208
|
+
const showActiveTheme = (theme) => {
|
|
209
|
+
// Highlight the active dropdown option
|
|
210
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((el) => {
|
|
211
|
+
el.classList.remove('active');
|
|
212
|
+
el.setAttribute('aria-pressed', 'false');
|
|
213
|
+
const check = el.querySelector('.bi-check-lg');
|
|
214
|
+
if (check) check.classList.add('d-none');
|
|
215
|
+
});
|
|
216
|
+
const active = document.querySelector(`[data-bs-theme-value="${theme}"]`);
|
|
217
|
+
if (active) {
|
|
218
|
+
active.classList.add('active');
|
|
219
|
+
active.setAttribute('aria-pressed', 'true');
|
|
220
|
+
const check = active.querySelector('.bi-check-lg');
|
|
221
|
+
if (check) check.classList.remove('d-none');
|
|
222
|
+
}
|
|
223
|
+
// Sync the topbar trigger icon
|
|
224
|
+
document.querySelectorAll('[data-lte-theme-icon]').forEach((icon) => {
|
|
225
|
+
icon.classList.toggle('d-none', icon.dataset.lteThemeIcon !== theme);
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
230
|
+
const stored = getStoredTheme();
|
|
231
|
+
if (!stored || stored === 'auto') setTheme(getPreferredTheme());
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
235
|
+
showActiveTheme(getPreferredTheme());
|
|
236
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
|
|
237
|
+
toggle.addEventListener('click', () => {
|
|
238
|
+
const theme = toggle.getAttribute('data-bs-theme-value');
|
|
239
|
+
setStoredTheme(theme);
|
|
240
|
+
setTheme(theme);
|
|
241
|
+
showActiveTheme(theme);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
})();
|
|
246
|
+
</script>
|
|
247
|
+
<!--end::Color Mode Toggle-->
|
|
184
248
|
<!--end::Script-->
|
|
185
249
|
</body>
|
|
186
250
|
<!--end::Body-->
|