/plugins/dark_mode

The module defines a darkTheme object to be applied with the cssColourTheme utility.

Requires

Methods

(inner) custom_theme(theme)

The custom_theme object from the locale will be applied through the cssColourTheme utility.

Parameters:
NameTypeDescription
themeObject

The colourTheme to be applied.

(inner) dark_mode()

The dark_mode plugin method adds a button to the mapview controls which allows to toggle the application of a darkTheme defined in this module.

Whether the darkTheme should be applied by default is stored as darkMode flag in the localStorage.