@adminkit/core 3.4.0 → 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/LICENSE +21 -21
- package/README.md +216 -148
- package/dist/charts-chartjs.html +666 -0
- package/dist/css/app.css +5 -5
- package/dist/css/app.d.css.ts +3 -0
- package/dist/fonts/inter-cyrillic-300-normal-BnqRxXuy.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-300-normal-CgCALhwJ.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/dist/fonts/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/dist/fonts/inter-greek-300-normal-DmGD3g_f.woff2 +0 -0
- package/dist/fonts/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/dist/fonts/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-300-normal-l2DDyC6M.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/dist/fonts/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/dist/fonts/inter-latin-300-normal-BVlfKGgI.woff2 +0 -0
- package/dist/fonts/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/dist/fonts/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-300-normal-CPgO9Ksf.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-300-normal-Bdr24Bqb.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/dist/fonts/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/dist/icons-lucide.html +7249 -0
- package/dist/img/screenshots/pro/ai-chat-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/ai-chat-dark.webp +0 -0
- package/dist/img/screenshots/pro/ai-chat-light-800.webp +0 -0
- package/dist/img/screenshots/pro/ai-chat-light.webp +0 -0
- package/dist/img/screenshots/pro/ai-usage-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/ai-usage-dark.webp +0 -0
- package/dist/img/screenshots/pro/ai-usage-light-800.webp +0 -0
- package/dist/img/screenshots/pro/ai-usage-light.webp +0 -0
- package/dist/img/screenshots/pro/analytics-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/analytics-dark.webp +0 -0
- package/dist/img/screenshots/pro/analytics-light-800.webp +0 -0
- package/dist/img/screenshots/pro/analytics-light.webp +0 -0
- package/dist/img/screenshots/pro/calendar-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/calendar-dark.webp +0 -0
- package/dist/img/screenshots/pro/calendar-light-800.webp +0 -0
- package/dist/img/screenshots/pro/calendar-light.webp +0 -0
- package/dist/img/screenshots/pro/crm-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/crm-dark.webp +0 -0
- package/dist/img/screenshots/pro/crm-light-800.webp +0 -0
- package/dist/img/screenshots/pro/crm-light.webp +0 -0
- package/dist/img/screenshots/pro/crypto-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/crypto-dark.webp +0 -0
- package/dist/img/screenshots/pro/crypto-light-800.webp +0 -0
- package/dist/img/screenshots/pro/crypto-light.webp +0 -0
- package/dist/img/screenshots/pro/datatables-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/datatables-dark.webp +0 -0
- package/dist/img/screenshots/pro/datatables-light-800.webp +0 -0
- package/dist/img/screenshots/pro/datatables-light.webp +0 -0
- package/dist/img/screenshots/pro/ecommerce-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/ecommerce-dark.webp +0 -0
- package/dist/img/screenshots/pro/ecommerce-light-800.webp +0 -0
- package/dist/img/screenshots/pro/ecommerce-light.webp +0 -0
- package/dist/img/screenshots/pro/settings-dark-800.webp +0 -0
- package/dist/img/screenshots/pro/settings-dark.webp +0 -0
- package/dist/img/screenshots/pro/settings-light-800.webp +0 -0
- package/dist/img/screenshots/pro/settings-light.webp +0 -0
- package/dist/index.html +918 -0
- package/dist/js/app.d.ts +78 -0
- package/dist/js/app.js +4 -3
- package/dist/js/head.js +1 -0
- package/dist/js/icons-all.js +1 -0
- package/dist/maps-google.html +469 -0
- package/dist/pages-404.html +46 -0
- package/dist/pages-500.html +46 -0
- package/dist/pages-blank.html +423 -0
- package/dist/pages-invoice.html +715 -0
- package/dist/pages-pricing.html +730 -0
- package/dist/pages-profile.html +787 -0
- package/dist/pages-sign-in.html +76 -0
- package/dist/pages-sign-up.html +73 -0
- package/dist/tables-bootstrap.html +856 -0
- package/dist/ui-alerts.html +745 -0
- package/dist/ui-buttons.html +529 -0
- package/dist/ui-cards.html +469 -0
- package/dist/ui-forms.html +584 -0
- package/dist/ui-modals.html +800 -0
- package/dist/ui-typography.html +560 -0
- package/dist/upgrade-to-pro.html +788 -0
- package/package.json +114 -88
- package/dist/css/app.css.map +0 -1
- package/dist/fonts/.gitkeep +0 -0
- package/dist/img/photos/unsplash-3.jpg +0 -0
- package/dist/js/app.js.LICENSE.txt +0 -514
- package/dist/js/app.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020-
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2024 AdminKit Authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,148 +1,216 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://github.com/adminkit/adminkit"><img src="https://adminkit.io/icons/icon-512x512.png" alt="AdminKit is a free & open-source HTML dashboard & admin template based on Bootstrap 5" width="96"></a>
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h3 align="center">AdminKit</h3>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
AdminKit is a free & open-source HTML dashboard & admin template based on Bootstrap 5.
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/package/@adminkit/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@adminkit/core" alt="NPM version"></a>
|
|
13
|
-
<a href="https://github.com/adminkit/adminkit/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
|
|
14
|
-
<a href="https://github.com/adminkit/adminkit/issues?q=is%3Aopen+is%3Aissue"><img src="https://img.shields.io/github/issues/adminkit/adminkit.svg" alt="GitHub issues open"></a>
|
|
15
|
-
<a href="https://github.com/adminkit/adminkit/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/adminkit/adminkit.svg" alt="GitHub issues closed"></a>
|
|
16
|
-
<a href="https://demo.adminkit.io/" rel="nofollow"><img src="https://img.shields.io/badge/demo-online-green.svg" alt="Live Demo"></a>
|
|
17
|
-
<a href="https://adminkit.io/#download"><img src="https://img.shields.io/static/v1?label=download&message=ZIP&color=green" alt="Download"></a>
|
|
18
|
-
<br>
|
|
19
|
-
<a href="https://github.com/adminkit/adminkit"><img alt="GitHub stars" src="https://img.shields.io/github/stars/adminkit/adminkit?style=social"></a>
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
## Preview
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
```sh
|
|
57
|
-
npm
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```sh
|
|
63
|
-
npm run build
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
The package
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/adminkit/adminkit"><img src="https://adminkit.io/icons/icon-512x512.png" alt="AdminKit is a free & open-source HTML dashboard & admin template based on Bootstrap 5" width="96"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h3 align="center">AdminKit</h3>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
AdminKit is a free & open-source HTML dashboard & admin template based on Bootstrap 5.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@adminkit/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@adminkit/core" alt="NPM version"></a>
|
|
13
|
+
<a href="https://github.com/adminkit/adminkit/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
|
|
14
|
+
<a href="https://github.com/adminkit/adminkit/issues?q=is%3Aopen+is%3Aissue"><img src="https://img.shields.io/github/issues/adminkit/adminkit.svg" alt="GitHub issues open"></a>
|
|
15
|
+
<a href="https://github.com/adminkit/adminkit/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed-raw/adminkit/adminkit.svg" alt="GitHub issues closed"></a>
|
|
16
|
+
<a href="https://demo.adminkit.io/" rel="nofollow"><img src="https://img.shields.io/badge/demo-online-green.svg" alt="Live Demo"></a>
|
|
17
|
+
<a href="https://adminkit.io/#download"><img src="https://img.shields.io/static/v1?label=download&message=ZIP&color=green" alt="Download"></a>
|
|
18
|
+
<br>
|
|
19
|
+
<a href="https://github.com/adminkit/adminkit"><img alt="GitHub stars" src="https://img.shields.io/github/stars/adminkit/adminkit?style=social"></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
## Preview
|
|
23
|
+
|
|
24
|
+
AdminKit is an admin and dashboard template built on Bootstrap 5, released under the MIT license. It needs no jQuery, and neither do the plugins it uses. It has light and dark mode and targets WCAG 2.2 AA in both. [Open the demo](https://demo.adminkit.io/).
|
|
25
|
+
|
|
26
|
+
<picture>
|
|
27
|
+
<source media="(prefers-color-scheme: dark)" srcset=".github/screenshots/dashboard-dark.webp">
|
|
28
|
+
<img src=".github/screenshots/dashboard-light.webp" width="1600" height="1000" alt="The AdminKit Analytics dashboard: visitors, page views, bounce rate and session duration, monthly visitors, browser usage, a calendar, a real-time visitors map, top pages and traffic sources">
|
|
29
|
+
</picture>
|
|
30
|
+
|
|
31
|
+
## AdminKit and AdminKit PRO
|
|
32
|
+
|
|
33
|
+
AdminKit PRO is the commercial edition, with more pages, dashboards and plugins, a settings panel and an AI chat. The table is generated from `src/data/stats.json` and the PRO snapshot in `src/data/editions/pro.json`; the template's Upgrade to Pro page (`upgrade-to-pro.html`) shows the same comparison with screenshots of AdminKit PRO, and [adminkit.io/pricing](https://adminkit.io/pricing/) has the prices and licenses.
|
|
34
|
+
|
|
35
|
+
<!-- stats:start -->
|
|
36
|
+
|
|
37
|
+
| | AdminKit | [AdminKit PRO](https://adminkit.io/pricing/) |
|
|
38
|
+
| --------------------- | ------------- | -------------------------------------------- |
|
|
39
|
+
| Pages | 20 | 53 |
|
|
40
|
+
| Dashboards | 1 | 5 |
|
|
41
|
+
| Plugins | 4 | 11 |
|
|
42
|
+
| Icons | 1,908 | 4,071 |
|
|
43
|
+
| Sidebar color schemes | 1 | 3 |
|
|
44
|
+
| Dark mode | Yes | Yes |
|
|
45
|
+
| AI chat | No | Yes |
|
|
46
|
+
| Settings panel | No | Yes |
|
|
47
|
+
| Support | GitHub issues | Email |
|
|
48
|
+
| License | MIT | Commercial |
|
|
49
|
+
|
|
50
|
+
<!-- stats:end -->
|
|
51
|
+
|
|
52
|
+
## Quick start
|
|
53
|
+
|
|
54
|
+
You need Node.js 24 (see `.nvmrc`). Clone the repository, install the dependencies and start the development server on http://localhost:8080:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
git clone --depth 1 https://github.com/adminkit/adminkit.git my-admin && cd my-admin && npm ci && npm run dev
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The server reloads when you change a page, partial, stylesheet or script. Build the production files into `dist/`, the HTML pages, `css/app.css`, `js/app.js`, `fonts/` and `img/`, ready to deploy or copy into your own project:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
npm run build
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`npm run preview` serves that build. You can also [download the repository as a zip](https://github.com/adminkit/adminkit/archive/master.zip) or [from the website](https://adminkit.io/#download).
|
|
67
|
+
|
|
68
|
+
## npm and CDN
|
|
69
|
+
|
|
70
|
+
The built CSS and JavaScript are published to npm as [`@adminkit/core`](https://www.npmjs.com/package/@adminkit/core):
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npm install @adminkit/core
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
With a bundler, import the stylesheet and the script once, in the entry module or root layout:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
import "@adminkit/core/css";
|
|
80
|
+
import "@adminkit/core";
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`@adminkit/core` is `dist/js/app.js` and `@adminkit/core/css` is `dist/css/app.css`; `@adminkit/core/head` is `dist/js/head.js`, and every other file stays available under `@adminkit/core/dist/`. The package ships TypeScript declarations for the import and the globals it adds. Imported during server-side rendering, where there is no `window`, the script does nothing, so it can be imported at the top of a module that also runs on the server.
|
|
84
|
+
|
|
85
|
+
The same files are on the unpkg CDN. `js/app.js` is a plain script, so it needs no build step or `type="module"`:
|
|
86
|
+
|
|
87
|
+
```html
|
|
88
|
+
<script src="https://unpkg.com/@adminkit/core@latest/dist/js/head.js"></script>
|
|
89
|
+
<link
|
|
90
|
+
rel="stylesheet"
|
|
91
|
+
href="https://unpkg.com/@adminkit/core@latest/dist/css/app.css"
|
|
92
|
+
/>
|
|
93
|
+
<script src="https://unpkg.com/@adminkit/core@latest/dist/js/app.js"></script>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Pin an exact version instead of `@latest` in production. The script adds `window.bootstrap`, `window.adminkit`, `window.lucide`, `window.theme`, `window.Chart`, `window.jsVectorMap` and `window.VanillaCalendar`.
|
|
97
|
+
|
|
98
|
+
## Frameworks
|
|
99
|
+
|
|
100
|
+
AdminKit is plain HTML, CSS and JavaScript, so it works with any back end or front-end framework. `js/app.js` also sets up icons, the sidebar and the other markup it enhances when a framework renders them after the page has loaded. The documentation has a setup guide for each of these:
|
|
101
|
+
|
|
102
|
+
- [HTML](https://adminkit.io/docs/frameworks/html/)
|
|
103
|
+
- [Laravel](https://adminkit.io/docs/frameworks/laravel/)
|
|
104
|
+
- [Django](https://adminkit.io/docs/frameworks/django/)
|
|
105
|
+
- [Rails](https://adminkit.io/docs/frameworks/rails/)
|
|
106
|
+
- [Symfony](https://adminkit.io/docs/frameworks/symfony/)
|
|
107
|
+
- [React](https://adminkit.io/docs/frameworks/react/)
|
|
108
|
+
- [Next.js](https://adminkit.io/docs/frameworks/nextjs/)
|
|
109
|
+
- [Vue](https://adminkit.io/docs/frameworks/vue/)
|
|
110
|
+
- [Nuxt](https://adminkit.io/docs/frameworks/nuxt/)
|
|
111
|
+
- [Angular](https://adminkit.io/docs/frameworks/angular/)
|
|
112
|
+
- [SvelteKit](https://adminkit.io/docs/frameworks/sveltekit/)
|
|
113
|
+
- [Astro](https://adminkit.io/docs/frameworks/astro/)
|
|
114
|
+
|
|
115
|
+
## Dark mode
|
|
116
|
+
|
|
117
|
+
`css/app.css` holds a light and a dark color mode, built on [Bootstrap's color modes](https://getbootstrap.com/docs/5.3/customize/color-modes/). Set `data-bs-theme="dark"` on `<html>` for dark mode, or on any other element for that part of the page. The navbar toggle switches between light, dark and auto (the operating system setting) and stores the choice in `localStorage` (`adminkit_config_colorMode`). To apply the stored mode before the first paint, load `js/head.js` in `<head>`, before the stylesheet, as a plain blocking script (no `defer` or `type="module"`):
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<script src="js/head.js"></script>
|
|
121
|
+
<link rel="stylesheet" href="css/app.css" />
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
It is a few hundred bytes, needs no `unsafe-inline` in a Content Security Policy and also hides the cards that fade in until `js/app.js` runs. Without it `js/app.js` still sets the mode, after the first paint.
|
|
125
|
+
|
|
126
|
+
In your own styles, use the custom properties for colors that follow the mode: Bootstrap's `--bs-*`, the gray scale `--bs-gray-100` to `--bs-gray-900` (which turns around in dark mode) and `--ak-surface-bg`, the background of cards, dropdowns and inputs. The dark values live in `src/scss/1-variables/_dark.scss`.
|
|
127
|
+
|
|
128
|
+
`window.theme` holds the theme colors of the current mode for charts and maps; `document` fires `adminkit:themechange` with the new colors when the mode changes. Charts and maps created with `adminkit.chartjs(element, theme => config)` and `adminkit.vectorMap(theme => options)` recolor themselves.
|
|
129
|
+
|
|
130
|
+
## Google Maps
|
|
131
|
+
|
|
132
|
+
The Google Maps page loads the Maps JavaScript API without an API key, so Google marks the maps "For development purposes only" and logs a `NoApiKeys` warning (and an `ApiProjectMapError` per map) in the console. For production, create a key in Google Cloud, restrict it by HTTP referrer and add `key=YOUR_KEY` to the script URL in `src/pages/maps-google.html`.
|
|
133
|
+
|
|
134
|
+
## File structure
|
|
135
|
+
|
|
136
|
+
The package contains the following directories and files:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
adminkit/
|
|
140
|
+
├── .nvmrc
|
|
141
|
+
├── README.md
|
|
142
|
+
├── package.json
|
|
143
|
+
├── postcss.config.mjs
|
|
144
|
+
├── vite.config.js
|
|
145
|
+
├── public/
|
|
146
|
+
│ └── img/
|
|
147
|
+
├── scripts/
|
|
148
|
+
├── src/
|
|
149
|
+
│ ├── data/
|
|
150
|
+
│ ├── helpers/
|
|
151
|
+
│ ├── js/
|
|
152
|
+
│ │ ├── modules/
|
|
153
|
+
│ │ └── app.js
|
|
154
|
+
│ ├── layouts/
|
|
155
|
+
│ ├── pages/
|
|
156
|
+
│ ├── partials/
|
|
157
|
+
│ │ ├── charts/
|
|
158
|
+
│ │ └── dashboard/
|
|
159
|
+
│ └── scss/
|
|
160
|
+
│ ├── 1-variables/
|
|
161
|
+
│ ├── 2-mixins/
|
|
162
|
+
│ ├── 3-components/
|
|
163
|
+
│ ├── 4-utilities/
|
|
164
|
+
│ ├── 5-vendor/
|
|
165
|
+
│ └── app.scss
|
|
166
|
+
├── vite/
|
|
167
|
+
└── dist/
|
|
168
|
+
├── *.html
|
|
169
|
+
├── css/
|
|
170
|
+
│ └── app.css
|
|
171
|
+
├── img/
|
|
172
|
+
└── js/
|
|
173
|
+
├── app.js
|
|
174
|
+
├── head.js
|
|
175
|
+
└── icons-all.js
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`src/pages` holds one Handlebars template per page with YAML frontmatter; `src/layouts` and `src/partials` are the shared markup, with the chart and dashboard widgets in `src/partials/charts` and `src/partials/dashboard`; a page's inline script sits at the end of the page, a widget's script in the widget's partial. `public/` is copied to `dist/` as it is.
|
|
179
|
+
|
|
180
|
+
## Sidebar
|
|
181
|
+
|
|
182
|
+
From Bootstrap's lg breakpoint (992px) up, the navbar toggle hides and shows the sidebar. On smaller screens the sidebar is a Bootstrap offcanvas (`.offcanvas-lg` on `#sidebar`): the toggle opens it as a sheet over the page, Escape, the backdrop or a link close it, and focus stays inside while it is open.
|
|
183
|
+
|
|
184
|
+
## Motion
|
|
185
|
+
|
|
186
|
+
Cards fade up as they scroll into view (`.ak-reveal-cards` on `<main>`, `.ak-reveal` on anything else), stat numbers with `data-count-up` count up, charts animate in, and cards whose content JavaScript draws show a skeleton placeholder until it is ready. Durations and easings are the `--ak-duration-fast|base|slow` and `--ak-ease-standard|emphasized` custom properties (`$ak-transition-*` in Sass). With `prefers-reduced-motion: reduce` nothing moves: content only fades in, numbers and charts show their final state at once. The cards only fade in on pages that load `js/head.js`; without it the content shows at once.
|
|
187
|
+
|
|
188
|
+
## Accessibility
|
|
189
|
+
|
|
190
|
+
The template targets WCAG 2.2 AA in both color modes: 4.5:1 contrast for text, 3:1 for large text, icons and other controls, named controls and a logical heading order. Every page is checked in light and dark mode with axe (`@axe-core/playwright`), including the sidebar and navbar. New colors must pass too: derive text colors with `ak-readable($color, $background)` from `src/scss/1-variables/_functions.scss`, which darkens (or, on dark backgrounds, lightens) a color just enough, and use `$theme-text-colors` / `$theme-text-colors-dark` for theme colors drawn as text.
|
|
191
|
+
|
|
192
|
+
## Icons
|
|
193
|
+
|
|
194
|
+
AdminKit uses [Lucide](https://lucide.dev/icons/) icons: `<i data-lucide="house"></i>` gets the icon as an inline SVG inside it, also when the markup is added after the page has loaded. `js/app.js` only bundles the icons the templates use, listed in `src/js/modules/icons.js`. To use another icon, import it there and add it to `icons`; `npm run lint` fails when a template uses an icon that is not bundled, or the list bundles one that no template uses.
|
|
195
|
+
|
|
196
|
+
The icons page loads `js/icons-all.js`, which holds every Lucide icon. Its icon list, `src/data/icons-lucide.json`, is generated from `lucide-static`; run `npm run icons:list` after upgrading `lucide` and `lucide-static`.
|
|
197
|
+
|
|
198
|
+
## Browser support
|
|
199
|
+
|
|
200
|
+
The build targets the browsers Vite calls "baseline widely available". The `browserslist` field in `package.json` lists the same set for Autoprefixer.
|
|
201
|
+
|
|
202
|
+
| <img src="https://assets.adminkit.io/browsers/edge.png" alt="Edge" width="24px" height="24px" /><br/>Edge | <img src="https://assets.adminkit.io/browsers/firefox.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://assets.adminkit.io/browsers/chrome.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://assets.adminkit.io/browsers/safari.png" alt="Safari" width="24px" height="24px" /><br/>Safari | <img src="https://assets.adminkit.io/browsers/safari-ios.png" alt="iOS Safari" width="24px" height="24px" /><br/>iOS Safari |
|
|
203
|
+
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
204
|
+
| 111+ | 114+ | 111+ | 16.4+ | 16.4+ |
|
|
205
|
+
|
|
206
|
+
## Resources
|
|
207
|
+
|
|
208
|
+
- [Demo](https://demo.adminkit.io/)
|
|
209
|
+
- [Website](https://adminkit.io/)
|
|
210
|
+
- [Documentation](https://adminkit.io/docs)
|
|
211
|
+
- [Support](https://adminkit.io/support/)
|
|
212
|
+
- [Affiliate Program](https://adminkit.io/affiliate-program)
|
|
213
|
+
|
|
214
|
+
## Bugs and feature requests
|
|
215
|
+
|
|
216
|
+
To report a bug or request a feature, [open a new issue](https://github.com/adminkit/adminkit/issues/new).
|