diff --git a/.babelrc b/.babelrc deleted file mode 100644 index dada780..0000000 --- a/.babelrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "useBuiltIns": "usage", - "corejs": 2 - } - ] - ], - "plugins": [ - "@babel/syntax-dynamic-import" - ] -} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8c52ff9 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 546a922..0000000 --- a/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 2017, - "sourceType": "module" - }, - "env": { - "es7": true - } -} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 5950883..dab93cd 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within @@ -125,4 +125,4 @@ enforcement ladder](https://github.com/mozilla/diversity). For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. \ No newline at end of file +https://www.contributor-covenant.org/translations. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 5a3c056..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,20 +0,0 @@ -# Contributing to AdminKit - -If you're reading this, you're awesome! Thank you for helping us make this project great. Here are a few guidelines that will help you along the way. - -## Submitting a Pull Request - -* Include **screenshots** or animated GIFs in your pull request whenever possible -* Use the **present** tense ("Add feature" not "Added feature") -* Use the **imperative** mood ("Move cursor to..." not "Moves cursor to...") -* Limit the first line to 72 characters or fewer -* Reference issues and pull requests liberally - -## Try your changes - -When modifying any of the files located in the `/src` folder, you will need to recompile the assets. You can do this by running: - -``` -npm install -npm run build -``` \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index b739308..f4b9789 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -custom: "https://adminkit.io/pricing/" \ No newline at end of file +custom: "https://adminkit.io/pricing/" diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8adea9b..a521341 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -30,7 +30,7 @@ Steps: - Theme version: -- Free or paid version: +- Free or paid version: - Browser: - OS: - Screen size: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 8fbc964..55f8153 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,4 +2,4 @@ blank_issues_enabled: false contact_links: - name: Support ❔ url: https://adminkit.io/support/ - about: I need support with AdminKit. \ No newline at end of file + about: I need support with AdminKit. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index afefc70..0e2f75e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -22,4 +22,4 @@ labels: enhancement \ No newline at end of file +--> diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 23ce187..06d48b5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,3 @@ -- [ ] I have followed (at least) the [PR section of the contributing guide](https://github.com/adminkit/adminkit/blob/HEAD/.github/CONTRIBUTING.md#submitting-a-pull-request). +- [ ] I have followed (at least) the [PR section of the contributing guide](https://github.com/adminkit/adminkit/blob/HEAD/CONTRIBUTING.md#branches-and-prs). diff --git a/.github/editions/html.svg b/.github/editions/html.svg new file mode 100644 index 0000000..6d10945 --- /dev/null +++ b/.github/editions/html.svg @@ -0,0 +1,7 @@ + diff --git a/.github/editions/nextjs.svg b/.github/editions/nextjs.svg new file mode 100644 index 0000000..c3c0708 --- /dev/null +++ b/.github/editions/nextjs.svg @@ -0,0 +1,7 @@ + diff --git a/.github/editions/react.svg b/.github/editions/react.svg new file mode 100644 index 0000000..10d09a6 --- /dev/null +++ b/.github/editions/react.svg @@ -0,0 +1,7 @@ + diff --git a/.github/screenshots/dashboard-dark.webp b/.github/screenshots/dashboard-dark.webp new file mode 100644 index 0000000..841a6e2 Binary files /dev/null and b/.github/screenshots/dashboard-dark.webp differ diff --git a/.github/screenshots/dashboard-light.webp b/.github/screenshots/dashboard-light.webp new file mode 100644 index 0000000..6e64bc6 Binary files /dev/null and b/.github/screenshots/dashboard-light.webp differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9942a3d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + +env: + LEFTHOOK: "0" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version-file: .nvmrc + cache: npm + - run: npm ci + - run: npm run lint + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version-file: .nvmrc + cache: npm + - run: npm ci + - run: npm run build + + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + - uses: actions/setup-node@v5 + with: + node-version-file: .nvmrc + cache: npm + - run: npm ci + - if: github.event_name == 'pull_request' + run: npx --no -- commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose + - if: github.event_name == 'push' + run: npx --no -- commitlint --last --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..88cc566 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release + +on: + push: + tags: ["v*"] + +env: + LEFTHOOK: "0" + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version-file: .nvmrc + cache: npm + - run: npm ci + - run: npm run build + - run: cd dist && zip -r "../adminkit-${GITHUB_REF_NAME}.zip" . + - uses: softprops/action-gh-release@v2 + with: + files: adminkit-${{ github.ref_name }}.zip diff --git a/.gitignore b/.gitignore index 34ae63d..db0a46d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,9 @@ # dependencies /node_modules -/package-lock.json /yarn.lock # production /dist -/_builder # misc .DS_Store diff --git a/.nvmrc b/.nvmrc index 3c79f30..a45fd52 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.16.0 \ No newline at end of file +24 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..9c218f5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +dist +public +node_modules +package-lock.json +src/js/modules/vector-maps +# Handlebars templates break Prettier's HTML parser +*.hbs +src/pages/*.html diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..dcdfde4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "trailingComma": "es5", + "semi": true, + "singleQuote": false +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a709ce2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,35 @@ +# AdminKit + +Free Bootstrap 5 admin template, published to npm as `@adminkit/core`. + +## Commands + +- `npm run dev`: dev server on http://localhost:8080 +- `npm run build`: build into `dist/`; `npm run preview` serves it +- `npm run lint`: ESLint, Prettier, the icon check and the stats check; must pass +- `npm run format`: Prettier write +- `npm run stats`: regenerate `src/data/stats.json` and the README counts +- `npm run stats:sync -- --pro ../adminkit-pro`: refresh PRO's counts; run it before every release + +## Layout + +- `src/pages/*.html` are Handlebars pages with YAML frontmatter; `src/layouts` and `src/partials` are partials, `src/helpers` helpers, `src/data` global data. +- `src/js` and `src/scss` build to `js/app.js` and `css/app.css`. Keep the output names: the pages and the npm package use them. `js/app.js` stays one self-contained file (no dynamic imports, no chunks); `src/types/app.d.ts` types its globals. +- `src/js/head.js` is a blocking script in `
`: it sets the color mode before the first paint and must not import anything. + +## Rules + +- Only CSS custom properties get a prefix: `--ak-*`, like Bootstrap's `--bs-*`. Classes, Sass variables, functions and mixins never do. +- Light and dark mode: colors that follow the mode use custom properties (`var(--bs-body-color)`, `var(--ak-surface-bg)`); dark-only overrides go in `@include color-mode(dark) { ... }` at the end of the partial. Check both modes. +- Icons are Lucide, `` with canonical names from lucide.dev. Add a new icon to `src/js/modules/icons.js`, or lint fails. +- Page scripts go in `{{#push "scripts"}}` at the end of the page or of the widget's partial, inside `DOMContentLoaded`. Charts and maps use `adminkit.chartjs("#id", function(theme) { ... })` and `adminkit.vectorMap(...)`; read colors from `theme`. +- JavaScript that enhances markup registers it with `mount(selector, setup)` (`src/js/modules/mount.js`), so markup added later works too. +- Counts come from `src/data/stats.json` (`{{formatNumber stats.pages.count}}`). Never type a count by hand. +- Motion: write transitions with `@include transition(...)`; under reduced motion nothing moves (a fade is fine). Cards inside `.reveal-cards` and `.reveal` elements fade in on scroll without extra code. +- Layout shift stays 0: reserve the final size of anything a script draws (`{{> skeleton }}`), give images `width` and `height`. +- Accessibility: WCAG 2.2 AA in both modes. Text colors come from `readable($color, $background)`, text on a fill from `text-on($background)`. Icon-only buttons get an `aria-label`; card titles are `h2.card-title`. + +## Conventions + +- Conventional Commits, see `CONTRIBUTING.md`; lefthook enforces them. Releases follow "Releasing" there. +- A PR that changes behaviour adds a short, user-facing line under `Unreleased` in `CHANGELOG.md`, like "Add pricing page (/pages-pricing.html)" or "Upgrade dependencies". diff --git a/CHANGELOG.md b/CHANGELOG.md index 48cb7a0..8890b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,45 @@ All notable changes to this project will be documented in this file. -## [3.5.0] 2026-08-01 +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Social preview image: `public/og-image.png` (1200x630) with its `og:image` and `twitter:card` tags in `src/partials/site-meta.hbs`. Change the domain in the image URL to yours. + +### Changed + +- Upgrade dependencies + +## [4.1.0] - 2026-10-31 + +- Drop the `ak-` prefix from classes, Sass variables and functions (`.ak-reveal` → `.reveal`); the old names work until v5 +- Upgrade dependencies + +## [4.0.0] - 2026-10-28 + +- Add dark mode with light, dark and auto color modes (`data-bs-theme`) +- Add pricing, invoice, 404, 500, alerts, modals and tables pages +- Add off-canvas sidebar on mobile +- Add subtle animations (respects reduced motion) +- Redesign Analytics dashboard and profile pages +- Replace Feather icons with Lucide (`data-feather` → `data-lucide`) +- Replace flatpickr with Vanilla Calendar Pro +- Improve color contrast to meet WCAG 2.2 AA +- Migrate to Vite v8 +- Upgrade to Chart.js v4 and SimpleBar v6 +- Upgrade dependencies + +## [3.5.0] - 2026-08-01 - Upgrade to Webpack v5.109.2 - Upgrade to Bootstrap v5.3.8 - Upgrade dependencies -## [3.4.0] 2023-06-08 +## [3.4.0] - 2023-06-08 - Add error catching to JavaScript modules - Update browserslist @@ -16,21 +48,21 @@ All notable changes to this project will be documented in this file. - Upgrade to Bootstrap v5.3.0 - Upgrade dependencies -## [3.3.0] 2022-08-10 +## [3.3.0] - 2022-08-10 - Fix table in card styling issues - Upgrade to Webpack v5.74.0 - Upgrade to Bootstrap v5.2.0 - Upgrade dependencies -## [3.2.0] 2022-02-04 +## [3.2.0] - 2022-02-04 - Migrate to Dart Sass - Upgrade to Webpack v5.68.0 - Upgrade to Bootstrap v5.1.3 - Upgrade dependencies -## [3.1.0] 2021-09-29 +## [3.1.0] - 2021-09-29 - Replace OptimizeCssAssetsPlugin with CssMinimizerPlugin - Remove HardSourceWebpackPlugin @@ -38,7 +70,7 @@ All notable changes to this project will be documented in this file. - Upgrade to Bootstrap v5.1.1 - Upgrade dependencies -## [3.0.2] 2021-05-19 +## [3.0.2] - 2021-05-19 - Add file structure to README.md - Add icons to dashboard (/index.html) @@ -48,13 +80,13 @@ All notable changes to this project will be documented in this file. - Various visual changes - Upgrade dependencies -## [3.0.1] 2021-05-17 +## [3.0.1] - 2021-05-17 - Fix Simplebar bug on auth pages - Upgrade to bootstrap@5.0.1 - Upgrade dependencies -## [3.0.0] 2021-05-12 +## [3.0.0] - 2021-05-12 - Set Chart.js font family - Remove Moment.js dependency @@ -63,13 +95,13 @@ All notable changes to this project will be documented in this file. - Upgrade to bootstrap@5.0.0 - Upgrade dependencies -## [2.3.0] 2021-04-05 +## [2.3.0] - 2021-04-05 - Add CDN to `README.md` - Upgrade to bootstrap@5.0.0-beta3 - Upgrade dependencies -## [2.2.0] 2021-02-25 +## [2.2.0] - 2021-02-25 - Replace Inter font with CDN - Replace Font Awesome icons with Feather @@ -79,7 +111,7 @@ All notable changes to this project will be documented in this file. - Upgrade to bootstrap@5.0.0-beta2 - Upgrade dependencies -## [2.1.0] 2020-11-07 +## [2.1.0] - 2020-11-07 - Add Sign In page - Add Sign Up page @@ -87,12 +119,12 @@ All notable changes to this project will be documented in this file. - Upgrade to bootstrap@5.0.0-alpha2 - Upgrade dependencies -## [2.0.1] 2020-09-14 +## [2.0.1] - 2020-09-14 - Fix console error on auth pages (#6) - Upgrade dependencies -## [2.0.0] 2020-09-04 +## [2.0.0] - 2020-09-04 - Upgrade to Bootstrap 5 - Drop jQuery as dependency @@ -100,16 +132,16 @@ All notable changes to this project will be documented in this file. - Replace tempusdominus with flatpickr - Upgrade dependencies -## [1.0.2] 2020-07-26 +## [1.0.2] - 2020-07-26 - Fix issue with dropdown overflow on mobile - Upgrade dependencies -## [1.0.1] 2020-05-25 +## [1.0.1] - 2020-05-25 - Upgrade to latest Bootstrap (4.5.0) - Upgrade dependencies -## [1.0.0] 2020-03-21 +## [1.0.0] - 2020-03-21 - Initial release diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..05423f9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing to AdminKit + +If you're reading this, you're awesome! Thank you for helping us make this project great. Here are a few guidelines that will help you along the way. + +## Setup + +Node 24 is required. The version is pinned in `.nvmrc`. + +```sh +nvm use +npm ci +npm run dev +``` + +`npm run dev` serves the pages on http://localhost:8080 and reloads on changes to `src/`. `npm run build` writes the production build to `dist/` (gitignored); `npm run preview` serves it. `npm ci` also installs the git hooks described below. + +## Branches and PRs + +- Branch from `main` using a short prefixed name: `feat/
+A professional admin and dashboard template based on Bootstrap 5, with dashboards, pages, forms, tables, charts and icons. Free and MIT-licensed. [Open the demo](https://demo.adminkit.io/).
+
+
+



