Merge pull request #634 from not-my-profile/powered-by

Introduce `categories_as_tabs` & group engines in tabs
This commit is contained in:
Alexandre Flament 2022-01-06 09:22:02 +01:00 committed by GitHub
commit aedd6279b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 247 additions and 105 deletions

View file

@ -20,18 +20,18 @@ OUTPUT_FORMATS = ['html', 'csv', 'json', 'rss']
LANGUAGE_CODES = ['all'] + list(l[0] for l in languages)
OSCAR_STYLE = ('logicodev', 'logicodev-dark', 'pointhi')
SIMPLE_STYLE = ('auto', 'light', 'dark')
CATEGORY_ORDER = [
'general',
'images',
'videos',
'news',
'map',
'music',
'it',
'science',
'files',
'social media',
]
CATEGORIES_AS_TABS = {
'general': {},
'images': {},
'videos': {},
'news': {},
'map': {},
'music': {},
'it': {},
'science': {},
'files': {},
'social media': {},
}
STR_TO_BOOL = {
'0': False,
'false': False,
@ -182,7 +182,6 @@ SCHEMA = {
'results_on_new_tab': SettingsValue(bool, False),
'advanced_search': SettingsValue(bool, False),
'query_in_title': SettingsValue(bool, False),
'categories_order': SettingsValue(list, CATEGORY_ORDER),
},
'preferences': {
'lock': SettingsValue(list, []),
@ -213,6 +212,7 @@ SCHEMA = {
'checker': {
'off_when_debug': SettingsValue(bool, True),
},
'categories_as_tabs': SettingsValue(dict, CATEGORIES_AS_TABS),
'engines': SettingsValue(list, []),
'doi_resolvers': {},
}