forked from AcaMate/AcaMate_Web
1. Console에 바로 나오던 메세지들 개발 환경에 따라 나오게 필터링 하는 서비스 개발 2. script 쪽에도 추가 하여 js 에서도 필터링 되게 구현
104 lines
3.1 KiB
HTML
104 lines
3.1 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>
|
|
window.appConfig = {
|
|
isDev: location.hostname.includes('devacamate.ipstein.myds.me') ||
|
|
location.hostname === '0.0.0.0' ||
|
|
location.port === '5144'
|
|
};
|
|
</script>
|
|
|
|
|
|
<script src="scripts/logger.js"></script>
|
|
<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>
|