Update index.html
Browse files2 unmodified lines3456789101112131415161718192021222324252627282930312 unmodified lines343536373839407 unmodified lines484950515253545556575859606162636465666768696 unmodified lines76777879808182835 unmodified lines89909192939495969798991006 unmodified lines1071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391402 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title> Чайхана Эмир</title><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="style.css"><link rel="apple-touch-icon" href="/icon.png"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><link rel="icon" type="image/png" sizes="192x192" href="/icon.png"><!-- Добавление фавикона --><link rel="icon" href="icon.png" type="image/png"><!-- Добавленный мета тег для проверки Google --><meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" /><!-- Мета описание для SEO --><meta name="description" content="Восточная , Европейская , Уйгурская кухни!."><style>/* Общие стили (можно оставить пустым, если используете style.css) */</style></head><body><iframesrc="https://kgmenu-example.hf.space/"frameborder="0"2 unmodified lines<button id="installButton">Установить приложение</button><button id="iosInstallPrompt">Установить приложение</button><!-- Модальное окно для iOS --><div id="iosInstallModal"><div class="modal-content"><h2>Установите приложение ZZIRIX</h2>7 unmodified lines</div></div><!-- Модальное окно для увеличения изображения --><div id="imageZoomModal"><span id="closeZoomModal">×</span><img id="zoomedImage" src="" alt="Увеличенное изображение"></div><script>let deferredPrompt;const installButton = document.getElementById('installButton');const iosInstallPrompt = document.getElementById('iosInstallPrompt');const iosInstallModal = document.getElementById('iosInstallModal');const closeIosModal = document.getElementById('closeIosModal');const openZoomModal = document.getElementById('openZoomModal'); // Добавленоconst imageZoomModal = document.getElementById('imageZoomModal'); // Добавленоconst closeZoomModal = document.getElementById('closeZoomModal'); // Добавленоconst zoomedImage = document.getElementById('zoomedImage'); // Добавленоfunction isIos() {return /iphone|ipad|ipod/i.test(navigator.userAgent);6 unmodified lineswindow.addEventListener('beforeinstallprompt', (event) => {event.preventDefault();deferredPrompt = event;installButton.style.display = 'block';installButton.classList.add('pulse-animation');installButton.addEventListener('click', async () => {deferredPrompt.prompt();5 unmodified lines}deferredPrompt = null;installButton.style.display = 'none';installButton.classList.remove('pulse-animation');});});if (isIos() && !isInStandaloneMode()) {iosInstallPrompt.style.display = 'block';installButton.style.display = 'none';iosInstallPrompt.classList.add('pulse-animation');6 unmodified linesiosInstallModal.style.display = 'none';});// Открытие модального окна с увеличенным изображениемopenZoomModal.addEventListener('click', (event) => {event.preventDefault(); // Предотвращаем переход по ссылкеzoomedImage.src = 'https://huggingface.co/spaces/Morshen/alpha/resolve/main/pwa_ios.png'; // Устанавливаем srcimageZoomModal.style.display = 'block';});// Закрытие модального окна с увеличенным изображениемcloseZoomModal.addEventListener('click', () => {imageZoomModal.style.display = 'none';});} else {installButton.style.display = deferredPrompt ? 'block' : 'none';iosInstallPrompt.style.display = 'none';if (deferredPrompt) {installButton.classList.add('pulse-animation');}}// При загрузке страницы:if (isIos() && !isInStandaloneMode() && localStorage.getItem('iosInstallPromptShown') === 'true') {setTimeout(() => {iosInstallModal.style.display = 'block';}, 5000); // 5 секунд}if ('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/service-worker.js')2 unmodified lines345678910111213141516171819202 unmodified lines2324252627287 unmodified lines3637383940414243444546474849505152535455566 unmodified lines63646566676869705 unmodified lines7677787980818283848586876 unmodified lines9495969798991001011021031041051061071081091101111121131141151161171181191201211222 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Чайхана Эмир</title><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="style.css"><link rel="apple-touch-icon" href="/icon.png"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><link rel="icon" type="image/png" sizes="192x192" href="/icon.png"><link rel="icon" href="icon.png" type="image/png"><meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" /><meta name="description" content="Восточная, Европейская, Уйгурская кухни!"></head><body><iframesrc="https://kgmenu-example.hf.space/"frameborder="0"2 unmodified lines<button id="installButton">Установить приложение</button><button id="iosInstallPrompt">Установить приложение</button><div id="iosInstallModal"><div class="modal-content"><h2>Установите приложение ZZIRIX</h2>7 unmodified lines</div></div><div id="imageZoomModal"><span id="closeZoomModal">×</span><img id="zoomedImage" src="" alt="Увеличенное изображение"></div><script>let deferredPrompt;const installButton = document.getElementById('installButton');const iosInstallPrompt = document.getElementById('iosInstallPrompt');const iosInstallModal = document.getElementById('iosInstallModal');const closeIosModal = document.getElementById('closeIosModal');const openZoomModal = document.getElementById('openZoomModal');const imageZoomModal = document.getElementById('imageZoomModal');const closeZoomModal = document.getElementById('closeZoomModal');const zoomedImage = document.getElementById('zoomedImage');function isIos() {return /iphone|ipad|ipod/i.test(navigator.userAgent);6 unmodified lineswindow.addEventListener('beforeinstallprompt', (event) => {event.preventDefault();deferredPrompt = event;installButton.style.display = 'block';installButton.classList.add('pulse-animation');installButton.addEventListener('click', async () => {deferredPrompt.prompt();5 unmodified lines}deferredPrompt = null;installButton.style.display = 'none';installButton.classList.remove('pulse-animation');});});if (isIos() && !isInStandaloneMode()) {iosInstallPrompt.style.display = 'block';installButton.style.display = 'none';iosInstallPrompt.classList.add('pulse-animation');6 unmodified linesiosInstallModal.style.display = 'none';});openZoomModal.addEventListener('click', (event) => {event.preventDefault();zoomedImage.src = 'https://huggingface.co/spaces/Morshen/alpha/resolve/main/pwa_ios.png';imageZoomModal.style.display = 'block';});closeZoomModal.addEventListener('click', () => {imageZoomModal.style.display = 'none';});} else {installButton.style.display = deferredPrompt ? 'block' : 'none';iosInstallPrompt.style.display = 'none';if (deferredPrompt) {installButton.classList.add('pulse-animation');}}if (isIos() && !isInStandaloneMode() && localStorage.getItem('iosInstallPromptShown') === 'true') {setTimeout(() => {iosInstallModal.style.display = 'block';}, 5000);}if ('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/service-worker.js')
index.html+18-36