diff --git a/app/filter.py b/app/filter.py index e93c91b..8f457f3 100644 --- a/app/filter.py +++ b/app/filter.py @@ -3,6 +3,7 @@ from app.utils.results import * from bs4 import BeautifulSoup from bs4.element import ResultSet, Tag from cryptography.fernet import Fernet +from flask import render_template import re import urllib.parse as urlparse from urllib.parse import parse_qs @@ -152,8 +153,7 @@ class Filter: if src.startswith(LOGO_URL): # Re-brand with Whoogle logo - element['src'] = 'static/img/logo.png' - element['style'] = 'height:40px;width:162px' + element.replace_with(BeautifulSoup(render_template('logo.html'))) return elif src.startswith(GOOG_IMG) or GOOG_STATIC in src: element['src'] = BLANK_B64 diff --git a/app/routes.py b/app/routes.py index 4fae8eb..4ec4453 100644 --- a/app/routes.py +++ b/app/routes.py @@ -126,6 +126,7 @@ def index(): return render_template('index.html', languages=app.config['LANGUAGES'], countries=app.config['COUNTRIES'], + logo=render_template('logo.html'), config=g.user_config, tor_available=int(os.environ.get('TOR_AVAILABLE')), version_number=app.config['VERSION_NUMBER']) @@ -224,6 +225,7 @@ def search(): search_header=(render_template( 'header.html', config=g.user_config, + logo=render_template('logo.html'), query=urlparse.unquote(query), search_type=search_util.search_type, mobile=g.user_request.mobile) diff --git a/app/templates/header.html b/app/templates/header.html index 121ffc3..5973274 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -4,8 +4,10 @@
@@ -26,7 +28,9 @@
diff --git a/app/templates/index.html b/app/templates/index.html index 081c66c..8deb0a7 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -36,31 +36,7 @@
- - - - - - - - - - - - - - - - - - + {{ logo|safe }}
diff --git a/app/templates/logo.html b/app/templates/logo.html new file mode 100644 index 0000000..11c1d23 --- /dev/null +++ b/app/templates/logo.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file