https://github.com/clashsoft/ng-bootstrap-darkmode

An Angular wrapper for bootstrap-darkmode.

https://github.com/clashsoft/ng-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

angular bootstrap bootstrap-theme dark-mode dark-theme
Last synced: 5 months ago · JSON representation

Repository

An Angular wrapper for bootstrap-darkmode.

Basic Info
  • Host: GitHub
  • Owner: Clashsoft
  • License: bsd-3-clause
  • Language: TypeScript
  • Default Branch: master
  • Homepage:
  • Size: 623 KB
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 8
Archived
Topics
angular bootstrap bootstrap-theme dark-mode dark-theme
Created over 5 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Changelog License

README.md

NgBootstrapDarkmode - moved to ngbx

npm version Node.js CI

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

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

All Time
  • Total Commits: 92
  • Total Committers: 4
  • Avg Commits per committer: 23.0
  • Development Distribution Score (DDS): 0.043
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
enhancement (1) question (1)
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

  • Versions: 8
  • Dependent Packages: 1
  • Dependent Repositories: 4
  • Downloads: 40 Last month
Rankings
Dependent repos count: 5.9%
Forks count: 12.0%
Downloads: 12.1%
Average: 13.3%
Stargazers count: 15.0%
Dependent packages count: 21.5%
Maintainers (1)
Last synced: 11 months ago

Dependencies

package-lock.json npm
  • 1258 dependencies
package.json npm
  • @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
projects/ng-bootstrap-darkmode/package.json npm
  • bootstrap-darkmode ^0.7.0 development
  • tslib ^2.3.0
.github/workflows/node.js.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v1 composite
  • c-hive/gha-npm-cache v1 composite
pnpm-lock.yaml npm
  • 1055 dependencies