Add PWA manifest, service worker, and install hint.
Enables home-screen installation with per-viewer scope and platform-specific guidance in EN/DE. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<link rel="manifest" href="{{ manifest_href }}">
|
||||
<meta name="theme-color" content="#1a1d27">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="apple-touch-icon" href="/static/icon-192.png">
|
||||
<script src="/static/pwa.js" defer></script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<div id="pwa-install-hint" class="pwa-hint" hidden>
|
||||
<div class="pwa-hint-text">
|
||||
<strong data-i18n="pwa.hintTitle">Install as app</strong>
|
||||
<p id="pwa-hint-body" data-i18n="pwa.hintBody">Add this viewer to your home screen for quick access.</p>
|
||||
</div>
|
||||
<div class="pwa-hint-actions">
|
||||
<button type="button" id="pwa-install-btn" class="viewer-copy-btn" hidden data-i18n="pwa.install">Install</button>
|
||||
<button type="button" id="pwa-hint-dismiss" class="import-report-dismiss" data-i18n-title="actions.dismiss" title="Dismiss">×</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,6 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Idle Fantasy Viewer</title>
|
||||
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
|
||||
{% include '_pwa_head.html' %}
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
{% include '_analytics.html' %}
|
||||
<script src="/static/vendor/chart.umd.min.js" defer></script>
|
||||
@@ -33,6 +34,7 @@
|
||||
<button class="nav-btn" data-tab="backup" data-i18n="nav.backup">Backup</button>
|
||||
</nav>
|
||||
<div class="sidebar-footer">
|
||||
{% include '_pwa_hint.html' %}
|
||||
<label class="lang-label" for="locale-select">
|
||||
<span data-i18n="settings.language">Language</span>
|
||||
<select id="locale-select" class="select-input lang-select">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Idle Fantasy Viewer</title>
|
||||
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
|
||||
{% include '_pwa_head.html' %}
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
{% include '_analytics.html' %}
|
||||
<script src="/static/i18n.js" defer></script>
|
||||
@@ -41,6 +42,8 @@
|
||||
<p class="landing-hint" id="create-status" hidden></p>
|
||||
</div>
|
||||
|
||||
{% include '_pwa_hint.html' %}
|
||||
|
||||
<div class="landing-warning">
|
||||
<strong data-i18n="viewer.warningTitle">Important</strong>
|
||||
<p data-i18n="viewer.warningBody">
|
||||
|
||||
Reference in New Issue
Block a user