admin-lte 4.0.0-rc7 → 4.0.1
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 +69 -0
- package/README.md +202 -102
- package/dist/UI/general.html +330 -129
- package/dist/UI/icons.html +330 -129
- package/dist/UI/timeline.html +330 -129
- package/dist/css/adminlte.css +2798 -1167
- 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 +2798 -1167
- 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 +287 -399
- package/dist/docs/color-mode.html +268 -384
- package/dist/docs/components/main-header.html +264 -376
- package/dist/docs/components/main-sidebar.html +279 -391
- package/dist/docs/customization.html +1080 -0
- package/dist/docs/deployment.html +1145 -0
- package/dist/docs/faq.html +883 -411
- package/dist/docs/getting-started.html +991 -0
- package/dist/docs/how-to-contribute.html +361 -464
- package/dist/docs/index.html +16 -0
- package/dist/docs/integrations.html +1231 -0
- package/dist/docs/introduction.html +479 -448
- package/dist/docs/javascript/accessibility.html +387 -493
- package/dist/docs/javascript/card-widget.html +472 -452
- package/dist/docs/javascript/direct-chat.html +350 -423
- package/dist/docs/javascript/fullscreen.html +374 -418
- package/dist/docs/javascript/layout.html +371 -438
- package/dist/docs/javascript/plugins-overview.html +1144 -0
- package/dist/docs/javascript/pushmenu.html +511 -494
- package/dist/docs/javascript/treeview.html +492 -402
- package/dist/docs/layout-blueprint.html +1087 -0
- package/dist/docs/layout.html +313 -417
- package/dist/docs/license.html +278 -389
- package/dist/docs/migration.html +1149 -0
- package/dist/docs/recipes.html +1185 -0
- package/dist/docs/rtl.html +957 -0
- package/dist/examples/lockscreen.html +91 -1
- package/dist/examples/login-v2.html +91 -1
- package/dist/examples/login.html +91 -1
- package/dist/examples/register-v2.html +91 -1
- package/dist/examples/register.html +91 -1
- package/dist/forms/elements.html +1405 -0
- package/dist/forms/{general.html → layout.html} +401 -489
- package/dist/forms/validation.html +1275 -0
- package/dist/forms/wizard.html +1410 -0
- package/dist/generate/theme.html +160 -4
- package/dist/index.html +330 -129
- package/dist/index2.html +333 -129
- package/dist/index3.html +330 -129
- package/dist/js/adminlte.js +8 -5
- package/dist/js/adminlte.js.map +1 -1
- package/dist/js/adminlte.min.js +2 -2
- package/dist/js/adminlte.min.js.map +1 -1
- package/dist/layout/collapsed-sidebar-without-hover.html +330 -129
- package/dist/layout/collapsed-sidebar.html +330 -129
- package/dist/layout/fixed-complete.html +330 -129
- package/dist/layout/fixed-footer.html +330 -129
- package/dist/layout/fixed-header.html +330 -129
- package/dist/layout/fixed-sidebar.html +330 -129
- package/dist/layout/layout-custom-area.html +330 -129
- package/dist/layout/layout-rtl.html +330 -129
- package/dist/layout/logo-switch.html +160 -4
- package/dist/layout/sidebar-mini.html +330 -129
- package/dist/layout/unfixed-sidebar.html +330 -129
- package/dist/mailbox/compose.html +1151 -0
- package/dist/mailbox/inbox.html +1509 -0
- package/dist/mailbox/read.html +1202 -0
- package/dist/pages/404.html +239 -0
- package/dist/pages/500.html +227 -0
- package/dist/pages/calendar.html +1266 -0
- package/dist/pages/chat.html +1427 -0
- package/dist/pages/faq.html +1383 -0
- package/dist/pages/file-manager.html +1835 -0
- package/dist/pages/invoice.html +1199 -0
- package/dist/pages/kanban.html +1439 -0
- package/dist/pages/maintenance.html +230 -0
- package/dist/pages/pricing.html +1279 -0
- package/dist/pages/profile.html +1382 -0
- package/dist/pages/projects.html +1644 -0
- package/dist/pages/settings.html +1387 -0
- package/dist/tables/data.html +1319 -0
- package/dist/tables/simple.html +330 -129
- package/dist/widgets/cards.html +330 -129
- package/dist/widgets/info-box.html +330 -129
- package/dist/widgets/small-box.html +330 -129
- package/github-issue-response.md +40 -0
- package/netlify.toml +16 -0
- package/package.json +31 -24
- package/src/scss/_app-header.scss +27 -0
- package/src/scss/_app-sidebar.scss +24 -30
- package/src/scss/_bootstrap-variables.scss +11 -4
- package/src/scss/_docs.scss +816 -0
- package/src/scss/_table.scss +4 -4
- package/src/scss/adminlte.scss +4 -1
- package/src/ts/accessibility.ts +9 -1
- package/src/ts/adminlte.ts +1 -1
- package/src/ts/fullscreen.ts +8 -4
- package/src/ts/push-menu.ts +66 -5
- package/.claude/settings.local.json +0 -37
- package/CLAUDE.md +0 -79
- package/release.md +0 -75
|
@@ -5,6 +5,32 @@
|
|
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
6
|
<title>AdminLTE 4 | Widgets - Small Box</title>
|
|
7
7
|
|
|
8
|
+
<!--begin::Theme Init (prevents flash of incorrect theme on load, #6043)-->
|
|
9
|
+
<script>
|
|
10
|
+
(() => {
|
|
11
|
+
'use strict';
|
|
12
|
+
const STORAGE_KEY = 'lte-theme';
|
|
13
|
+
let stored = null;
|
|
14
|
+
try {
|
|
15
|
+
stored = localStorage.getItem(STORAGE_KEY);
|
|
16
|
+
} catch {
|
|
17
|
+
// localStorage may be unavailable (private mode, sandboxed iframe).
|
|
18
|
+
}
|
|
19
|
+
const prefersDark = globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
20
|
+
// Mirror the resolution in _scripts.astro: explicit "dark"/"light" win,
|
|
21
|
+
// otherwise ("auto" or unset) fall back to the OS preference.
|
|
22
|
+
let resolved = 'light';
|
|
23
|
+
if (stored === 'dark' || stored === 'light') {
|
|
24
|
+
resolved = stored;
|
|
25
|
+
} else if (prefersDark) {
|
|
26
|
+
resolved = 'dark';
|
|
27
|
+
}
|
|
28
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
29
|
+
document.documentElement.style.colorScheme = resolved;
|
|
30
|
+
})();
|
|
31
|
+
</script>
|
|
32
|
+
<!--end::Theme Init-->
|
|
33
|
+
|
|
8
34
|
<!--begin::Accessibility Meta Tags-->
|
|
9
35
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
|
10
36
|
<meta name="color-scheme" content="light dark" />
|
|
@@ -78,11 +104,18 @@
|
|
|
78
104
|
<i class="bi bi-list"></i>
|
|
79
105
|
</a>
|
|
80
106
|
</li>
|
|
107
|
+
|
|
81
108
|
<li class="nav-item d-none d-md-block">
|
|
82
|
-
<a href="
|
|
109
|
+
<a href="../index.html" class="nav-link">
|
|
110
|
+
<i class="bi bi-grid-1x2 me-1" aria-hidden="true"></i>
|
|
111
|
+
Live preview
|
|
112
|
+
</a>
|
|
83
113
|
</li>
|
|
84
114
|
<li class="nav-item d-none d-md-block">
|
|
85
|
-
<a href="
|
|
115
|
+
<a href="../docs/introduction.html" class="nav-link">
|
|
116
|
+
<i class="bi bi-book me-1" aria-hidden="true"></i>
|
|
117
|
+
Documentation
|
|
118
|
+
</a>
|
|
86
119
|
</li>
|
|
87
120
|
</ul>
|
|
88
121
|
<!--end::Start Navbar Links-->
|
|
@@ -220,11 +253,70 @@
|
|
|
220
253
|
<li class="nav-item">
|
|
221
254
|
<a class="nav-link" href="#" data-lte-toggle="fullscreen">
|
|
222
255
|
<i data-lte-icon="maximize" class="bi bi-arrows-fullscreen"></i>
|
|
223
|
-
<i data-lte-icon="minimize" class="bi bi-fullscreen-exit
|
|
256
|
+
<i data-lte-icon="minimize" class="bi bi-fullscreen-exit d-none"></i>
|
|
224
257
|
</a>
|
|
225
258
|
</li>
|
|
226
259
|
<!--end::Fullscreen Toggle-->
|
|
227
260
|
|
|
261
|
+
<!--begin::Color Mode Toggle (#6010)-->
|
|
262
|
+
<li class="nav-item dropdown">
|
|
263
|
+
<a
|
|
264
|
+
class="nav-link"
|
|
265
|
+
href="#"
|
|
266
|
+
id="bd-theme"
|
|
267
|
+
aria-label="Toggle color scheme"
|
|
268
|
+
data-bs-toggle="dropdown"
|
|
269
|
+
aria-expanded="false"
|
|
270
|
+
>
|
|
271
|
+
<i class="bi bi-sun-fill" data-lte-theme-icon="light"></i>
|
|
272
|
+
<i class="bi bi-moon-fill d-none" data-lte-theme-icon="dark"></i>
|
|
273
|
+
<i class="bi bi-circle-half d-none" data-lte-theme-icon="auto"></i>
|
|
274
|
+
</a>
|
|
275
|
+
<ul
|
|
276
|
+
class="dropdown-menu dropdown-menu-end"
|
|
277
|
+
aria-labelledby="bd-theme"
|
|
278
|
+
style="--bs-dropdown-min-width: 8rem"
|
|
279
|
+
>
|
|
280
|
+
<li>
|
|
281
|
+
<button
|
|
282
|
+
type="button"
|
|
283
|
+
class="dropdown-item d-flex align-items-center"
|
|
284
|
+
data-bs-theme-value="light"
|
|
285
|
+
aria-pressed="false"
|
|
286
|
+
>
|
|
287
|
+
<i class="bi bi-sun-fill me-2"></i>
|
|
288
|
+
Light
|
|
289
|
+
<i class="bi bi-check-lg ms-auto d-none"></i>
|
|
290
|
+
</button>
|
|
291
|
+
</li>
|
|
292
|
+
<li>
|
|
293
|
+
<button
|
|
294
|
+
type="button"
|
|
295
|
+
class="dropdown-item d-flex align-items-center"
|
|
296
|
+
data-bs-theme-value="dark"
|
|
297
|
+
aria-pressed="false"
|
|
298
|
+
>
|
|
299
|
+
<i class="bi bi-moon-fill me-2"></i>
|
|
300
|
+
Dark
|
|
301
|
+
<i class="bi bi-check-lg ms-auto d-none"></i>
|
|
302
|
+
</button>
|
|
303
|
+
</li>
|
|
304
|
+
<li>
|
|
305
|
+
<button
|
|
306
|
+
type="button"
|
|
307
|
+
class="dropdown-item d-flex align-items-center active"
|
|
308
|
+
data-bs-theme-value="auto"
|
|
309
|
+
aria-pressed="true"
|
|
310
|
+
>
|
|
311
|
+
<i class="bi bi-circle-half me-2"></i>
|
|
312
|
+
Auto
|
|
313
|
+
<i class="bi bi-check-lg ms-auto d-none"></i>
|
|
314
|
+
</button>
|
|
315
|
+
</li>
|
|
316
|
+
</ul>
|
|
317
|
+
</li>
|
|
318
|
+
<!--end::Color Mode Toggle-->
|
|
319
|
+
|
|
228
320
|
<!--begin::User Menu Dropdown-->
|
|
229
321
|
<li class="nav-item dropdown user-menu">
|
|
230
322
|
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
|
|
@@ -303,13 +395,11 @@
|
|
|
303
395
|
<!--end::Sidebar Brand-->
|
|
304
396
|
<!--begin::Sidebar Wrapper-->
|
|
305
397
|
<div class="sidebar-wrapper">
|
|
306
|
-
<nav class="mt-2">
|
|
398
|
+
<nav class="mt-2" aria-label="Main navigation">
|
|
307
399
|
<!--begin::Sidebar Menu-->
|
|
308
400
|
<ul
|
|
309
401
|
class="nav sidebar-menu flex-column"
|
|
310
402
|
data-lte-toggle="treeview"
|
|
311
|
-
role="navigation"
|
|
312
|
-
aria-label="Main navigation"
|
|
313
403
|
data-accordion="false"
|
|
314
404
|
id="navigation"
|
|
315
405
|
>
|
|
@@ -484,6 +574,36 @@
|
|
|
484
574
|
</li>
|
|
485
575
|
</ul>
|
|
486
576
|
</li>
|
|
577
|
+
<li class="nav-item">
|
|
578
|
+
<a href="#" class="nav-link">
|
|
579
|
+
<i class="nav-icon bi bi-envelope"></i>
|
|
580
|
+
<p>
|
|
581
|
+
Mailbox
|
|
582
|
+
<i class="nav-arrow bi bi-chevron-right"></i>
|
|
583
|
+
</p>
|
|
584
|
+
</a>
|
|
585
|
+
<ul class="nav nav-treeview">
|
|
586
|
+
<li class="nav-item">
|
|
587
|
+
<a href="../mailbox/inbox.html" class="nav-link">
|
|
588
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
589
|
+
<p>Inbox</p>
|
|
590
|
+
</a>
|
|
591
|
+
</li>
|
|
592
|
+
<li class="nav-item">
|
|
593
|
+
<a href="../mailbox/read.html" class="nav-link">
|
|
594
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
595
|
+
<p>Read Message</p>
|
|
596
|
+
</a>
|
|
597
|
+
</li>
|
|
598
|
+
<li class="nav-item">
|
|
599
|
+
<a href="../mailbox/compose.html" class="nav-link">
|
|
600
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
601
|
+
<p>Compose</p>
|
|
602
|
+
</a>
|
|
603
|
+
</li>
|
|
604
|
+
</ul>
|
|
605
|
+
</li>
|
|
606
|
+
|
|
487
607
|
<li class="nav-item">
|
|
488
608
|
<a href="#" class="nav-link">
|
|
489
609
|
<i class="nav-icon bi bi-pencil-square"></i>
|
|
@@ -494,9 +614,27 @@
|
|
|
494
614
|
</a>
|
|
495
615
|
<ul class="nav nav-treeview">
|
|
496
616
|
<li class="nav-item">
|
|
497
|
-
<a href="../forms/
|
|
617
|
+
<a href="../forms/elements.html" class="nav-link">
|
|
618
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
619
|
+
<p>Elements</p>
|
|
620
|
+
</a>
|
|
621
|
+
</li>
|
|
622
|
+
<li class="nav-item">
|
|
623
|
+
<a href="../forms/layout.html" class="nav-link">
|
|
624
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
625
|
+
<p>Layout</p>
|
|
626
|
+
</a>
|
|
627
|
+
</li>
|
|
628
|
+
<li class="nav-item">
|
|
629
|
+
<a href="../forms/validation.html" class="nav-link">
|
|
498
630
|
<i class="nav-icon bi bi-circle"></i>
|
|
499
|
-
<p>
|
|
631
|
+
<p>Validation</p>
|
|
632
|
+
</a>
|
|
633
|
+
</li>
|
|
634
|
+
<li class="nav-item">
|
|
635
|
+
<a href="../forms/wizard.html" class="nav-link">
|
|
636
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
637
|
+
<p>Wizard</p>
|
|
500
638
|
</a>
|
|
501
639
|
</li>
|
|
502
640
|
</ul>
|
|
@@ -516,6 +654,114 @@
|
|
|
516
654
|
<p>Simple Tables</p>
|
|
517
655
|
</a>
|
|
518
656
|
</li>
|
|
657
|
+
<li class="nav-item">
|
|
658
|
+
<a href="../tables/data.html" class="nav-link">
|
|
659
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
660
|
+
<p>Data Tables</p>
|
|
661
|
+
</a>
|
|
662
|
+
</li>
|
|
663
|
+
</ul>
|
|
664
|
+
</li>
|
|
665
|
+
|
|
666
|
+
<li class="nav-header">PAGES</li>
|
|
667
|
+
<li class="nav-item">
|
|
668
|
+
<a href="#" class="nav-link">
|
|
669
|
+
<i class="nav-icon bi bi-file-earmark-text"></i>
|
|
670
|
+
<p>
|
|
671
|
+
Pages
|
|
672
|
+
<i class="nav-arrow bi bi-chevron-right"></i>
|
|
673
|
+
</p>
|
|
674
|
+
</a>
|
|
675
|
+
<ul class="nav nav-treeview">
|
|
676
|
+
<li class="nav-item">
|
|
677
|
+
<a href="../pages/profile.html" class="nav-link">
|
|
678
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
679
|
+
<p>Profile</p>
|
|
680
|
+
</a>
|
|
681
|
+
</li>
|
|
682
|
+
<li class="nav-item">
|
|
683
|
+
<a href="../pages/settings.html" class="nav-link">
|
|
684
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
685
|
+
<p>Settings</p>
|
|
686
|
+
</a>
|
|
687
|
+
</li>
|
|
688
|
+
<li class="nav-item">
|
|
689
|
+
<a href="../pages/invoice.html" class="nav-link">
|
|
690
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
691
|
+
<p>Invoice</p>
|
|
692
|
+
</a>
|
|
693
|
+
</li>
|
|
694
|
+
<li class="nav-item">
|
|
695
|
+
<a href="../pages/calendar.html" class="nav-link">
|
|
696
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
697
|
+
<p>Calendar</p>
|
|
698
|
+
</a>
|
|
699
|
+
</li>
|
|
700
|
+
<li class="nav-item">
|
|
701
|
+
<a href="../pages/kanban.html" class="nav-link">
|
|
702
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
703
|
+
<p>Kanban</p>
|
|
704
|
+
</a>
|
|
705
|
+
</li>
|
|
706
|
+
<li class="nav-item">
|
|
707
|
+
<a href="../pages/chat.html" class="nav-link">
|
|
708
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
709
|
+
<p>Chat</p>
|
|
710
|
+
</a>
|
|
711
|
+
</li>
|
|
712
|
+
<li class="nav-item">
|
|
713
|
+
<a href="../pages/file-manager.html" class="nav-link">
|
|
714
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
715
|
+
<p>File Manager</p>
|
|
716
|
+
</a>
|
|
717
|
+
</li>
|
|
718
|
+
<li class="nav-item">
|
|
719
|
+
<a href="../pages/projects.html" class="nav-link">
|
|
720
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
721
|
+
<p>Projects</p>
|
|
722
|
+
</a>
|
|
723
|
+
</li>
|
|
724
|
+
<li class="nav-item">
|
|
725
|
+
<a href="../pages/pricing.html" class="nav-link">
|
|
726
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
727
|
+
<p>Pricing</p>
|
|
728
|
+
</a>
|
|
729
|
+
</li>
|
|
730
|
+
<li class="nav-item">
|
|
731
|
+
<a href="../pages/faq.html" class="nav-link">
|
|
732
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
733
|
+
<p>FAQ</p>
|
|
734
|
+
</a>
|
|
735
|
+
</li>
|
|
736
|
+
<li class="nav-item">
|
|
737
|
+
<a href="#" class="nav-link">
|
|
738
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
739
|
+
<p>
|
|
740
|
+
Error
|
|
741
|
+
<i class="nav-arrow bi bi-chevron-right"></i>
|
|
742
|
+
</p>
|
|
743
|
+
</a>
|
|
744
|
+
<ul class="nav nav-treeview">
|
|
745
|
+
<li class="nav-item">
|
|
746
|
+
<a href="../pages/404.html" class="nav-link">
|
|
747
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
748
|
+
<p>404</p>
|
|
749
|
+
</a>
|
|
750
|
+
</li>
|
|
751
|
+
<li class="nav-item">
|
|
752
|
+
<a href="../pages/500.html" class="nav-link">
|
|
753
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
754
|
+
<p>500</p>
|
|
755
|
+
</a>
|
|
756
|
+
</li>
|
|
757
|
+
<li class="nav-item">
|
|
758
|
+
<a href="../pages/maintenance.html" class="nav-link">
|
|
759
|
+
<i class="nav-icon bi bi-circle"></i>
|
|
760
|
+
<p>Maintenance</p>
|
|
761
|
+
</a>
|
|
762
|
+
</li>
|
|
763
|
+
</ul>
|
|
764
|
+
</li>
|
|
519
765
|
</ul>
|
|
520
766
|
</li>
|
|
521
767
|
|
|
@@ -584,126 +830,6 @@
|
|
|
584
830
|
</ul>
|
|
585
831
|
</li>
|
|
586
832
|
|
|
587
|
-
<li class="nav-header">DOCUMENTATIONS</li>
|
|
588
|
-
<li class="nav-item">
|
|
589
|
-
<a href="../docs/introduction.html" class="nav-link">
|
|
590
|
-
<i class="nav-icon bi bi-download"></i>
|
|
591
|
-
<p>Installation</p>
|
|
592
|
-
</a>
|
|
593
|
-
</li>
|
|
594
|
-
<li class="nav-item">
|
|
595
|
-
<a href="../docs/layout.html" class="nav-link">
|
|
596
|
-
<i class="nav-icon bi bi-grip-horizontal"></i>
|
|
597
|
-
<p>Layout</p>
|
|
598
|
-
</a>
|
|
599
|
-
</li>
|
|
600
|
-
<li class="nav-item">
|
|
601
|
-
<a href="../docs/color-mode.html" class="nav-link">
|
|
602
|
-
<i class="nav-icon bi bi-star-half"></i>
|
|
603
|
-
<p>Color Mode</p>
|
|
604
|
-
</a>
|
|
605
|
-
</li>
|
|
606
|
-
<li class="nav-item">
|
|
607
|
-
<a href="#" class="nav-link">
|
|
608
|
-
<i class="nav-icon bi bi-ui-checks-grid"></i>
|
|
609
|
-
<p>
|
|
610
|
-
Components
|
|
611
|
-
<i class="nav-arrow bi bi-chevron-right"></i>
|
|
612
|
-
</p>
|
|
613
|
-
</a>
|
|
614
|
-
<ul class="nav nav-treeview">
|
|
615
|
-
<li class="nav-item">
|
|
616
|
-
<a href="../docs/components/main-header.html" class="nav-link">
|
|
617
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
618
|
-
<p>Main Header</p>
|
|
619
|
-
</a>
|
|
620
|
-
</li>
|
|
621
|
-
<li class="nav-item">
|
|
622
|
-
<a href="../docs/components/main-sidebar.html" class="nav-link">
|
|
623
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
624
|
-
<p>Main Sidebar</p>
|
|
625
|
-
</a>
|
|
626
|
-
</li>
|
|
627
|
-
</ul>
|
|
628
|
-
</li>
|
|
629
|
-
<li class="nav-item">
|
|
630
|
-
<a href="#" class="nav-link">
|
|
631
|
-
<i class="nav-icon bi bi-filetype-js"></i>
|
|
632
|
-
<p>
|
|
633
|
-
Javascript
|
|
634
|
-
<i class="nav-arrow bi bi-chevron-right"></i>
|
|
635
|
-
</p>
|
|
636
|
-
</a>
|
|
637
|
-
<ul class="nav nav-treeview">
|
|
638
|
-
<li class="nav-item">
|
|
639
|
-
<a href="../docs/javascript/layout.html" class="nav-link">
|
|
640
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
641
|
-
<p>Layout</p>
|
|
642
|
-
</a>
|
|
643
|
-
</li>
|
|
644
|
-
<li class="nav-item">
|
|
645
|
-
<a href="../docs/javascript/pushmenu.html" class="nav-link">
|
|
646
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
647
|
-
<p>PushMenu</p>
|
|
648
|
-
</a>
|
|
649
|
-
</li>
|
|
650
|
-
<li class="nav-item">
|
|
651
|
-
<a href="../docs/javascript/treeview.html" class="nav-link">
|
|
652
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
653
|
-
<p>Treeview</p>
|
|
654
|
-
</a>
|
|
655
|
-
</li>
|
|
656
|
-
<li class="nav-item">
|
|
657
|
-
<a href="../docs/javascript/card-widget.html" class="nav-link">
|
|
658
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
659
|
-
<p>Card Widget</p>
|
|
660
|
-
</a>
|
|
661
|
-
</li>
|
|
662
|
-
<li class="nav-item">
|
|
663
|
-
<a href="../docs/javascript/direct-chat.html" class="nav-link">
|
|
664
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
665
|
-
<p>Direct Chat</p>
|
|
666
|
-
</a>
|
|
667
|
-
</li>
|
|
668
|
-
<li class="nav-item">
|
|
669
|
-
<a href="../docs/javascript/fullscreen.html" class="nav-link">
|
|
670
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
671
|
-
<p>Fullscreen</p>
|
|
672
|
-
</a>
|
|
673
|
-
</li>
|
|
674
|
-
<li class="nav-item">
|
|
675
|
-
<a href="../docs/javascript/accessibility.html" class="nav-link">
|
|
676
|
-
<i class="nav-icon bi bi-circle"></i>
|
|
677
|
-
<p>Accessibility</p>
|
|
678
|
-
</a>
|
|
679
|
-
</li>
|
|
680
|
-
</ul>
|
|
681
|
-
</li>
|
|
682
|
-
<li class="nav-item">
|
|
683
|
-
<a href="../docs/browser-support.html" class="nav-link">
|
|
684
|
-
<i class="nav-icon bi bi-browser-edge"></i>
|
|
685
|
-
<p>Browser Support</p>
|
|
686
|
-
</a>
|
|
687
|
-
</li>
|
|
688
|
-
<li class="nav-item">
|
|
689
|
-
<a href="../docs/how-to-contribute.html" class="nav-link">
|
|
690
|
-
<i class="nav-icon bi bi-hand-thumbs-up-fill"></i>
|
|
691
|
-
<p>How To Contribute</p>
|
|
692
|
-
</a>
|
|
693
|
-
</li>
|
|
694
|
-
<li class="nav-item">
|
|
695
|
-
<a href="../docs/faq.html" class="nav-link">
|
|
696
|
-
<i class="nav-icon bi bi-question-circle-fill"></i>
|
|
697
|
-
<p>FAQ</p>
|
|
698
|
-
</a>
|
|
699
|
-
</li>
|
|
700
|
-
<li class="nav-item">
|
|
701
|
-
<a href="../docs/license.html" class="nav-link">
|
|
702
|
-
<i class="nav-icon bi bi-patch-check-fill"></i>
|
|
703
|
-
<p>License</p>
|
|
704
|
-
</a>
|
|
705
|
-
</li>
|
|
706
|
-
|
|
707
833
|
<li class="nav-header">MULTI LEVEL EXAMPLE</li>
|
|
708
834
|
<li class="nav-item">
|
|
709
835
|
<a href="#" class="nav-link">
|
|
@@ -791,6 +917,17 @@
|
|
|
791
917
|
</li>
|
|
792
918
|
</ul>
|
|
793
919
|
<!--end::Sidebar Menu-->
|
|
920
|
+
|
|
921
|
+
<!-- Docs CTA (bottom of sidebar) -->
|
|
922
|
+
<div class="p-3 mt-3 border-top border-secondary border-opacity-25">
|
|
923
|
+
<a
|
|
924
|
+
href="../docs/introduction.html"
|
|
925
|
+
class="btn btn-sm btn-outline-light w-100 d-flex align-items-center justify-content-center gap-2"
|
|
926
|
+
>
|
|
927
|
+
<i class="bi bi-book" aria-hidden="true"></i>
|
|
928
|
+
View documentation
|
|
929
|
+
</a>
|
|
930
|
+
</div>
|
|
794
931
|
</nav>
|
|
795
932
|
</div>
|
|
796
933
|
<!--end::Sidebar Wrapper-->
|
|
@@ -1017,7 +1154,71 @@
|
|
|
1017
1154
|
}
|
|
1018
1155
|
});
|
|
1019
1156
|
</script>
|
|
1020
|
-
<!--end::OverlayScrollbars Configure-->
|
|
1157
|
+
<!--end::OverlayScrollbars Configure--><!--begin::Color Mode Toggle (#6010)-->
|
|
1158
|
+
<script>
|
|
1159
|
+
(() => {
|
|
1160
|
+
'use strict';
|
|
1161
|
+
|
|
1162
|
+
const STORAGE_KEY = 'lte-theme';
|
|
1163
|
+
|
|
1164
|
+
const getStoredTheme = () => localStorage.getItem(STORAGE_KEY);
|
|
1165
|
+
const setStoredTheme = (theme) => localStorage.setItem(STORAGE_KEY, theme);
|
|
1166
|
+
|
|
1167
|
+
const prefersDark = () => globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
1168
|
+
|
|
1169
|
+
const getPreferredTheme = () => {
|
|
1170
|
+
const stored = getStoredTheme();
|
|
1171
|
+
if (stored) return stored;
|
|
1172
|
+
return prefersDark() ? 'dark' : 'light';
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
const setTheme = (theme) => {
|
|
1176
|
+
const resolved = theme === 'auto' ? (prefersDark() ? 'dark' : 'light') : theme;
|
|
1177
|
+
document.documentElement.setAttribute('data-bs-theme', resolved);
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
setTheme(getPreferredTheme());
|
|
1181
|
+
|
|
1182
|
+
const showActiveTheme = (theme) => {
|
|
1183
|
+
// Highlight the active dropdown option
|
|
1184
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((el) => {
|
|
1185
|
+
el.classList.remove('active');
|
|
1186
|
+
el.setAttribute('aria-pressed', 'false');
|
|
1187
|
+
const check = el.querySelector('.bi-check-lg');
|
|
1188
|
+
if (check) check.classList.add('d-none');
|
|
1189
|
+
});
|
|
1190
|
+
const active = document.querySelector(`[data-bs-theme-value="${theme}"]`);
|
|
1191
|
+
if (active) {
|
|
1192
|
+
active.classList.add('active');
|
|
1193
|
+
active.setAttribute('aria-pressed', 'true');
|
|
1194
|
+
const check = active.querySelector('.bi-check-lg');
|
|
1195
|
+
if (check) check.classList.remove('d-none');
|
|
1196
|
+
}
|
|
1197
|
+
// Sync the topbar trigger icon
|
|
1198
|
+
document.querySelectorAll('[data-lte-theme-icon]').forEach((icon) => {
|
|
1199
|
+
icon.classList.toggle('d-none', icon.dataset.lteThemeIcon !== theme);
|
|
1200
|
+
});
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1203
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
1204
|
+
const stored = getStoredTheme();
|
|
1205
|
+
if (!stored || stored === 'auto') setTheme(getPreferredTheme());
|
|
1206
|
+
});
|
|
1207
|
+
|
|
1208
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
1209
|
+
showActiveTheme(getPreferredTheme());
|
|
1210
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach((toggle) => {
|
|
1211
|
+
toggle.addEventListener('click', () => {
|
|
1212
|
+
const theme = toggle.getAttribute('data-bs-theme-value');
|
|
1213
|
+
setStoredTheme(theme);
|
|
1214
|
+
setTheme(theme);
|
|
1215
|
+
showActiveTheme(theme);
|
|
1216
|
+
});
|
|
1217
|
+
});
|
|
1218
|
+
});
|
|
1219
|
+
})();
|
|
1220
|
+
</script>
|
|
1221
|
+
<!--end::Color Mode Toggle-->
|
|
1021
1222
|
<!--end::Script-->
|
|
1022
1223
|
</body>
|
|
1023
1224
|
<!--end::Body-->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Thanks for the thorough write-up @bsshreesha — your root-cause analysis is spot on, and you even guessed the correct storage key (`lte-theme`). Reproduced and fixed. 👍
|
|
2
|
+
|
|
3
|
+
As you noted, the color-mode script lives in `_scripts.astro`, which is loaded at the **end of `<body>`**. So the browser paints the default (light) theme first, then the script swaps `data-bs-theme` once it runs — hence the flash for dark-mode users on every load.
|
|
4
|
+
|
|
5
|
+
**Fix:** I added a small render-blocking inline script to `_head.astro` (shared by every page), essentially your suggestion with a few refinements:
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<script is:inline>
|
|
9
|
+
;(() => {
|
|
10
|
+
"use strict"
|
|
11
|
+
const STORAGE_KEY = "lte-theme"
|
|
12
|
+
let stored = null
|
|
13
|
+
try {
|
|
14
|
+
stored = localStorage.getItem(STORAGE_KEY)
|
|
15
|
+
} catch {
|
|
16
|
+
// localStorage may be unavailable (private mode, sandboxed iframe).
|
|
17
|
+
}
|
|
18
|
+
const prefersDark = globalThis.matchMedia(
|
|
19
|
+
"(prefers-color-scheme: dark)"
|
|
20
|
+
).matches
|
|
21
|
+
const resolved =
|
|
22
|
+
stored === "dark" || stored === "light"
|
|
23
|
+
? stored
|
|
24
|
+
: prefersDark
|
|
25
|
+
? "dark"
|
|
26
|
+
: "light"
|
|
27
|
+
document.documentElement.setAttribute("data-bs-theme", resolved)
|
|
28
|
+
document.documentElement.style.colorScheme = resolved
|
|
29
|
+
})()
|
|
30
|
+
</script>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Refinements vs. the snippet in the issue:
|
|
34
|
+
- **Mirrors the resolution already in `_scripts.astro`** so the stored `"auto"` value (and the unset case) consistently falls back to `prefers-color-scheme` — keeps the head and body logic in sync.
|
|
35
|
+
- **`try/catch` around `localStorage`** so it degrades gracefully where storage access throws (private mode, sandboxed iframes) instead of leaving the page un-themed.
|
|
36
|
+
- Placed right after `<title>`, before the stylesheet, so `data-bs-theme` is set before the first paint.
|
|
37
|
+
|
|
38
|
+
**Verified:** with `lte-theme=dark` set, a probe reading `document.documentElement.getAttribute("data-bs-theme")` at the very first line of `<body>` already returns `"dark"` — i.e. the theme is applied before any body content is laid out, so there's no flash. Pages now render directly in the stored theme on refresh.
|
|
39
|
+
|
|
40
|
+
Changed in `src/html/components/_head.astro` and the rebuilt `dist` (applies to all pages). It'll be in the next release. Thanks again for the detailed report and suggested fix!
|
package/netlify.toml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Netlify deploy configuration for adminlte-v4.netlify.app
|
|
2
|
+
#
|
|
3
|
+
# The dist/ folder is committed to the repo (see "rebuild dist" commits),
|
|
4
|
+
# so the production deploy just publishes those static files. This avoids
|
|
5
|
+
# running npm install on Netlify, which has been failing since rc7 due to
|
|
6
|
+
# a Node version drift between Netlify's default and the Node 22 used in
|
|
7
|
+
# CI (see .github/workflows/*).
|
|
8
|
+
|
|
9
|
+
[build]
|
|
10
|
+
publish = "dist"
|
|
11
|
+
command = "echo 'Static deploy of committed dist/'"
|
|
12
|
+
|
|
13
|
+
[build.environment]
|
|
14
|
+
# Match the Node version used in GitHub Actions so any future build
|
|
15
|
+
# command (eg. `npm run docs-compile`) resolves dependencies correctly.
|
|
16
|
+
NODE_VERSION = "22"
|