add logged-out chromium instructions for installing PWA

pull/34/head
Aevann1 2022-12-01 01:14:29 +02:00
parent e0bcc71727
commit f5f660efa9
8 changed files with 13 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -32,13 +32,6 @@ def before_request():
g.webview = '; wv) ' in ua
if ' firefox/' in ua:
g.type = 'firefox'
elif 'iphone' in ua or 'ipad' in ua or 'ipod' in ua or 'mac os' in ua:
g.type = 'apple'
else:
g.type = 'chromium'
g.is_tor = request.headers.get("cf-ipcountry") == "T1"
request.path = request.path.rstrip('/')

View File

@ -4,10 +4,21 @@
<div class="ml-3 mt-4">
<b>How to install {{SITE_NAME}}'s mobile app</b>
{% set ua = g.agent.lower() %}
{% if ' firefox/' in ua %}
{% set type = 'firefox' %}
{% elif 'iphone' in ua or 'ipad' in ua or 'ipod' in ua or 'mac os' in ua %}
{% set type = 'apple' %}
{% elif v %}
{% set type = 'chromium' %}
{% else %}
{% set type = 'chromium-lo' %}
{% endif %}
<div class="font-weight-bold mt-4 mb-2">First step:</div>
<img onclick="expandDesktopImage()" alt="First step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{g.type}}-1.webp">
<img onclick="expandDesktopImage()" alt="First step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{type}}-1.webp">
<div class="font-weight-bold mt-4 mb-2">Second step:</div>
<img onclick="expandDesktopImage()" alt="Second step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{g.type}}-2.webp">
<img onclick="expandDesktopImage()" alt="Second step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{type}}-2.webp">
</div>
{% endblock %}