forked from AcaMate/AcaMate_Web
1. 쿠키만 사용하던 저장 동작을 다른 저장소도 사용하게 변경 1.1. 쿠키 대신 세션 레포지토리를 기본적으로 사용하게 Service 코드 구현 2. 로그인 되었을 경우 화면 표기 변경 2.1. 시작하기 버튼 hidden 처리 2.2. 사용자 이름 불러오기 2.3. 로그인 동작 관련 변수 스토리지 저장 2.4. 서버에서 직접적인 크라이언트 쿠키 저장이 아닌 서버는 뒤의 값으로 간섭하게 변경
93 lines
2.8 KiB
HTML
93 lines
2.8 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 hidden" id="loading-overlay" data-show-on="/about">
|
|
<!-- 로딩 오버레이 내부 -->
|
|
<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>
|
|
|
|
<script src="scripts/scroll.js"></script>
|
|
<script src="scripts/apiSender.js"></script>
|
|
<script src="scripts/jsCommonFunc.js"></script>
|
|
<script src="scripts/kakao-postcode.js"></script>
|
|
|
|
|
|
<!-- 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);
|
|
|
|
const overlay = document.getElementById('loading-overlay');
|
|
const showOnPath = overlay?.getAttribute('data-show-on');
|
|
|
|
if (overlay && showOnPath && window.location.pathname === showOnPath) {
|
|
overlay.classList.remove('hidden');
|
|
setTimeout(() => {
|
|
if (overlay) overlay.remove();
|
|
}, remaining);
|
|
} else if (overlay) {
|
|
overlay.remove();
|
|
}
|
|
}).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=/";
|
|
};
|
|
window.deleteCookie = function (name) {
|
|
document.cookie = name + '=; Max-Age=-99999999;';
|
|
};
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|