diff --git a/.eslintrc.js b/.eslintrc.js index e9c55eec0..47e18b680 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,5 +20,11 @@ module.exports = { rules: { // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs // e.g. "@typescript-eslint/explicit-function-return-type": "off", + 'prettier/prettier': [ + 'error', + { + endOfLine: 'auto', // Fix the endOfLine issue + }, + ], }, } diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 64da87772..1e272670d 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities @@ -43,4 +43,4 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md index 261c7ca20..dfda6b886 100644 --- a/.github/COMMIT_CONVENTION.md +++ b/.github/COMMIT_CONVENTION.md @@ -36,7 +36,7 @@ This reverts commit 667ecc1654a317a13331b17617d973392f415f02. ### Full Message Format -A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: ``` (): @@ -66,9 +66,9 @@ The scope could be anything specifying place of the commit change. For example ` The subject contains succinct description of the change: -* use the imperative, present tense: "change" not "changed" nor "changes" -* don't capitalize first letter -* no dot (.) at the end +- use the imperative, present tense: "change" not "changed" nor "changes" +- don't capitalize first letter +- no dot (.) at the end ### Body @@ -80,4 +80,4 @@ The body should include the motivation for the change and contrast this with pre The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**. -**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this. \ No newline at end of file +**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7132f4a77..d56c78bf8 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -14,9 +14,9 @@ the preferred channel for [bug reports](#bug-reports), [features requests](#feat and [submitting pull requests](#pull-requests), but please respect the following restrictions: -* Please **do not** use the issue tracker for personal support requests. +- Please **do not** use the issue tracker for personal support requests. -* Please **do not** post comments consisting solely of "+1" or ":thumbsup:". +- Please **do not** post comments consisting solely of "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead. @@ -35,7 +35,6 @@ Guidelines for bug reports: 3. **Isolate the problem** — ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example. [This JS Bin](http://jsbin.com/lefey/1/edit?html,output) is a helpful template. - A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS @@ -65,11 +64,10 @@ Example: Feature requests are welcome. Before opening a feature request, please take a moment to find out whether your idea fits with the scope and aims of the -project. It's up to *you* to make a strong case to convince the project's +project. It's up to _you_ to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. - ## Pull requests Good pull requests—patches, improvements, new features—are a fantastic @@ -129,7 +127,7 @@ included in the project: ``` 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) - with a clear title and description against the `master` branch. + with a clear title and description against the `master` branch. **IMPORTANT**: By submitting a patch, you agree to allow the project owners to license your work under the terms of the [MIT License](LICENSE). @@ -140,13 +138,13 @@ Inspired by Sparkbox's awesome article on [semantic commit messages](http://seesparkbox.com/foundry/semantic_commit_messages). Please use following commit message format. -* chore (updating npm tasks etc; no production code change) -> ```git test -m 'chore: commit-message-here'``` -* docs (changes to documentation) -> ```git commit -m 'docs: commit-message-here'``` -* feat (new feature) -> ```git commit -m 'feat: commit-message-here'``` -* fix (bug fix) -> ```git commit -m 'fix: commit-message-here'``` -* refactor (refactoring production code) -> ```git commit -m 'refactor: commit-message-here'``` -* style (formatting, missing semi colons, etc; no code change) -> ```git commit -m 'style: commit-message-here'``` -* test (adding missing tests, refactoring tests; no production code change) -> ```git test -m 'refactor: commit-message-here'``` +- chore (updating npm tasks etc; no production code change) -> `git test -m 'chore: commit-message-here'` +- docs (changes to documentation) -> `git commit -m 'docs: commit-message-here'` +- feat (new feature) -> `git commit -m 'feat: commit-message-here'` +- fix (bug fix) -> `git commit -m 'fix: commit-message-here'` +- refactor (refactoring production code) -> `git commit -m 'refactor: commit-message-here'` +- style (formatting, missing semi colons, etc; no code change) -> `git commit -m 'style: commit-message-here'` +- test (adding missing tests, refactoring tests; no production code change) -> `git test -m 'refactor: commit-message-here'` ## Code guidelines diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index f1ea5ecf4..05039cbe5 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,4 @@ # These are supported funding model platforms -custom: "https://coreui.io/pricing?support=react" +custom: 'https://coreui.io/pricing?support=react' open_collective: coreui diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a78f1b81c..8ea8f7260 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Tell us about a bug you may have identified in CoreUI Free React Admin Te title: '' labels: '' assignees: '' - --- Before opening: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index b5c7e5b7d..5eb6a01d3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,7 +4,6 @@ about: Suggest an idea for a new feature in CoreUI Free React Admin Template. title: '' labels: feature assignees: '' - --- Before opening: diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 27f1fd685..0c1828f41 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -3,9 +3,9 @@ name: NPM Installation on: push: branches-ignore: - - "dependabot/**" + - 'dependabot/**' schedule: - - cron: '0 0 * * *' + - cron: '0 0 * * *' env: FORCE_COLOR: 2 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ef653f578..bd63369bc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,21 +7,20 @@ name: Mark stale issues and pull requests on: schedule: - - cron: '15 14 * * *' + - cron: '15 14 * * *' jobs: stale: - runs-on: ubuntu-latest permissions: issues: write pull-requests: write steps: - - uses: actions/stale@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions' - stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions' - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions' + stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' diff --git a/README.md b/README.md index 958c98430..5f6890087 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![NPM downloads][npm-coreui-download]][npm-coreui] [![@coreui react](https://img.shields.io/badge/@coreui%20-react-lightgrey.svg?style=flat-square)](https://github.com/coreui/react) [![npm package][npm-coreui-react-badge]][npm-coreui-react] -[![NPM downloads][npm-coreui-react-download]][npm-coreui-react] +[![NPM downloads][npm-coreui-react-download]][npm-coreui-react] [npm-coreui]: https://www.npmjs.com/package/@coreui/coreui [npm-coreui-badge]: https://img.shields.io/npm/v/@coreui/coreui.png?style=flat-square @@ -22,45 +22,45 @@ CoreUI is meant to be the UX game changer. Pure & transparent code is devoid of ## Table of Contents -* [Versions](#versions) -* [CoreUI PRO](#coreui-pro) -* [CoreUI PRO React Admin Templates](#coreui-pro-react-admin-templates) -* [Quick Start](#quick-start) -* [Installation](#installation) -* [Basic usage](#basic-usage) -* [What's included](#whats-included) -* [Documentation](#documentation) -* [Versioning](#versioning) -* [Creators](#creators) -* [Community](#community) -* [Support CoreUI Development](#support-coreui-development) -* [Copyright and License](#copyright-and-license) +- [Versions](#versions) +- [CoreUI PRO](#coreui-pro) +- [CoreUI PRO React Admin Templates](#coreui-pro-react-admin-templates) +- [Quick Start](#quick-start) +- [Installation](#installation) +- [Basic usage](#basic-usage) +- [What's included](#whats-included) +- [Documentation](#documentation) +- [Versioning](#versioning) +- [Creators](#creators) +- [Community](#community) +- [Support CoreUI Development](#support-coreui-development) +- [Copyright and License](#copyright-and-license) ## Versions -* [CoreUI Free Bootstrap Admin Template](https://github.com/coreui/coreui-free-bootstrap-admin-template) -* [CoreUI Free Angular Admin Template](https://github.com/coreui/coreui-free-angular-admin-template) -* [CoreUI Free React.js Admin Template (Vite)](https://github.com/coreui/coreui-free-react-admin-template) -* [CoreUI Free React.js Admin Template (Create React App)](https://github.com/coreui/coreui-free-react-admin-template-cra) -* [CoreUI Free Vue.js Admin Template](https://github.com/coreui/coreui-free-vue-admin-template) +- [CoreUI Free Bootstrap Admin Template](https://github.com/coreui/coreui-free-bootstrap-admin-template) +- [CoreUI Free Angular Admin Template](https://github.com/coreui/coreui-free-angular-admin-template) +- [CoreUI Free React.js Admin Template (Vite)](https://github.com/coreui/coreui-free-react-admin-template) +- [CoreUI Free React.js Admin Template (Create React App)](https://github.com/coreui/coreui-free-react-admin-template-cra) +- [CoreUI Free Vue.js Admin Template](https://github.com/coreui/coreui-free-vue-admin-template) ## CoreUI PRO -* 💪 [CoreUI PRO Angular Admin Template](https://coreui.io/product/angular-dashboard-template/) -* 💪 [CoreUI PRO Bootstrap Admin Template](https://coreui.io/product/bootstrap-dashboard-template/) -* 💪 [CoreUI PRO Next.js Admin Template](https://coreui.io/product/next-js-dashboard-template/) -* 💪 [CoreUI PRO React Admin Template](https://coreui.io/product/react-dashboard-template/) -* 💪 [CoreUI PRO Vue Admin Template](https://coreui.io/product/vue-dashboard-template/) +- 💪 [CoreUI PRO Angular Admin Template](https://coreui.io/product/angular-dashboard-template/) +- 💪 [CoreUI PRO Bootstrap Admin Template](https://coreui.io/product/bootstrap-dashboard-template/) +- 💪 [CoreUI PRO Next.js Admin Template](https://coreui.io/product/next-js-dashboard-template/) +- 💪 [CoreUI PRO React Admin Template](https://coreui.io/product/react-dashboard-template/) +- 💪 [CoreUI PRO Vue Admin Template](https://coreui.io/product/vue-dashboard-template/) ## CoreUI PRO React Admin Templates -| Default Theme | Light Theme | -| --- | --- | -| [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_default_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=default) | [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_light_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=light)| +| Default Theme | Light Theme | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_default_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=default) | [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_light_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=light) | -| Modern Theme | Bright Theme | -| --- | --- | -| [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_default_v3_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=modern) | [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_light_v3_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=bright)| +| Modern Theme | Bright Theme | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_default_v3_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=modern) | [![CoreUI PRO React Admin Template](https://coreui.io/images/templates/coreui_pro_light_v3_light_dark.webp)](https://coreui.io/product/react-dashboard-template/?theme=bright) | ## Quick Start @@ -69,26 +69,26 @@ CoreUI is meant to be the UX game changer. Pure & transparent code is devoid of ### Installation -``` bash +```bash $ npm install ``` or -``` bash +```bash $ yarn install ``` ### Basic usage -``` bash +```bash # dev server with hot reload at http://localhost:3000 -$ npm start +$ npm start ``` -or +or -``` bash +```bash # dev server with hot reload at http://localhost:3000 $ yarn start ``` @@ -131,7 +131,7 @@ coreui-free-react-admin-template │ ├── App.js │ ├── index.js │ ├── routes.js # routes config -│ └── store.js # template state example +│ └── store.js # template state example │ ├── index.html # html template ├── ... @@ -154,18 +154,18 @@ See [the Releases section of our project](https://github.com/coreui/coreui-free- **Łukasz Holeczek** -* -* +- +- **Andrzej Kopański** -* +- **CoreUI Team** -* -* -* +- +- +- ## Community @@ -180,6 +180,6 @@ CoreUI is an MIT-licensed open source project and is completely free to use. How ## Copyright and License -copyright 2024 creativeLabs Łukasz Holeczek. +copyright 2024 creativeLabs Łukasz Holeczek. -Code released under [the MIT license](https://github.com/coreui/coreui-free-react-admin-template/blob/main/LICENSE). \ No newline at end of file +Code released under [the MIT license](https://github.com/coreui/coreui-free-react-admin-template/blob/main/LICENSE). diff --git a/index.html b/index.html index ca596acc7..1ae237e7d 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + - - - - - - + + + + + + CoreUI Free React.js Admin Template - - + + - +
diff --git a/package.json b/package.json index fde78d803..8556cbfe8 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "dependencies": { "@coreui/chartjs": "^4.0.0", "@coreui/coreui": "^5.1.2", + "@coreui/coreui-free-react-admin-template": "file:", "@coreui/icons": "^3.0.1", "@coreui/icons-react": "^2.3.0", "@coreui/react": "^5.4.0", diff --git a/src/App.js b/src/App.js index 7f8e6d7ea..a8b57972c 100644 --- a/src/App.js +++ b/src/App.js @@ -8,6 +8,8 @@ import './scss/style.scss' // Containers const DefaultLayout = React.lazy(() => import('./layout/DefaultLayout')) +const NotFoundPage = React.lazy(() => import('./components/NotFound')) + // Pages const Login = React.lazy(() => import('./views/pages/login/Login')) const Register = React.lazy(() => import('./views/pages/register/Register')) diff --git a/src/components/NotFound.js b/src/components/NotFound.js new file mode 100644 index 000000000..1397478b2 --- /dev/null +++ b/src/components/NotFound.js @@ -0,0 +1,28 @@ +import React from 'react' +import { CButton, CContainer, CRow, CCol } from '@coreui/react' +import CIcon from '@coreui/icons-react' +import { cilArrowLeft } from '@coreui/icons' +//import './NotFound.css' + +const NotFound = () => { + return ( + + + +

404

+

Oops! Page not found

+

+ We're sorry, but the page you're looking for doesn't exist. It might have +
+ been removed or is temporarily unavailable. +

+ + Back to Home + +
+
+
+ ) +} + +export default NotFound diff --git a/src/scss/_theme.scss b/src/scss/_theme.scss index 49e1c79e6..332620f05 100644 --- a/src/scss/_theme.scss +++ b/src/scss/_theme.scss @@ -4,10 +4,10 @@ body { .wrapper { width: 100%; - @include ltr-rtl("padding-left", var(--cui-sidebar-occupy-start, 0)); - @include ltr-rtl("padding-right", var(--cui-sidebar-occupy-end, 0)); + @include ltr-rtl('padding-left', var(--cui-sidebar-occupy-start, 0)); + @include ltr-rtl('padding-right', var(--cui-sidebar-occupy-end, 0)); will-change: auto; - @include transition(padding .15s); + @include transition(padding 0.15s); } .header > .container-fluid, @@ -33,13 +33,13 @@ body { } .sidebar-toggler { - @include ltr-rtl("margin-left", auto); + @include ltr-rtl('margin-left', auto); } .sidebar-narrow, .sidebar-narrow-unfoldable:not(:hover) { .sidebar-toggler { - @include ltr-rtl("margin-right", auto); + @include ltr-rtl('margin-right', auto); } } diff --git a/src/scss/examples.scss b/src/scss/examples.scss index 2390ba194..d8a708d63 100644 --- a/src/scss/examples.scss +++ b/src/scss/examples.scss @@ -1,9 +1,9 @@ /* stylelint-disable declaration-no-important, scss/selector-no-redundant-nesting-selector */ $enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-variable-default */ -@import "@coreui/coreui/scss/functions"; -@import "@coreui/coreui/scss/variables"; -@import "@coreui/coreui/scss/mixins"; +@import '@coreui/coreui/scss/functions'; +@import '@coreui/coreui/scss/variables'; +@import '@coreui/coreui/scss/mixins'; .example { &:not(:first-child) { @@ -26,7 +26,7 @@ $enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-varia > .form-control { + .form-control { - margin-top: .5rem; + margin-top: 0.5rem; } } @@ -49,16 +49,16 @@ $enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-varia // Images > svg + svg, > img + img { - margin-left: .5rem; + margin-left: 0.5rem; } // Buttons > .btn, > .btn-group { - margin: .25rem .125rem; + margin: 0.25rem 0.125rem; } > .btn-toolbar + .btn-toolbar { - margin-top: .5rem; + margin-top: 0.5rem; } // List groups @@ -66,7 +66,7 @@ $enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-varia max-width: 400px; } - > [class*="list-group-horizontal"] { + > [class*='list-group-horizontal'] { max-width: 100%; } @@ -94,8 +94,8 @@ $enable-deprecation-messages: false; /* stylelint-disable-line scss/dollar-varia // Pagination .pagination { - margin-top: .5rem; - margin-bottom: .5rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; } .docs-example-modal { diff --git a/src/scss/style.scss b/src/scss/style.scss index 4fbc82356..06cc268d2 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -1,15 +1,15 @@ // If you want to override variables do it here -@import "variables"; +@import 'variables'; // Import styles -@import "@coreui/coreui/scss/coreui"; -@import "@coreui/chartjs/scss/coreui-chartjs"; +@import '@coreui/coreui/scss/coreui'; +@import '@coreui/chartjs/scss/coreui-chartjs'; // Vendors -@import "vendors/simplebar"; +@import 'vendors/simplebar'; // Custom styles for this theme -@import "theme"; +@import 'theme'; // If you want to add custom CSS you can put it here -@import "custom"; +@import 'custom';