admin-lte 4.0.0-alpha2 → 4.0.0-alpha3
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/.bundlewatch.config.json +6 -6
- package/.cache/.eslintcache +1 -1
- package/.cache/.stylelintcache +1 -1
- package/.gitpod.yml +1 -1
- package/.idea/AdminLTE.iml +4 -0
- package/.idea/codeStyles/Project.xml +24 -0
- package/.idea/dbnavigator.xml +421 -0
- package/.idea/git_toolbox_prj.xml +15 -0
- package/.idea/jsLibraryMappings.xml +6 -0
- package/.idea/jsLinters/eslint.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +3 -3
- package/dist/assets/img/AdminLTEFullLogo.png +0 -0
- package/dist/css/adminlte.css +695 -318
- package/dist/css/adminlte.css.map +1 -1
- package/dist/css/adminlte.min.css +1 -1
- package/dist/css/adminlte.min.css.map +1 -1
- package/dist/css/adminlte.rtl.css +693 -316
- package/dist/css/adminlte.rtl.css.map +1 -1
- package/dist/css/adminlte.rtl.min.css +1 -1
- package/dist/css/adminlte.rtl.min.css.map +1 -1
- package/dist/js/adminlte.js +43 -63
- 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/pages/UI/timeline.html +389 -218
- package/dist/pages/docs/browser-support.html +345 -204
- package/dist/pages/docs/color-mode.html +560 -348
- package/dist/pages/docs/components/main-header.html +579 -368
- package/dist/pages/docs/components/main-sidebar.html +858 -0
- package/dist/pages/docs/faq.html +743 -0
- package/dist/pages/docs/how-to-contribute.html +783 -0
- package/dist/pages/docs/introduction.html +767 -0
- package/dist/pages/docs/javascript/treeview.html +762 -0
- package/dist/pages/docs/layout.html +372 -201
- package/dist/pages/{docs.html → docs/license.html} +347 -218
- package/dist/pages/examples/lockscreen.html +107 -0
- package/dist/pages/examples/login-v2.html +148 -0
- package/dist/pages/examples/login.html +45 -40
- package/dist/pages/examples/register-v2.html +155 -0
- package/dist/pages/examples/register.html +46 -41
- package/dist/pages/forms/general.html +664 -202
- package/dist/pages/index.html +514 -285
- package/dist/pages/index2.html +665 -341
- package/dist/pages/index3.html +415 -254
- package/dist/pages/layout/collapsed-sidebar.html +766 -0
- package/dist/pages/layout/fixed-complete.html +867 -0
- package/dist/pages/layout/fixed-sidebar.html +344 -201
- package/dist/pages/layout/layout-rtl.html +344 -201
- package/dist/pages/layout/logo-switch.html +433 -0
- package/dist/pages/layout/sidebar-mini.html +345 -202
- package/dist/pages/layout/unfixed-sidebar.html +343 -201
- package/dist/pages/tables/simple.html +437 -233
- package/dist/pages/widgets/cards.html +389 -244
- package/dist/pages/widgets/info-box.html +398 -215
- package/dist/pages/widgets/small-box.html +349 -198
- package/index.html +6 -10
- package/package.json +27 -24
- package/src/assets/img/AdminLTEFullLogo.png +0 -0
- package/src/config/astro.config.mjs +3 -1
- package/src/html/.prettierrc.js +11 -0
- package/src/html/components/_head.astro +42 -26
- package/src/html/components/_scripts.astro +38 -27
- package/src/html/components/dashboard/_footer.astro +14 -8
- package/src/html/components/dashboard/_sidenav.astro +343 -113
- package/src/html/components/dashboard/_topbar.astro +90 -49
- package/src/html/components/docs/{browser-support/index.md → browser-support.mdx} +2 -1
- package/src/html/components/docs/color-mode.mdx +169 -0
- package/src/html/components/docs/components/{main-header-1.md → main-header.mdx} +60 -21
- package/src/html/components/docs/components/main-sidebar.mdx +129 -0
- package/src/html/components/docs/faq.mdx +11 -0
- package/src/html/components/docs/how-to-contribute.mdx +34 -0
- package/src/html/components/docs/{introduction/index.md → introduction.mdx} +27 -2
- package/src/html/components/docs/license.mdx +9 -0
- package/src/html/components/javascript/treeview.mdx +39 -0
- package/src/html/pages/UI/timeline.astro +111 -48
- package/src/html/pages/docs/browser-support.astro +24 -11
- package/src/html/pages/docs/color-mode.astro +89 -42
- package/src/html/pages/docs/components/main-header.astro +133 -46
- package/src/html/pages/docs/components/main-sidebar.astro +71 -0
- package/src/html/pages/docs/faq.astro +71 -0
- package/src/html/pages/docs/how-to-contribute.astro +71 -0
- package/src/html/pages/docs/{index.astro → introduction.astro} +24 -11
- package/src/html/pages/docs/javascript/treeview.astro +71 -0
- package/src/html/pages/docs/layout.astro +62 -19
- package/src/html/pages/docs/license.astro +71 -0
- package/src/html/pages/examples/lockscreen.astro +63 -0
- package/src/html/pages/examples/login-v2.astro +109 -0
- package/src/html/pages/examples/login.astro +34 -16
- package/src/html/pages/examples/register-v2.astro +116 -0
- package/src/html/pages/examples/register.astro +36 -18
- package/src/html/pages/forms/general.astro +567 -36
- package/src/html/pages/index.astro +389 -152
- package/src/html/pages/index2.astro +682 -250
- package/src/html/pages/index3.astro +290 -189
- package/src/html/pages/layout/collapsed-sidebar.astro +110 -0
- package/src/html/pages/layout/fixed-complete.astro +209 -0
- package/src/html/pages/layout/fixed-sidebar.astro +52 -27
- package/src/html/pages/layout/layout-rtl.astro +53 -28
- package/src/html/pages/layout/logo-switch.astro +212 -0
- package/src/html/pages/layout/sidebar-mini.astro +53 -28
- package/src/html/pages/layout/unfixed-sidebar.astro +51 -27
- package/src/html/pages/tables/simple.astro +206 -66
- package/src/html/pages/widgets/cards.astro +134 -69
- package/src/html/pages/widgets/info-box.astro +96 -41
- package/src/html/pages/widgets/small-box.astro +93 -32
- package/src/scss/_app-content.scss +52 -0
- package/src/scss/_app-footer.scss +1 -1
- package/src/scss/_app-main.scss +2 -5
- package/src/scss/_app-sidebar.scss +244 -70
- package/src/scss/_bootstrap-variables.scss +4 -4
- package/src/scss/_cards.scss +31 -7
- package/src/scss/_compact-mode.scss +79 -0
- package/src/scss/_small-box.scss +0 -3
- package/src/scss/_variables.scss +21 -4
- package/src/scss/mixins/_animations.scss +0 -5
- package/src/scss/pages/_lockscreen.scss +74 -0
- package/src/scss/pages/_login_and_register.scss +0 -3
- package/src/scss/parts/_core.scss +2 -0
- package/src/scss/parts/_pages.scss +1 -0
- package/src/ts/card-widget.ts +17 -50
- package/src/ts/direct-chat.ts +2 -2
- package/src/ts/layout.ts +2 -2
- package/src/ts/push-menu.ts +3 -20
- package/src/ts/treeview.ts +14 -8
- package/src/ts/util/index.ts +14 -12
- package/src/utils/index.js +20 -3
- package/src/html/components/docs/color-mode/navbar-html.md +0 -80
- package/src/html/components/docs/color-mode/toggle-script.md +0 -48
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
```js
|
|
2
|
-
// Color Mode Toggler
|
|
3
|
-
(() => {
|
|
4
|
-
'use strict'
|
|
5
|
-
const storedTheme = localStorage.getItem('theme')
|
|
6
|
-
const getPreferredTheme = () => {
|
|
7
|
-
if (storedTheme) {
|
|
8
|
-
return storedTheme
|
|
9
|
-
}
|
|
10
|
-
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
|
11
|
-
}
|
|
12
|
-
const setTheme = function (theme) {
|
|
13
|
-
if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
14
|
-
document.documentElement.setAttribute('data-bs-theme', 'dark')
|
|
15
|
-
} else {
|
|
16
|
-
document.documentElement.setAttribute('data-bs-theme', theme)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
setTheme(getPreferredTheme())
|
|
20
|
-
const showActiveTheme = theme => {
|
|
21
|
-
const activeThemeIcon = document.querySelector('.theme-icon-active i')
|
|
22
|
-
const btnToActive = document.querySelector('[data-bs-theme-value="' + theme + '"]')
|
|
23
|
-
const svgOfActiveBtn = btnToActive.querySelector('i').getAttribute('class')
|
|
24
|
-
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
|
25
|
-
element.classList.remove('active')
|
|
26
|
-
})
|
|
27
|
-
btnToActive.classList.add('active')
|
|
28
|
-
activeThemeIcon.setAttribute('class', svgOfActiveBtn)
|
|
29
|
-
}
|
|
30
|
-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
|
31
|
-
if (storedTheme !== 'light' || storedTheme !== 'dark') {
|
|
32
|
-
setTheme(getPreferredTheme())
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
window.addEventListener('DOMContentLoaded', () => {
|
|
36
|
-
showActiveTheme(getPreferredTheme())
|
|
37
|
-
document.querySelectorAll('[data-bs-theme-value]')
|
|
38
|
-
.forEach(toggle => {
|
|
39
|
-
toggle.addEventListener('click', () => {
|
|
40
|
-
const theme = toggle.getAttribute('data-bs-theme-value')
|
|
41
|
-
localStorage.setItem('theme', theme)
|
|
42
|
-
setTheme(theme)
|
|
43
|
-
showActiveTheme(theme)
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
})()
|
|
48
|
-
```
|