Kgshop commited on
Commit
7731cce
·
verified ·
1 Parent(s): 23f660d

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +18 -36
index.html CHANGED
@@ -3,29 +3,18 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title> Чайхана Эмир</title>
7
  <link rel="manifest" href="/manifest.json">
8
  <link rel="stylesheet" href="style.css">
9
  <link rel="apple-touch-icon" href="/icon.png">
10
  <meta name="apple-mobile-web-app-capable" content="yes">
11
  <meta name="apple-mobile-web-app-status-bar-style" content="default">
12
  <link rel="icon" type="image/png" sizes="192x192" href="/icon.png">
13
-
14
- <!-- Добавление фавикона -->
15
  <link rel="icon" href="icon.png" type="image/png">
16
-
17
- <!-- Добавленный мета тег для проверки Google -->
18
  <meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" />
19
-
20
- <!-- Мета описание для SEO -->
21
- <meta name="description" content="Восточная , Европейская , Уйгурская кухни!.">
22
-
23
- <style>
24
- /* Общие стили (можно оставить пустым, если используете style.css) */
25
- </style>
26
  </head>
27
  <body>
28
-
29
  <iframe
30
  src="https://kgmenu-example.hf.space/"
31
  frameborder="0"
@@ -34,7 +23,6 @@
34
  <button id="installButton">Установить приложение</button>
35
  <button id="iosInstallPrompt">Установить приложение</button>
36
 
37
- <!-- Модальное окно для iOS -->
38
  <div id="iosInstallModal">
39
  <div class="modal-content">
40
  <h2>Установите приложение ZZIRIX</h2>
@@ -48,22 +36,21 @@
48
  </div>
49
  </div>
50
 
51
- <!-- Модальное окно для увеличения изображения -->
52
  <div id="imageZoomModal">
53
- <span id="closeZoomModal">×</span>
54
- <img id="zoomedImage" src="" alt="Увеличенное изображение">
55
  </div>
56
 
57
  <script>
58
- let deferredPrompt;
59
  const installButton = document.getElementById('installButton');
60
  const iosInstallPrompt = document.getElementById('iosInstallPrompt');
61
  const iosInstallModal = document.getElementById('iosInstallModal');
62
  const closeIosModal = document.getElementById('closeIosModal');
63
- const openZoomModal = document.getElementById('openZoomModal'); // Добавлено
64
- const imageZoomModal = document.getElementById('imageZoomModal'); // Добавлено
65
- const closeZoomModal = document.getElementById('closeZoomModal'); // Добавлено
66
- const zoomedImage = document.getElementById('zoomedImage'); // Добавлено
67
 
68
  function isIos() {
69
  return /iphone|ipad|ipod/i.test(navigator.userAgent);
@@ -76,8 +63,8 @@
76
  window.addEventListener('beforeinstallprompt', (event) => {
77
  event.preventDefault();
78
  deferredPrompt = event;
79
- installButton.style.display = 'block';
80
- installButton.classList.add('pulse-animation');
81
 
82
  installButton.addEventListener('click', async () => {
83
  deferredPrompt.prompt();
@@ -89,12 +76,12 @@
89
  }
90
  deferredPrompt = null;
91
  installButton.style.display = 'none';
92
- installButton.classList.remove('pulse-animation');
93
  });
94
  });
95
 
96
  if (isIos() && !isInStandaloneMode()) {
97
- iosInstallPrompt.style.display = 'block';
98
  installButton.style.display = 'none';
99
  iosInstallPrompt.classList.add('pulse-animation');
100
 
@@ -107,34 +94,29 @@
107
  iosInstallModal.style.display = 'none';
108
  });
109
 
110
- // Открытие модального окна с увеличенным изображением
111
  openZoomModal.addEventListener('click', (event) => {
112
- event.preventDefault(); // Предотвращаем переход по ссылке
113
- zoomedImage.src = 'https://huggingface.co/spaces/Morshen/alpha/resolve/main/pwa_ios.png'; // Устанавливаем src
114
  imageZoomModal.style.display = 'block';
115
  });
116
 
117
- // Закрытие модального окна с увеличенным изображением
118
  closeZoomModal.addEventListener('click', () => {
119
  imageZoomModal.style.display = 'none';
120
  });
121
-
122
  } else {
123
  installButton.style.display = deferredPrompt ? 'block' : 'none';
124
  iosInstallPrompt.style.display = 'none';
125
  if (deferredPrompt) {
126
  installButton.classList.add('pulse-animation');
127
- }
128
  }
129
- // При загрузке страницы:
130
  if (isIos() && !isInStandaloneMode() && localStorage.getItem('iosInstallPromptShown') === 'true') {
131
  setTimeout(() => {
132
  iosInstallModal.style.display = 'block';
133
- }, 5000); // 5 секунд
134
  }
135
 
136
-
137
-
138
  if ('serviceWorker' in navigator) {
139
  window.addEventListener('load', () => {
140
  navigator.serviceWorker.register('/service-worker.js')
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Чайхана Эмир</title>
7
  <link rel="manifest" href="/manifest.json">
8
  <link rel="stylesheet" href="style.css">
9
  <link rel="apple-touch-icon" href="/icon.png">
10
  <meta name="apple-mobile-web-app-capable" content="yes">
11
  <meta name="apple-mobile-web-app-status-bar-style" content="default">
12
  <link rel="icon" type="image/png" sizes="192x192" href="/icon.png">
 
 
13
  <link rel="icon" href="icon.png" type="image/png">
 
 
14
  <meta name="google-site-verification" content="V6EqDTA9Oj9V1OfNbnBHj5RKrdcXlABD8tqfEFVUHJY" />
15
+ <meta name="description" content="Восточная, Европейская, Уйгурская кухни!">
 
 
 
 
 
 
16
  </head>
17
  <body>
 
18
  <iframe
19
  src="https://kgmenu-example.hf.space/"
20
  frameborder="0"
 
23
  <button id="installButton">Установить приложение</button>
24
  <button id="iosInstallPrompt">Установить приложение</button>
25
 
 
26
  <div id="iosInstallModal">
27
  <div class="modal-content">
28
  <h2>Установите приложение ZZIRIX</h2>
 
36
  </div>
37
  </div>
38
 
 
39
  <div id="imageZoomModal">
40
+ <span id="closeZoomModal">×</span>
41
+ <img id="zoomedImage" src="" alt="Увеличенное изображение">
42
  </div>
43
 
44
  <script>
45
+ let deferredPrompt;
46
  const installButton = document.getElementById('installButton');
47
  const iosInstallPrompt = document.getElementById('iosInstallPrompt');
48
  const iosInstallModal = document.getElementById('iosInstallModal');
49
  const closeIosModal = document.getElementById('closeIosModal');
50
+ const openZoomModal = document.getElementById('openZoomModal');
51
+ const imageZoomModal = document.getElementById('imageZoomModal');
52
+ const closeZoomModal = document.getElementById('closeZoomModal');
53
+ const zoomedImage = document.getElementById('zoomedImage');
54
 
55
  function isIos() {
56
  return /iphone|ipad|ipod/i.test(navigator.userAgent);
 
63
  window.addEventListener('beforeinstallprompt', (event) => {
64
  event.preventDefault();
65
  deferredPrompt = event;
66
+ installButton.style.display = 'block';
67
+ installButton.classList.add('pulse-animation');
68
 
69
  installButton.addEventListener('click', async () => {
70
  deferredPrompt.prompt();
 
76
  }
77
  deferredPrompt = null;
78
  installButton.style.display = 'none';
79
+ installButton.classList.remove('pulse-animation');
80
  });
81
  });
82
 
83
  if (isIos() && !isInStandaloneMode()) {
84
+ iosInstallPrompt.style.display = 'block';
85
  installButton.style.display = 'none';
86
  iosInstallPrompt.classList.add('pulse-animation');
87
 
 
94
  iosInstallModal.style.display = 'none';
95
  });
96
 
 
97
  openZoomModal.addEventListener('click', (event) => {
98
+ event.preventDefault();
99
+ zoomedImage.src = 'https://huggingface.co/spaces/Morshen/alpha/resolve/main/pwa_ios.png';
100
  imageZoomModal.style.display = 'block';
101
  });
102
 
 
103
  closeZoomModal.addEventListener('click', () => {
104
  imageZoomModal.style.display = 'none';
105
  });
 
106
  } else {
107
  installButton.style.display = deferredPrompt ? 'block' : 'none';
108
  iosInstallPrompt.style.display = 'none';
109
  if (deferredPrompt) {
110
  installButton.classList.add('pulse-animation');
111
+ }
112
  }
113
+
114
  if (isIos() && !isInStandaloneMode() && localStorage.getItem('iosInstallPromptShown') === 'true') {
115
  setTimeout(() => {
116
  iosInstallModal.style.display = 'block';
117
+ }, 5000);
118
  }
119
 
 
 
120
  if ('serviceWorker' in navigator) {
121
  window.addEventListener('load', () => {
122
  navigator.serviceWorker.register('/service-worker.js')