new: Links to project page on capture page

pull/923/head
Raphaël Vinot 2024-06-25 11:37:19 +02:00
parent 79f3916454
commit c794e17122
2 changed files with 24 additions and 2 deletions

View File

@ -1424,7 +1424,8 @@ def search() -> str | Response | WerkzeugResponse:
return render_template('search.html') return render_template('search.html')
def _prepare_capture_template(user_ua: str | None, predefined_url: str | None=None, *, user_config: UserCaptureSettings | None=None) -> str: def _prepare_capture_template(user_ua: str | None, predefined_url: str | None=None, *,
user_config: UserCaptureSettings | None=None) -> str:
return render_template('capture.html', user_agents=user_agents.user_agents, return render_template('capture.html', user_agents=user_agents.user_agents,
default=user_agents.default, default=user_agents.default,
personal_ua=user_ua, personal_ua=user_ua,
@ -1432,6 +1433,8 @@ def _prepare_capture_template(user_ua: str | None, predefined_url: str | None=No
devices=lookyloo.get_playwright_devices(), devices=lookyloo.get_playwright_devices(),
predefined_url_to_capture=predefined_url if predefined_url else '', predefined_url_to_capture=predefined_url if predefined_url else '',
user_config=user_config, user_config=user_config,
show_project_page=get_config('generic', 'show_project_page'),
version=pkg_version,
has_global_proxy=True if lookyloo.global_proxy else False) has_global_proxy=True if lookyloo.global_proxy else False)
@ -1614,7 +1617,8 @@ def capture_web() -> str | Response | WerkzeugResponse:
return redirect(url_for('tree', tree_uuid=perma_uuid)) return redirect(url_for('tree', tree_uuid=perma_uuid))
# render template # render template
return _prepare_capture_template(user_ua=request.headers.get('User-Agent'), user_config=user_config) return _prepare_capture_template(user_ua=request.headers.get('User-Agent'),
user_config=user_config)
@app.route('/simple_capture', methods=['GET', 'POST']) @app.route('/simple_capture', methods=['GET', 'POST'])

View File

@ -20,7 +20,25 @@
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
{% endblock %} {% endblock %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}"
{{get_sri('static', 'index.css')}}
crossorigin="anonymous">
{% endblock %}
{% block content %} {% block content %}
<div class="corner-ribbon top-left sticky white shadow">
<a href="https://www.lookyloo.eu/docs/main/index.html">Documentation</a>
</div>
<div class="corner-ribbon bottom-left sticky white shadow">
<a href="https://github.com/Lookyloo/lookyloo/releases/tag/v{{version}}">Changelog</br>(v{{version}})</a>
</div>
{% if show_project_page %}
<div class="corner-ribbon top-right sticky white shadow">
<a href="https://github.com/Lookyloo">Project page</a>
</div>
{% endif%}
<div class="container"> <div class="container">
<center> <center>
<a href="{{ url_for('index') }}" title="Go back to index"> <a href="{{ url_for('index') }}" title="Go back to index">