diff --git a/app/models/config.py b/app/models/config.py index 2fb4088..0d4c995 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -1,3 +1,6 @@ +import os + + class Config: # Derived from here: # https://sites.google.com/site/tomihasa/google-language-codes#searchlanguage @@ -297,6 +300,9 @@ class Config: {'name': 'Zimbabwe', 'value': 'countryZW'} ] + THEMES = list(set([theme_name.split('-')[0] + for theme_name in os.listdir('app/static/css/themes/')])) + def __init__(self, **kwargs): self.url = '' self.lang_search = '' @@ -306,6 +312,7 @@ class Config: self.dark = False self.nojs = False self.near = '' + self.theme = None self.alts = False self.new_tab = False self.get_only = False diff --git a/app/templates/index.html b/app/templates/index.html index 4980316..ee88539 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,137 +1,149 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - {% if config.dark %} - - {% endif %} -