-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added local theme cookie, to be compatible with cdn and local deployment.
- Loading branch information
Showing
6 changed files
with
12 additions
and
11,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,8 @@ def _get_themes(static_dir, is_local): | |
with open(bootswatch_cfg_file, 'r') as f: | ||
bootswatch_cfg = json.load(f) | ||
cdn_prefix = r'https://cdn.jsdelivr.net/npm/[email protected]/' | ||
themes = {theme['name']: theme['cssCdn'].replace(cdn_prefix, 'plugins/bootswatch/') for theme in bootswatch_cfg['themes']} | ||
themes = {theme['name']: theme['cssCdn'].replace(cdn_prefix, 'plugins/bootswatch/') | ||
for theme in bootswatch_cfg['themes']} | ||
else: | ||
bootswatch_cfg_obj = requests.get('https://bootswatch.com/api/5.json') | ||
themes = {theme['name']: theme['cssCdn'] for theme in json.loads(bootswatch_cfg_obj.text)['themes']} | ||
|
@@ -68,10 +69,10 @@ class Config: | |
SYS_MEDIA_EXCLUDES = 'public,private' | ||
SYS_REGISTER = False | ||
SYS_MARIADB = True | ||
SYS_LOCAL_DEPLOY = True | ||
SYS_LOCAL_DEPLOY = False | ||
SYS_THEMES = _get_themes(SYS_STATIC, SYS_LOCAL_DEPLOY) | ||
SYS_THEME_DAY = SYS_THEMES.get('United') | ||
SYS_THEME_NIGHT = SYS_THEMES.get('Darkly') | ||
SYS_THEME_DAY = 'United' | ||
SYS_THEME_NIGHT = 'Darkly' | ||
|
||
# BLUEMAP | ||
AUTH_URL_PREFIX = '/auth' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.