Always add config.dark if rendering logo template

This commit is contained in:
Ben Busby 2021-04-06 11:23:14 -04:00
parent 37e22d2945
commit 6c557557e7
No known key found for this signature in database
GPG Key ID: 3B08611DF6E62ED2
3 changed files with 4 additions and 4 deletions

View File

@ -153,7 +153,7 @@ class Filter:
if src.startswith(LOGO_URL):
# Re-brand with Whoogle logo
element.replace_with(BeautifulSoup(render_template('logo.html')))
element.replace_with(BeautifulSoup(render_template('logo.html', dark=self.dark)))
return
elif src.startswith(GOOG_IMG) or GOOG_STATIC in src:
element['src'] = BLANK_B64

View File

@ -128,7 +128,7 @@ def index():
countries=app.config['COUNTRIES'],
logo=render_template(
'logo.html',
config=g.user_config),
dark=g.user_config.dark),
config=g.user_config,
tor_available=int(os.environ.get('TOR_AVAILABLE')),
version_number=app.config['VERSION_NUMBER'])
@ -227,7 +227,7 @@ def search():
search_header=(render_template(
'header.html',
config=g.user_config,
logo=render_template('logo.html'),
logo=render_template('logo.html', dark=g.user_config.dark),
query=urlparse.unquote(query),
search_type=search_util.search_type,
mobile=g.user_request.mobile)

View File

@ -2,7 +2,7 @@
<svg id="Layer_1" class="whoogle-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1028 254">
<style>
path {
fill: {{ 'var(--whoogle-dark-logo)' if config.dark else 'var(--whoogle-logo)' }};
fill: {{ 'var(--whoogle-dark-logo)' if dark else 'var(--whoogle-logo)' }};
}
</style>
<defs>