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: 26 days 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-19T10:07:39.000Z (6 months ago)
- Last Synced: 2024-10-29T22:37:24.304Z (6 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.42 MB
- Stars: 33
- Watchers: 8
- Forks: 22
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
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
[](https://github.com/fof/nightmode/blob/master/LICENSE)
[](https://github.com/FriendsOfFlarum/nightmode)
[](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.

- A "Day Mode" option has been added as well to make the light appear again! (BEGONE, DANKESS!)

### 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).