Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aiursoftweb/autodark.js
Mirror of https://gitlab.aiursoft.cn/aiursoft/autodark.js
https://github.com/aiursoftweb/autodark.js
Last synced: 5 days ago
JSON representation
Mirror of https://gitlab.aiursoft.cn/aiursoft/autodark.js
- Host: GitHub
- URL: https://github.com/aiursoftweb/autodark.js
- Owner: AiursoftWeb
- Created: 2024-01-01T11:49:12.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-07-16T07:00:14.000Z (4 months ago)
- Last Synced: 2024-07-16T09:21:38.270Z (4 months ago)
- Language: TypeScript
- Size: 88.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AutoDark.js
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.aiursoft.cn/aiursoft/autodark.js/-/blob/master/LICENSE) [![Pipeline stat](https://gitlab.aiursoft.cn/aiursoft/autodark.js/badges/master/pipeline.svg)](https://gitlab.aiursoft.cn/aiursoft/autodark.js/-/pipelines) [![ManHours](https://manhours.aiursoft.cn/r/gitlab.aiursoft.cn/aiursoft/autodark.js.svg)](https://gitlab.aiursoft.cn/aiursoft/autodark.js/-/commits/master?ref_type=heads) [![npm](https://img.shields.io/npm/v/@aiursoft/autodark.js?color=blue)](https://www.npmjs.com/package/@aiursoft/autodark.js) [![npm](https://img.shields.io/npm/dm/@aiursoft/autodark.js)](https://www.npmjs.com/package/@aiursoft/autodark.js)
`@aiursoft/autodark.js` is a JavaScript library for detecting user's system dark mode and auto switch your website's theme.
## Installation
Run the following command to install the most recent version of `@aiursoft/autodark.js` from npm:
```sh
npm install @aiursoft/autodark.js
```Bootstrap 4.6.2 is the only version that is tested. To use this project, you need to use bootstrap 4.6.2 in your project.
## Importing
## Reference CSS
You also need to reference the CSS file in your HTML:
```html
```
## Reference JavaScript
You also need to reference bootstrap's JavaScript file:
```html
import { autoTheme } from './node_modules/@aiursoft/autodark.js/dist/esm/autodark.js'
autoTheme()```
## How to build locally
```bash
npm install
npm run build
```## How to contribute
There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.
We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.