https://github.com/clashsoft/ng-bootstrap-darkmode
An Angular wrapper for bootstrap-darkmode.
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.8%) to scientific vocabulary
Keywords
Repository
An Angular wrapper for bootstrap-darkmode.
Basic Info
Statistics
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 8
Topics
Metadata Files
README.md
NgBootstrapDarkmode - moved to ngbx
An Angular wrapper for bootstrap-darkmode.
Installation
Install the module:
sh
$ npm install ng-bootstrap-darkmode bootstrap-darkmode
Include darkmode css (in styles.scss):
scss
@import "~bootstrap-darkmode/scss/darktheme";
Alternatively, if you are not using SCSS, add the following in angular.json under projects.<yourProject>.architect.build.options.styles:
json5
"styles": [
// ...
"../node_modules/bootstrap-darkmode/dist/darktheme.css"
]
Usage
Module Import
```typescript import {NgBootstrapDarkmodeModule} from 'ng-bootstrap-darkmode';
@NgModule({ imports: [ // ... NgBootstrapDarkmodeModule, ], // ... }) export class AppModule { } ```
Theme Switcher
To include the theme switcher, which allows selections between light, dark and automatic (user agent preference) mode:
html
<ngbd-theme-switch></ngbd-theme-switch>
The theme switcher can be customized with the optional [size] and [style] attributes:
```html
An outdated alternative is the dark mode switch, which does not support automatic mode:
html
<ngbd-darkmode-switch></ngbd-darkmode-switch>
Subscribing to the Theme
```typescript import {ThemeService} from 'ng-bootstrap-darkmode';
@Injectable() export class MyService { constructor( themeService: ThemeService, ) { themeService.theme$.subscribe(theme => console.log(theme)); } } ```
Configuring Persistence
By default, this library persists the currently selected theme using the key theme in localStorage.
You can customize how this behaviour using dependency injection.
Just provide the THEME_SAVER and THEME_LOADER functions in your module:
```typescript import {of} from 'rxjs';
import {NgBootstrapDarkmodeModule, THEMELOADER, THEMESAVER} from 'ng-bootstrap-darkmode';
@NgModule({ imports: [ // ... NgBootstrapDarkmodeModule, ], providers: [ { provide: THEMELOADER, useValue: () => of('light'), }, { provide: THEMESAVER, useValue: (theme) => console.log('saving', theme), }, ], // ... }) export class AppModule { } ```
Owner
- Name: Adrian Kunz
- Login: Clashsoft
- Kind: user
- Location: Kassel, Germany
- Company: University of Kassel
- Website: https://www.clashsoft.de/
- Twitter: Clashsoft
- Repositories: 43
- Profile: https://github.com/Clashsoft
Hi there, I'm Adrian and currently a PhD Student of Computer Science.
GitHub Events
Total
Last Year
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Adrian Kunz | c****t@h****m | 88 |
| Adrian Kunz | c****t@h****e | 2 |
| Adrian Kunz | a****z@A****x | 1 |
| Julian Holfeld | j****d@s****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 2
- Total pull requests: 1
- Average time to close issues: 12 minutes
- Average time to close pull requests: about 3 hours
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- dtrunk90 (1)
- Clashsoft (1)
Pull Request Authors
- Morphclue (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 40 last-month
- Total dependent packages: 1
- Total dependent repositories: 4
- Total versions: 8
- Total maintainers: 1
npmjs.org: ng-bootstrap-darkmode
An Angular wrapper for bootstrap-darkmode
- Homepage: https://github.com/Clashsoft/ng-bootstrap-darkmode
- License: BSD 3-Clause
- Status: deprecated
-
Latest release: 5.0.0
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- 1258 dependencies
- @angular-devkit/build-angular ~12.1.1 development
- @angular-devkit/build-ng-packagr ~0.901.12 development
- @angular/cli ~12.1.1 development
- @angular/compiler-cli ~12.1.1 development
- @types/jasmine ~3.5.14 development
- @types/jasminewd2 ~2.0.8 development
- @types/node ^12.12.55 development
- bootstrap ^4.5.2 development
- bootstrap-darkmode ^0.7.0 development
- codelyzer ^5.2.2 development
- jasmine-core ~3.5.0 development
- jasmine-spec-reporter ~4.2.1 development
- karma ~6.3.4 development
- karma-chrome-launcher ~3.1.0 development
- karma-coverage-istanbul-reporter ~2.1.1 development
- karma-jasmine ~3.0.3 development
- karma-jasmine-html-reporter ^1.5.4 development
- ng-packagr ^12.1.0 development
- protractor ~7.0.0 development
- ts-node ~8.3.0 development
- tslint ~6.1.3 development
- typescript ~4.3.5 development
- @angular/animations ~12.1.1
- @angular/common ~12.1.1
- @angular/compiler ~12.1.1
- @angular/core ~12.1.1
- @angular/forms ~12.1.1
- @angular/platform-browser ~12.1.1
- @angular/platform-browser-dynamic ~12.1.1
- @angular/router ~12.1.1
- rxjs ~6.5.5
- tslib ^2.3.0
- zone.js ~0.11.4
- bootstrap-darkmode ^0.7.0 development
- tslib ^2.3.0
- actions/checkout v2 composite
- actions/setup-node v1 composite
- c-hive/gha-npm-cache v1 composite
- 1055 dependencies