Update index.html
Browse files15 unmodified lines1617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401414 unmodified lines1461471481491501511521531541551561573 unmodified lines16116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021115 unmodified lines<!-- Добавленный мета тег для проверки Google --><meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" /><!-- Мета описание для SEO --><meta name="description" content=" создание приложений, сайтов, искусственный интеллект для бизнеса Алматы и Бишкек ."><style>/* Общие стили */body {padding: 0;font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;margin: 0;overflow: hidden; /* Предотвращает полосы прокрутки */}h1 {font-size: 1.2rem;margin-top: 0;}p {color: rgb(107, 114, 128);font-size: 0.9rem;margin-bottom: 0.5rem;margin-top: 0.25rem;}.card {max-width: 100%;margin: 0 auto;padding: 0.5rem;border: 1px solid lightgray;border-radius: 0.5rem;}.card p:last-child {margin-bottom: 0;}/* Адаптивные стили */@media (min-width: 640px) {body {padding: 0;}h1 {font-size: 1.6rem;}p {font-size: 1rem;}.card {max-width: 620px;padding: 1rem;border-radius: 1rem;}}/* Стили для iframe */iframe {position: fixed;top: 0;left: 0;width: 100%;height: 100%;border: none;margin: 0;padding: 0;}/* Стили для кнопок установки */#installButton, #iosInstallPrompt {display: none;position: fixed;bottom: 20px;left: 50%;transform: translateX(-50%);padding: 12px 20px;background-color: #007bff;color: white;border: none;border-radius: 5px;cursor: pointer;z-index: 1000;font-size: 16px;text-transform: uppercase;letter-spacing: 1px;box-shadow: 0 0 10px #007bff;transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;}/* Hover эффект с усилением свечения и небольшим подъемом */#installButton:hover, #iosInstallPrompt:hover {box-shadow: 0 0 20px #007bff, 0 0 30px #007bff;transform: translateX(-50%) scale(1.05); /* Небольшое увеличение */}/* Дополнительный эффект пульсации с использованием keyframes */@keyframes pulse {0% {box-shadow: 0 0 10px #007bff;}50% {box-shadow: 0 0 20px #007bff, 0 0 30px #007bff;}100% {box-shadow: 0 0 10px #007bff;}}/* Применение анимации к кнопке */#installButton.pulse-animation, #iosInstallPrompt.pulse-animation {animation: pulse 2s infinite;}#iosInstallPrompt {background-color: #28a745;box-shadow: 0 0 10px #28a745;}#iosInstallPrompt:hover {box-shadow: 0 0 20px #28a745, 0 0 30px #28a745;}</style></head><body>4 unmodified linesallowfullscreen></iframe><button id="installButton">Установить приложение</button><button id="iosInstallPrompt">Установить приложение </button><script>let deferredPrompt;const installButton = document.getElementById('installButton');const iosInstallPrompt = document.getElementById('iosInstallPrompt');function isIos() {return /iphone|ipad|ipod/i.test(navigator.userAgent);3 unmodified linesreturn window.matchMedia('(display-mode: standalone)').matches || window.navigator.standalone;}if (isIos() && !isInStandaloneMode()) {iosInstallPrompt.style.display = 'block';installButton.style.display = 'none';iosInstallPrompt.classList.add('pulse-animation');iosInstallPrompt.addEventListener('click', () => {alert("1. Нажмите кнопку 'Поделиться' (иконка внизу Safari).\n2. Нажмите 'Добавить на экран Домой'.\n3. Подтвердите установку.");});} else {installButton.style.display = deferredPrompt ? 'block' : 'none';iosInstallPrompt.style.display = 'none';if (deferredPrompt) {installButton.classList.add('pulse-animation');}}window.addEventListener('beforeinstallprompt', (event) => {event.preventDefault();deferredPrompt = event;installButton.style.display = 'block';installButton.addEventListener('click', async () => {deferredPrompt.prompt();const { outcome } = await deferredPrompt.userChoice;if (outcome === 'accepted') {console.log('Пользователь принял запрос на установку');} else {console.log('Пользователь отклонил запрос на установку');}deferredPrompt = null;installButton.style.display = 'none';installButton.classList.remove('pulse-animation'); // Удаляем класс после установки});});if ('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/service-worker.js').then((registration) => {console.log('Сервисный рабочий процесс зарегистрирован:', registration);}).catch((error) => {console.log('Ошибка регистрации сервисного рабочего процесса:', error);});});}</script></body></html>15 unmodified lines1617181920212223242526274 unmodified lines32333435363738394041424344454647484950515253545556573 unmodified lines61626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512615 unmodified lines<!-- Добавленный мета тег для проверки Google --><meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" /><!-- Мета описание для SEO --><meta name="description" content=" создание приложений, сайтов, искусственный интеллект для бизнеса Алматы и Бишкек ."><style>/* Общие стили (можно оставить пустым, если используете style.css) */</style></head><body>4 unmodified linesallowfullscreen></iframe><button id="installButton">Установить приложение</button><button id="iosInstallPrompt">Установить приложение</button><!-- Модальное окно для iOS --><div id="iosInstallModal"><div class="modal-content"><h2>Установите приложение Morshen Alpha</h2><img src="https://huggingface.co/spaces/Morshen/alpha/resolve/main/pwa_ios.png" alt="Инструкция по установке PWA на iOS"><p>1. Нажмите кнопку "Поделиться" внизу Safari.</p><p>2. Выберите "На экран «Домой»".</p><p>3. Подтвердите установку.</p><button id="closeIosModal">Закрыть</button></div></div><script>let deferredPrompt;const installButton = document.getElementById('installButton');const iosInstallPrompt = document.getElementById('iosInstallPrompt');const iosInstallModal = document.getElementById('iosInstallModal');const closeIosModal = document.getElementById('closeIosModal');function isIos() {return /iphone|ipad|ipod/i.test(navigator.userAgent);3 unmodified linesreturn window.matchMedia('(display-mode: standalone)').matches || window.navigator.standalone;}window.addEventListener('beforeinstallprompt', (event) => {event.preventDefault();deferredPrompt = event;installButton.style.display = 'block';installButton.classList.add('pulse-animation');installButton.addEventListener('click', async () => {deferredPrompt.prompt();const { outcome } = await deferredPrompt.userChoice;if (outcome === 'accepted') {console.log('Пользователь принял запрос на установку');} else {console.log('Пользователь отклонил запрос на установку');}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');iosInstallPrompt.addEventListener('click', () => {iosInstallModal.style.display = 'block';localStorage.setItem('iosInstallPromptShown', 'true');});closeIosModal.addEventListener('click', () => {iosInstallModal.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').then((registration) => {console.log('Сервисный рабочий процесс зарегистрирован:', registration);}).catch((error) => {console.log('Ошибка регистрации сервисного рабочего процесса:', error);});});}</script></body></html>
index.html+68-153