Minor opensearch route and description updates

Bumped version to 0.2.1 for next release

Updated image in opensearch template to use base64 image

Updated opensearch route to serve file as attachment
main
Ben Busby 2020-08-15 13:02:17 -06:00
parent b2ecd8dc78
commit 0c0a01b83f
5 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ app.default_key_set = generate_user_keys()
app.no_cookie_ips = [] app.no_cookie_ips = []
app.config['SECRET_KEY'] = os.urandom(32) app.config['SECRET_KEY'] = os.urandom(32)
app.config['SESSION_TYPE'] = 'filesystem' app.config['SESSION_TYPE'] = 'filesystem'
app.config['VERSION_NUMBER'] = '0.2.0' app.config['VERSION_NUMBER'] = '0.2.1'
app.config['APP_ROOT'] = os.getenv('APP_ROOT', os.path.dirname(os.path.abspath(__file__))) app.config['APP_ROOT'] = os.getenv('APP_ROOT', os.path.dirname(os.path.abspath(__file__)))
app.config['STATIC_FOLDER'] = os.getenv('STATIC_FOLDER', os.path.join(app.config['APP_ROOT'], 'static')) app.config['STATIC_FOLDER'] = os.getenv('STATIC_FOLDER', os.path.join(app.config['APP_ROOT'], 'static'))
app.config['CONFIG_PATH'] = os.getenv('CONFIG_VOLUME', os.path.join(app.config['STATIC_FOLDER'], 'config')) app.config['CONFIG_PATH'] = os.getenv('CONFIG_VOLUME', os.path.join(app.config['STATIC_FOLDER'], 'config'))

View File

@ -115,12 +115,11 @@ def opensearch():
if opensearch_url.endswith('/'): if opensearch_url.endswith('/'):
opensearch_url = opensearch_url[:-1] opensearch_url = opensearch_url[:-1]
template = render_template('opensearch.xml', return render_template(
main_url=opensearch_url, 'opensearch.xml',
request_type='get' if g.user_config.get_only else 'post') main_url=opensearch_url,
response = make_response(template) request_type='get' if g.user_config.get_only else 'post'
response.headers['Content-Type'] = 'application/xml' ), 200, {'Content-Disposition': 'attachment; filename="opensearch.xml"'}
return response
@app.route('/autocomplete', methods=['GET', 'POST']) @app.route('/autocomplete', methods=['GET', 'POST'])

View File

@ -16,6 +16,7 @@ body {
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
max-width: 600px; max-width: 600px;
z-index: 15;
} }
.search-items { .search-items {
@ -127,7 +128,7 @@ footer {
bottom: 0%; bottom: 0%;
text-align: center; text-align: center;
width: 100%; width: 100%;
z-index: -1; z-index: 10;
} }
.info-text { .info-text {

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ setuptools.setup(
author='Ben Busby', author='Ben Busby',
author_email='benbusby@protonmail.com', author_email='benbusby@protonmail.com',
name='whoogle-search', name='whoogle-search',
version='0.2.0', version='0.2.1',
include_package_data=True, include_package_data=True,
install_requires=requirements, install_requires=requirements,
description='Self-hosted, ad-free, privacy-respecting Google metasearch engine', description='Self-hosted, ad-free, privacy-respecting Google metasearch engine',