Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/FriendsOfFlarum/nightmode
🌙 Turn off the lights!
https://github.com/FriendsOfFlarum/nightmode
dark extension flarum flarum-extension forum friendsofflarum hacktoberfest light lights night-mode
Last synced: about 2 months ago
JSON representation
🌙 Turn off the lights!
- Host: GitHub
- URL: https://github.com/FriendsOfFlarum/nightmode
- Owner: FriendsOfFlarum
- License: mit
- Created: 2018-03-30T11:12:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T14:45:46.000Z (5 months ago)
- Last Synced: 2024-05-22T17:23:31.103Z (4 months ago)
- Topics: dark, extension, flarum, flarum-extension, forum, friendsofflarum, hacktoberfest, light, lights, night-mode
- Language: PHP
- Homepage: https://discuss.flarum.org/d/21492-friendsofflarum-night-mode
- Size: 1.37 MB
- Stars: 33
- Watchers: 8
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flarum - FoF Night Mode - Turn your flarum forum to dark as user. (Extensions / Forum Appearance ([:top:](#table-of-contents)))
README
# Night Mode by FriendsOfFlarum
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/fof/nightmode/blob/master/LICENSE)
[![Latest Stable Version](https://img.shields.io/packagist/v/fof/nightmode.svg)](https://github.com/FriendsOfFlarum/nightmode)
[![Total Downloads](https://img.shields.io/packagist/dt/fof/nightmode.svg)](https://packagist.org/packages/fof/nightmode)A [Flarum](http://flarum.org) extension. Add a Night Mode 🌙 for your users to use on your Flarum forum! (THE LIGHT 🌞, IT BUUUURNSSS!!!)
- A new "Night Mode" menu option will appear in your user options when you click on your avatar next to the notifications icon.
![Night Mode Option](https://i.imgur.com/x3Cvhic.png)
- A "Day Mode" option has been added as well to make the light appear again! (BEGONE, DANKESS!)
![Day Mode Option](https://i.imgur.com/ZJcDGQB.png)
### InstallationInstall manually with composer:
```sh
composer require fof/nightmode:"*"
```### Updating
```sh
composer update fof/nightmode
```### Integrating with `fof/nightmode` from another extension
Each time the mode is switched from `day` to `night` (and vice versa), a `fofnightmodechange` event is dispatched. An extension can then listen to this event to react to this change, like so:
```js
if (flarum.extensions['fof-nightmode']) {
document.addEventListener('fofnightmodechange', (event) => {
if (event.detail == 'day') {
console.log('day mode');
} else {
console.log('night mode');
}
});
}
```### Links
[](https://opencollective.com/fof/donate)
- [Packagist](https://packagist.org/packages/fof/nightmode)
- [GitHub](https://github.com/FriendsOfFlarum/nightmode)
- [ReFlar's Night Mode](https://packagist.org/packages/reflar/nightmode)An extension by [FriendsOfFlarum](https://github.com/FriendsOfFlarum).