From 81f10c7cb8a93682a5e0419edd9401114bd44e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 12 Jul 2022 10:24:10 +0200 Subject: [PATCH] new: config key to display a link to the github page --- config/generic.json.sample | 2 ++ website/web/__init__.py | 4 +++- website/web/templates/index.html | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/generic.json.sample b/config/generic.json.sample index 8d1e3c9..a64c001 100644 --- a/config/generic.json.sample +++ b/config/generic.json.sample @@ -16,6 +16,7 @@ "async_capture_processes": 1, "use_user_agents_users": false, "enable_default_blur_screenshot": false, + "show_project_page": true, "enable_context_by_users": false, "enable_categorization": false, "enable_bookmark": false, @@ -59,6 +60,7 @@ "async_capture_processes": "Number of async_capture processes to start. This should not be higher than the number of splash instances you have running. A very high number will use *a lot* of ram.", "use_user_agents_users": "Only usable for medium/high use instances: use the user agents of the users of the platform", "enable_default_blur_screenshot": "If true, blur the screenshot by default (useful on public instances)", + "show_project_page": "If true, display a ribbon with a link to the githug projects page at the top right side of the screen", "enable_context_by_users": "Allow the users to add context to a response body", "enable_categorization": "Allow the users to add contextualization to a capture", "enable_bookmark": "Allow to bookmark nodes on tree", diff --git a/website/web/__init__.py b/website/web/__init__.py index 0a69802..338a4c1 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -705,7 +705,9 @@ def index_generic(show_hidden: bool=False, show_error: bool=True, category: Opti titles.append((cached.uuid, cached.title, cached.timestamp.isoformat(), cached.url, cached.redirects, cached.incomplete_redirects)) titles = sorted(titles, key=lambda x: (x[2], x[3]), reverse=True) - return render_template('index.html', titles=titles, public_domain=lookyloo.public_domain, version=version) + return render_template('index.html', titles=titles, public_domain=lookyloo.public_domain, + show_project_page=get_config('generic', 'show_project_page'), + version=version) def get_index_params(request): diff --git a/website/web/templates/index.html b/website/web/templates/index.html index f37831c..6348ffd 100644 --- a/website/web/templates/index.html +++ b/website/web/templates/index.html @@ -63,9 +63,11 @@ $(document).ready(function () {
Changelog
(v{{version}})
+ {% if show_project_page %}
Project page
+ {% endif %}