diff --git a/css/styles.css b/css/styles.css index 7598fe5..334e0ab 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1474,4 +1474,26 @@ body.reverse-mode .cat-sort-btn { *::selection { background: transparent; color: inherit; + + /* ── iOS Install Banner ─────────────────────────────────────────── */ +#ios-install-banner { + position: fixed; + bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); + left: 50%; + transform: translateX(-50%); + width: calc(100% - 32px); + max-width: 360px; + background: var(--surface2); + border: 1px solid rgba(245,200,66,0.4); + border-radius: 16px; + padding: 14px 16px 10px; + z-index: 8000; + box-shadow: 0 8px 32px rgba(0,0,0,0.5); + animation: banner-slide-up 0.4s cubic-bezier(.2,.9,.2,1); +} +@keyframes banner-slide-up { + from { opacity:0; transform:translateX(-50%) translateY(20px); } + to { opacity:1; transform:translateX(-50%) translateY(0); } +} + } \ No newline at end of file diff --git a/index.html b/index.html index 82538df..ce6e1fd 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,31 @@ + + + @@ -112,6 +139,43 @@ github.com/mathieuviart/legrandgeoquiz +
+ +
+ + + diff --git a/js/translations.js b/js/translations.js index e19ee26..ba798d2 100644 --- a/js/translations.js +++ b/js/translations.js @@ -173,6 +173,12 @@ var TRANSLATIONS = { presetLandlocked: 'Enclavés', presetIslands: 'Îles seulement', presetFlagGuesser: 'Flag Guesser', + iosInstallTitle: 'Ajouter à l\'écran d\'accueil', + iosInstallBtn: 'Installer l\'app', + iosInstallStep1: 'Appuie sur le bouton Partager en bas de Safari', + iosInstallStep2: 'Puis sélectionne', + iosInstallAdd: '« Sur l\'écran d\'accueil »', + iosInstallNote: 'Profite du jeu hors connexion 🎮', }, en: { @@ -342,6 +348,12 @@ var TRANSLATIONS = { presetLandlocked: 'Landlocked', presetIslands: 'Islands only', presetFlagGuesser: 'Flag Guesser', + iosInstallTitle: 'Add to Home Screen', + iosInstallBtn: 'Install the app', + iosInstallStep1: 'Tap the Share button at the bottom of Safari', + iosInstallStep2: 'Then select', + iosInstallAdd: '"Add to Home Screen"', + iosInstallNote: 'Play offline anytime 🎮', }, ua: { @@ -511,6 +523,13 @@ var TRANSLATIONS = { presetLandlocked: 'Без виходу до моря', presetIslands: 'Лише острови', presetFlagGuesser: 'Вгадай прапор', + iosInstallTitle: 'Додати на головний екран', + iosInstallBtn: 'Встановити додаток', + iosInstallStep1: 'Натисни кнопку Поділитися внизу Safari', + iosInstallStep2: 'Потім обери', + iosInstallAdd: '«На головний екран»', + iosInstallNote: 'Грай офлайн коли завгодно 🎮', + }, de: { @@ -680,6 +699,12 @@ var TRANSLATIONS = { presetLandlocked: 'Binnenstaaten', presetIslands: 'Nur Inseln', presetFlagGuesser: 'Flaggen-Raten', + iosInstallTitle: 'Zum Home-Bildschirm', + iosInstallBtn: 'App installieren', + iosInstallStep1: 'Tippe auf Teilen unten in Safari', + iosInstallStep2: 'Dann wähle', + iosInstallAdd: '„Zum Home-Bildschirm"', + iosInstallNote: 'Spiele jederzeit offline 🎮', }, }; diff --git a/sw.js b/sw.js index d0c090c..91d1ad2 100644 --- a/sw.js +++ b/sw.js @@ -2,7 +2,7 @@ // Stratégie : Cache First pour les assets statiques, Network First pour l'API Daily. // iOS Safari (standalone) nécessite un SW pour fonctionner offline. -var CACHE_NAME = 'geoquiz-v1'; +var CACHE_NAME = 'geoquiz-v2'; // Assets à précacher au moment de l'installation var PRECACHE_URLS = [