-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
47 lines (47 loc) · 2.06 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="theme-color" content="#1D1D1D" />
<meta name="background-color" content="#1D1D1D" />
<link rel="icon" type="image/svg+xml" href="/icons/favicon.svg" />
<link rel="alternate icon" href="icons/favicon.ico" type="ico" sizes="32x32" />
<link rel="apple-touch-icon" href="icons/icon-152x152.png" sizes="152x152" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="manifest" href="manifest.json" />
<title>Flip-it</title>
<meta name="description" content="타인을 알아가고 본인을 표현하는 가장 단순한 방법, 플리빗" />
<script
src="https://t1.kakaocdn.net/kakao_js_sdk/2.7.1/kakao.min.js"
integrity="sha384-kDljxUXHaJ9xAb2AzRd59KxjrFjzHa5TAoFQ6GbYTCAG0bjM55XohjjDT7tDDC01"
crossorigin="anonymous"
></script>
</head>
<body>
<div id="root"></div>
<div id="fallback" style="display: none; justify-content: center; align-items: center">
<img src="Splash.png" alt="flipit" width="375" height="765" />
</div>
<script type="module" src="/src/main.tsx"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker
.register('firebase-messaging-sw.js')
.then(function (registration) {
console.log('Service Worker가 scope에 등록되었습니다.:', registration.scope)
// PWA가 성공적으로 로드되면, fallback 이미지를 숨김
document.getElementById('fallback').style.display = 'none'
})
.catch(function (err) {
console.log('Service Worker 등록 실패:', err)
})
})
} else {
// 서비스 워커 등록 실패 시, fallback 이미지 등장
document.getElementById('fallback').style.display = 'flex'
}
</script>
</body>
</html>