Added theme toggle to Admin page

The admin can switch between the two default themes without a page
reload, with a nice animation (on small screens). Preference is stored
as a cookie, so the default theme setting will still apply to others.
This commit is contained in:
2020-07-06 20:53:14 +01:00
parent 781306f1ef
commit a3d3d97b3b
7 changed files with 165 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
__version__ = "0.3.2"
__version__ = "0.3.3"
import secrets
import configparser
@@ -218,7 +218,7 @@ elif "Custom" in current_theme and "custom_css" in config["files"]:
try:
css_path = Path(config["files"]["custom_css"])
shutil.copy(css_path, (local_dir / "static" / css_path.name))
log.debug('Loaded custom CSS "{css_path.name}"')
log.debug(f'Loaded custom CSS "{css_path.name}"')
css_file = css_path.name
except FileNotFoundError:
log.error(