openfree commited on
Commit
c2cb624
โ€ข
1 Parent(s): ca6a55e

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +382 -19
index.html CHANGED
@@ -1,19 +1,382 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="ko">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
6
+ <title>LoveCall Pro</title>
7
+ <link rel="manifest" href="manifest.json">
8
+ <meta name="theme-color" content="#ff4757">
9
+ <style>
10
+ :root {
11
+ --primary: #ff4757;
12
+ --accent: #2ed573;
13
+ --dark: #2f3542;
14
+ --light: #f1f2f6;
15
+ }
16
+
17
+ * {
18
+ margin: 0;
19
+ padding: 0;
20
+ box-sizing: border-box;
21
+ -webkit-tap-highlight-color: transparent;
22
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
23
+ }
24
+
25
+ body {
26
+ background: var(--light);
27
+ height: 100vh;
28
+ overflow-x: hidden;
29
+ }
30
+
31
+ .app-container {
32
+ max-width: 100%;
33
+ margin: 0 auto;
34
+ background: white;
35
+ min-height: 100vh;
36
+ position: relative;
37
+ }
38
+
39
+ .header {
40
+ background: var(--primary);
41
+ padding: 20px;
42
+ color: white;
43
+ text-align: center;
44
+ position: sticky;
45
+ top: 0;
46
+ z-index: 100;
47
+ }
48
+
49
+ .status-bar {
50
+ background: rgba(255,255,255,0.2);
51
+ padding: 8px;
52
+ border-radius: 20px;
53
+ margin-top: 10px;
54
+ font-size: 0.9em;
55
+ }
56
+
57
+ .main-section {
58
+ padding: 20px;
59
+ }
60
+
61
+ .contact-card {
62
+ background: white;
63
+ border-radius: 15px;
64
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
65
+ padding: 20px;
66
+ margin-bottom: 20px;
67
+ position: relative;
68
+ }
69
+
70
+ .contact-header {
71
+ display: flex;
72
+ align-items: center;
73
+ gap: 15px;
74
+ }
75
+
76
+ .contact-avatar {
77
+ width: 60px;
78
+ height: 60px;
79
+ background: var(--primary);
80
+ border-radius: 50%;
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ font-size: 24px;
85
+ color: white;
86
+ }
87
+
88
+ .emergency-trigger {
89
+ width: 200px;
90
+ height: 200px;
91
+ margin: 30px auto;
92
+ position: relative;
93
+ }
94
+
95
+ .trigger-outer {
96
+ width: 100%;
97
+ height: 100%;
98
+ background: var(--primary);
99
+ border-radius: 50%;
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ animation: pulse 2s infinite;
104
+ }
105
+
106
+ .trigger-inner {
107
+ width: 90%;
108
+ height: 90%;
109
+ background: white;
110
+ border-radius: 50%;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ flex-direction: column;
115
+ }
116
+
117
+ .setup-section {
118
+ padding: 20px;
119
+ background: var(--light);
120
+ border-radius: 15px;
121
+ margin-top: 20px;
122
+ }
123
+
124
+ .setup-step {
125
+ margin-bottom: 15px;
126
+ padding: 15px;
127
+ background: white;
128
+ border-radius: 10px;
129
+ box-shadow: 0 2px 8px rgba(0,0,0,0.05);
130
+ }
131
+
132
+ .button {
133
+ padding: 15px 30px;
134
+ border: none;
135
+ border-radius: 25px;
136
+ background: var(--primary);
137
+ color: white;
138
+ font-size: 16px;
139
+ font-weight: bold;
140
+ cursor: pointer;
141
+ transition: transform 0.2s;
142
+ width: 100%;
143
+ margin-top: 10px;
144
+ }
145
+
146
+ .button:active {
147
+ transform: scale(0.98);
148
+ }
149
+
150
+ .permission-alert {
151
+ background: #fff3cd;
152
+ border: 1px solid #ffeeba;
153
+ color: #856404;
154
+ padding: 15px;
155
+ border-radius: 10px;
156
+ margin: 20px 0;
157
+ }
158
+
159
+ .status-indicator {
160
+ display: inline-block;
161
+ width: 12px;
162
+ height: 12px;
163
+ border-radius: 50%;
164
+ margin-right: 8px;
165
+ }
166
+
167
+ .status-active {
168
+ background: var(--accent);
169
+ box-shadow: 0 0 0 rgba(46, 213, 115, 0.4);
170
+ animation: pulse-green 2s infinite;
171
+ }
172
+
173
+ @keyframes pulse {
174
+ 0% {
175
+ box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
176
+ }
177
+ 70% {
178
+ box-shadow: 0 0 0 20px rgba(255, 71, 87, 0);
179
+ }
180
+ 100% {
181
+ box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
182
+ }
183
+ }
184
+
185
+ @keyframes pulse-green {
186
+ 0% {
187
+ box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.4);
188
+ }
189
+ 70% {
190
+ box-shadow: 0 0 0 10px rgba(46, 213, 115, 0);
191
+ }
192
+ 100% {
193
+ box-shadow: 0 0 0 0 rgba(46, 213, 115, 0);
194
+ }
195
+ }
196
+
197
+ #volumeIndicator {
198
+ position: fixed;
199
+ top: 50%;
200
+ left: 50%;
201
+ transform: translate(-50%, -50%);
202
+ background: rgba(0,0,0,0.8);
203
+ color: white;
204
+ padding: 20px;
205
+ border-radius: 10px;
206
+ display: none;
207
+ z-index: 1000;
208
+ }
209
+
210
+ .subscription-info {
211
+ margin-top: 20px;
212
+ padding: 15px;
213
+ background: #e8f5e9;
214
+ border-radius: 10px;
215
+ font-size: 0.9em;
216
+ color: #2e7d32;
217
+ }
218
+ </style>
219
+ </head>
220
+ <body>
221
+ <div class="app-container">
222
+ <div class="header">
223
+ <h1>LoveCall Pro</h1>
224
+ <div class="status-bar">
225
+ <span class="status-indicator status-active"></span>
226
+ ๊ธด๊ธ‰ ํ†ตํ™” ์„œ๋น„์Šค ํ™œ์„ฑํ™”๋จ
227
+ </div>
228
+ </div>
229
+
230
+ <div class="main-section">
231
+ <div class="contact-card">
232
+ <div class="contact-header">
233
+ <div class="contact-avatar">โค๏ธ</div>
234
+ <div>
235
+ <h2 id="emergencyContact">๊ธด๊ธ‰ ์—ฐ๋ฝ์ฒ˜</h2>
236
+ <p id="contactPhone">์—ฐ๋ฝ์ฒ˜๋ฅผ ๋“ฑ๋กํ•ด์ฃผ์„ธ์š”</p>
237
+ </div>
238
+ </div>
239
+ </div>
240
+
241
+ <div class="emergency-trigger">
242
+ <div class="trigger-outer">
243
+ <div class="trigger-inner">
244
+ <span style="font-size: 36px">SOS</span>
245
+ <span style="font-size: 14px; margin-top: 8px">๊ธด๊ธ‰ ํ˜ธ์ถœ ์ค€๋น„๋จ</span>
246
+ </div>
247
+ </div>
248
+ </div>
249
+
250
+ <div class="permission-alert">
251
+ <strong>๊ถŒํ•œ ํ•„์š”</strong>
252
+ <p>๊ธด๊ธ‰ ํ†ตํ™” ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์ „ํ™” ๊ถŒํ•œ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.</p>
253
+ <button class="button" onclick="requestPermissions()">๊ถŒํ•œ ํ—ˆ์šฉํ•˜๊ธฐ</button>
254
+ </div>
255
+
256
+ <div class="setup-section">
257
+ <h3>์„ค์ • ๋ฐฉ๋ฒ•</h3>
258
+ <div class="setup-step">
259
+ <h4>1. ๊ธด๊ธ‰ ์—ฐ๋ฝ์ฒ˜ ๋“ฑ๋ก</h4>
260
+ <button class="button" onclick="registerContact()">์—ฐ๋ฝ์ฒ˜ ๋“ฑ๋กํ•˜๊ธฐ</button>
261
+ </div>
262
+ <div class="setup-step">
263
+ <h4>2. ๋ณผ๋ฅจ ๋ฒ„ํŠผ ํ…Œ์ŠคํŠธ</h4>
264
+ <button class="button" onclick="testVolumeButton()">ํ…Œ์ŠคํŠธ ์‹œ์ž‘</button>
265
+ </div>
266
+ </div>
267
+
268
+ <div class="subscription-info">
269
+ ํ”„๋ฆฌ๋ฏธ์—„ ์„œ๋น„์Šค ์ด์šฉ์ค‘ (์›” 5,000์›)
270
+ <br>๋‹ค์Œ ๊ฒฐ์ œ์ผ: 2024๋…„ 2์›” 1์ผ
271
+ </div>
272
+ </div>
273
+ </div>
274
+
275
+ <div id="volumeIndicator">
276
+ ๋ณผ๋ฅจ ๋ฒ„ํŠผ ๊ฐ์ง€์ค‘... <span id="countdown">5</span>์ดˆ
277
+ </div>
278
+
279
+ <script>
280
+ let volumeButtonPressed = false;
281
+ let pressTimer = null;
282
+ let countdownInterval = null;
283
+
284
+ // ๊ถŒํ•œ ์š”์ฒญ
285
+ async function requestPermissions() {
286
+ try {
287
+ if ('permissions' in navigator) {
288
+ const result = await navigator.permissions.query({ name: 'microphone' });
289
+ if (result.state === 'granted') {
290
+ alert('๊ถŒํ•œ์ด ํ—ˆ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.');
291
+ } else {
292
+ const permission = await navigator.mediaDevices.getUserMedia({ audio: true });
293
+ alert('๊ถŒํ•œ์ด ํ—ˆ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.');
294
+ }
295
+ }
296
+ } catch (error) {
297
+ alert('๊ถŒํ•œ ์š”์ฒญ ์ค‘ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์„ค์ •์—์„œ ์ง์ ‘ ํ—ˆ์šฉํ•ด์ฃผ์„ธ์š”.');
298
+ }
299
+ }
300
+
301
+ // ์—ฐ๋ฝ์ฒ˜ ๋“ฑ๋ก
302
+ function registerContact() {
303
+ const name = prompt('๊ธด๊ธ‰ ์—ฐ๋ฝ์ฒ˜ ์ด๋ฆ„์„ ์ž…๋ ฅํ•˜์„ธ์š”:');
304
+ const phone = prompt('์ „ํ™”๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š” (- ์—†์ด):');
305
+
306
+ if (name && phone) {
307
+ document.getElementById('emergencyContact').textContent = name;
308
+ document.getElementById('contactPhone').textContent = phone;
309
+ localStorage.setItem('emergencyContact', JSON.stringify({ name, phone }));
310
+ alert('๊ธด๊ธ‰ ์—ฐ๋ฝ์ฒ˜๊ฐ€ ๋“ฑ๋ก๋˜์—ˆ์Šต๋‹ˆ๋‹ค.');
311
+ }
312
+ }
313
+
314
+ // ๋ณผ๋ฅจ ๋ฒ„ํŠผ ํ…Œ์ŠคํŠธ
315
+ function testVolumeButton() {
316
+ const indicator = document.getElementById('volumeIndicator');
317
+ const countdown = document.getElementById('countdown');
318
+ let seconds = 5;
319
+
320
+ indicator.style.display = 'block';
321
+
322
+ countdownInterval = setInterval(() => {
323
+ seconds--;
324
+ countdown.textContent = seconds;
325
+
326
+ if (seconds <= 0) {
327
+ clearInterval(countdownInterval);
328
+ indicator.style.display = 'none';
329
+ alert('ํ…Œ์ŠคํŠธ๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.');
330
+ }
331
+ }, 1000);
332
+ }
333
+
334
+ // ๋ณผ๋ฅจ ๋ฒ„ํŠผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ
335
+ document.addEventListener('keydown', (e) => {
336
+ if (e.key === 'VolumeUp') {
337
+ if (!volumeButtonPressed) {
338
+ volumeButtonPressed = true;
339
+ pressTimer = setTimeout(() => {
340
+ const contact = JSON.parse(localStorage.getItem('emergencyContact'));
341
+ if (contact) {
342
+ window.location.href = `tel:${contact.phone}`;
343
+ } else {
344
+ alert('๊ธด๊ธ‰ ์—ฐ๋ฝ์ฒ˜๋ฅผ ๋จผ์ € ๋“ฑ๋กํ•ด์ฃผ์„ธ์š”.');
345
+ }
346
+ }, 5000);
347
+ }
348
+ }
349
+ });
350
+
351
+ document.addEventListener('keyup', (e) => {
352
+ if (e.key === 'VolumeUp') {
353
+ volumeButtonPressed = false;
354
+ if (pressTimer) {
355
+ clearTimeout(pressTimer);
356
+ }
357
+ }
358
+ });
359
+
360
+ // ์ €์žฅ๋œ ์—ฐ๋ฝ์ฒ˜ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ
361
+ window.onload = () => {
362
+ const savedContact = localStorage.getItem('emergencyContact');
363
+ if (savedContact) {
364
+ const contact = JSON.parse(savedContact);
365
+ document.getElementById('emergencyContact').textContent = contact.name;
366
+ document.getElementById('contactPhone').textContent = contact.phone;
367
+ }
368
+ };
369
+
370
+ // ์„œ๋น„์Šค ์›Œ์ปค ๋“ฑ๋ก
371
+ if ('serviceWorker' in navigator) {
372
+ navigator.serviceWorker.register('service-worker.js')
373
+ .then(registration => {
374
+ console.log('ServiceWorker registration successful');
375
+ })
376
+ .catch(err => {
377
+ console.log('ServiceWorker registration failed: ', err);
378
+ });
379
+ }
380
+ </script>
381
+ </body>
382
+ </html>