working nord/whoogle light mode

This commit is contained in:
Alexandar Mechev 2020-10-14 18:53:51 +02:00
parent ab0547ad13
commit eb809a1608
No known key found for this signature in database
GPG Key ID: 1B754EA636091772
3 changed files with 6 additions and 9 deletions

View File

@ -39,12 +39,9 @@ class Filter:
"""
contents = ""
if self.theme:
if self.dark:
theme_file = f'app/static/css/themes/{self.theme}-dark.css'
else:
theme_file = f'app/static/css/themes/{self.theme}-light.css'
theme_file = f'app/static/css/themes/{self.theme}.css'
if os.path.exists(theme_file):
contents = open(f'app/static/css/themes/{self.theme}-dark.css').read()
contents = open(theme_file).read()
return contents
def parse_theme_colors(self):

View File

@ -39,6 +39,6 @@ footer {
}
.reskin {
background-color: #ffffff;
background-color: #ECEFF4;
color: #3B4252;
}

View File

@ -7,8 +7,8 @@
<meta name="referrer" content="no-referrer">
<script type="text/javascript" src="/static/js/autocomplete.js"></script>
{% if theme %}
<link rel="stylesheet" href="/static/css/themes{{ theme }}.css" />
<link rel="stylesheet" href="/static/css/themes{{ theme }}-search.css" />
<link rel="stylesheet" href="/static/css/themes/{{ theme }}.css" />
<link rel="stylesheet" href="/static/css/themes/{{ theme }}-search.css" />
{% else %}
<link rel="stylesheet" href="/static/css/{{ 'dark-' if dark_mode else '' }}theme.css" />
<link rel="stylesheet" href="/static/css/{{ 'search-dark' if dark_mode else 'search-light' }}.css">
@ -22,7 +22,7 @@
</body>
<footer>
<p>
Whoogle Search v{{ dark_mode }} ||
Whoogle Search v{{ version_number }} ||
<a style="color: #685e79" href="https://github.com/benbusby/whoogle-search">View on GitHub</a>
</p>
</footer>