Füge Installationshinweis für mobile Geräte hinzu
All checks were successful
Deploy via FTP / deploy (push) Successful in 3s

This commit is contained in:
2026-02-22 12:23:23 +01:00
parent f59a53dbc2
commit 932472cef6
2 changed files with 86 additions and 0 deletions

View File

@@ -60,6 +60,15 @@
</div>
</main>
<div id="install-hint" style="display:none">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="3" width="18" height="18" rx="3"/>
<path d="M9 3v4M15 3v4M3 9h18M9 17l3-3 3 3M12 14v6"/>
</svg>
<span id="install-hint-text"></span>
<button id="install-hint-close" aria-label="Hinweis schließen">×</button>
</div>
<footer id="legal-bar">
<a href="impressum.html">Impressum</a>
<span aria-hidden="true">·</span>
@@ -70,12 +79,37 @@
<script>
(function(){
// Device finger limit hint
var el = document.getElementById('limit-hint');
if(/iPhone/.test(navigator.userAgent)){
el.textContent = 'Auf dem iPhone sind max. 5 Finger möglich (Hardware-Limit).';
} else {
el.textContent = 'Auf diesem Gerät sind mehrere Finger gleichzeitig möglich.';
}
// Install hint — only when not already running as installed app
var isStandalone = window.navigator.standalone === true ||
window.matchMedia('(display-mode: standalone)').matches;
if (isStandalone) return;
if (sessionStorage.getItem('ihd')) return;
var ua = navigator.userAgent;
var hint = document.getElementById('install-hint');
var text = document.getElementById('install-hint-text');
if (/iPhone|iPad|iPod/.test(ua)) {
text.innerHTML = 'Tippe auf <strong>Teilen ↑</strong> → <strong>„Zum HomeBildschirm"</strong> um die App zu installieren.';
} else if (/Android/.test(ua)) {
text.innerHTML = 'Tippe auf <strong>⋮</strong> → <strong>„App installieren"</strong> um die App zum Startbildschirm hinzuzufügen.';
} else {
return;
}
hint.style.display = 'flex';
document.getElementById('install-hint-close').addEventListener('click', function(){
hint.style.display = 'none';
sessionStorage.setItem('ihd', '1');
});
})();
</script>
<script src="js/app.js"></script>