Apply suggestions from code review
Co-authored-by: Ben Busby <benbusby@pm.me>
This commit is contained in:
parent
f606bdfe47
commit
95f12be5e6
|
@ -58,7 +58,7 @@ class Filter:
|
||||||
selector_name = ".reskin-dark"
|
selector_name = ".reskin-dark"
|
||||||
else:
|
else:
|
||||||
selector_name = ".reskin"
|
selector_name = ".reskin"
|
||||||
reskin_selector = [i for i in sheet if i.selectorText==selector_name]
|
reskin_selector = [i for i in sheet if i.selectorText == selector_name]
|
||||||
if len(reskin_selector) == 0:
|
if len(reskin_selector) == 0:
|
||||||
return result
|
return result
|
||||||
for css_prop in reskin_selector[0].style:
|
for css_prop in reskin_selector[0].style:
|
||||||
|
|
|
@ -300,9 +300,9 @@ class Config:
|
||||||
{'name': 'Zimbabwe', 'value': 'countryZW'}
|
{'name': 'Zimbabwe', 'value': 'countryZW'}
|
||||||
]
|
]
|
||||||
|
|
||||||
THEMES = list(set([theme_name.split('.css')[0]
|
THEMES = set([theme_name.split('.css')[0]
|
||||||
for theme_name in os.listdir('app/static/css/themes/')
|
for theme_name in os.listdir('app/static/css/themes/')
|
||||||
if "-search.css" not in theme_name]))
|
if "-search.css" not in theme_name])
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.url = ''
|
self.url = ''
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
.autocomplete-items div {
|
.autocomplete-items div {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #3B4252 !important;
|
color: #3B4252;
|
||||||
background-color: #ECEFF4 !important;
|
background-color: #ECEFF4;
|
||||||
border-bottom: 1px solid #242424;
|
border-bottom: 1px solid #242424;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,4 @@ body.dark * div#search-bar-autocomplete-list div:hover {
|
||||||
.autocomplete-active {
|
.autocomplete-active {
|
||||||
background-color: #685e79 !important;
|
background-color: #685e79 !important;
|
||||||
color: #f9fafb !important;
|
color: #f9fafb !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
.autocomplete-items div {
|
.autocomplete-items div {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #002b36 !important;
|
color: #002b36;
|
||||||
background-color: #eee8d5 !important;
|
background-color: #eee8d5;
|
||||||
border-bottom: 1px solid #242424;
|
border-bottom: 1px solid #242424;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,4 @@ body.dark * div#search-bar-autocomplete-list div:hover {
|
||||||
.autocomplete-active {
|
.autocomplete-active {
|
||||||
background-color: #685e79 !important;
|
background-color: #685e79 !important;
|
||||||
color: #f9fafb !important;
|
color: #f9fafb !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="/static/css/main.css">
|
<link rel="stylesheet" href="/static/css/main.css">
|
||||||
{% if config['theme'] %}
|
{% if config['theme'] %}
|
||||||
|
<link rel="stylesheet" href="/static/css/themes/{{config['theme']}}.css" />
|
||||||
<link rel="stylesheet" href="/static/css/themes/{{config['theme']}}-search.css" />
|
<link rel="stylesheet" href="/static/css/themes/{{config['theme']}}-search.css" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<link rel="stylesheet" href="/static/css/{{ 'dark-' if config['dark'] else '' }}theme.css" />
|
<link rel="stylesheet" href="/static/css/{{ 'dark-' if config['dark'] else '' }}theme.css" />
|
||||||
|
@ -100,7 +101,7 @@
|
||||||
<select name="theme" id="config-theme">
|
<select name="theme" id="config-theme">
|
||||||
{% for theme in themes %}
|
{% for theme in themes %}
|
||||||
<option value="{{ theme }}" {% if theme in config.theme %} selected {% endif %}>
|
<option value="{{ theme }}" {% if theme in config.theme %} selected {% endif %}>
|
||||||
{{ theme }}
|
{{ theme.capitalize() }}
|
||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
@ -152,4 +153,4 @@
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user