AcaMate_Web/wwwroot/index.html
Seonkyu.kim 899a563aac [] 쿠키 동작
1. 쿠키 추가, 불러오기
2. API 읽어오기
3. Header 값 쿠키 저장 하기
2025-05-27 13:24:47 +09:00

71 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AcaMate</title>
<base href="/" />
<link rel="stylesheet" href="css/tailwind.css" />
<link rel="stylesheet" href="css/app.css" />
<link rel="icon" type="image/png" href="favicon.png" />
</head>
<body class="bg-gray-50 text-gray-900 font-sans">
<!-- 로딩 오버레이 -->
<div class="fixed inset-0 z-50 flex items-center justify-center bg-gray-100" id="loading-overlay">
<!-- 로딩 오버레이 내부 -->
<div class="flex flex-col items-center">
<div class="relative w-48 h-48 overflow-hidden">
<img src="/logo.png" alt="logo"
class="absolute top-0 left-0 w-full h-full clip-reveal" />
</div>
<div class="mt-4 text-lg text-gray-700 animate-blink">Loading...</div>
</div>
</div>
<div id="app"></div>
<!-- Blazor 에러 UI -->
<div id="blazor-error-ui" class="hidden fixed bottom-0 left-0 w-full bg-yellow-100 text-red-800 p-4 shadow z-50">
An unhandled error has occurred.
<a href="" class="underline text-blue-600 ml-2">Reload</a>
<button class="ml-4 text-red-600 font-bold dismiss"></button>
</div>
<!-- Blazor WASM 로딩 스크립트 -->
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script>
const MIN_LOADING_MS = 2700;
const loadingStart = performance.now();
Blazor.start().then(() => {
const elapsed = performance.now() - loadingStart;
const remaining = Math.max(0, MIN_LOADING_MS - elapsed);
setTimeout(() => {
const overlay = document.getElementById('loading-overlay');
if (overlay) overlay.remove();
}, remaining);
}).catch(err => {
console.error("❌ Blazor 로딩 실패", err);
});
</script>
<script>
window.getCookie = function (name) {
const v = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)');
return v ? v.pop() : '';
};
window.setCookie = function (name, value, days) {
let expires = "";
if (days) {
const date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
};
</script>
</body>
</html>