Files
leonpan-assets/index.html

118 lines
3.2 KiB
HTML
Raw Permalink Normal View History

2025-10-24 22:54:40 +08:00
<!DOCTYPE html>
2025-10-19 13:31:11 +00:00
<html>
<head>
2025-10-24 22:54:40 +08:00
<!--
Using LeonPan open source project.
Powered by LeonCloud
awa
-->
2025-10-25 09:57:04 +08:00
<link href="https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Latin/MiSansLatin-Medium.min.css" rel="stylesheet">
2025-10-19 13:31:11 +00:00
<meta charset="utf-8" />
<link rel="shortcut icon" href="{pwa_small_icon}" sizes="64x64" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,shrink-to-fit=no"
/>
<meta name="theme-color" content="" />
<link rel="manifest" href="/manifest.json" />
<meta name="description" content="{siteDes}" />
<title>{siteName}</title>
<script>
window.subTitle = "{siteName}";
</script>
<style>
#app-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f5f5f5;
z-index: 9999;
}
#app-loader .logo {
width: 120px;
height: 120px;
margin-bottom: 32px;
background-image: url("{pwa_medium_icon}");
background-position: center;
background-repeat: no-repeat;
background-size: contain;
opacity: 0;
transform: scale(0.8);
animation: fadeIn 0.6s ease-out 0.3s forwards;
}
#app-loader .progress-container {
width: 200px;
height: 4px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 2px;
overflow: hidden;
2025-10-19 13:31:11 +00:00
opacity: 0;
transform: scale(0.8);
animation: fadeIn 0.6s ease-out 0.3s forwards;
}
#app-loader .progress-bar {
height: 100%;
background-color: var(--defaultThemeColor);
border-radius: 2px;
animation: linearProgress 1.5s infinite ease-in-out;
2025-10-19 13:31:11 +00:00
}
@keyframes linearProgress {
2025-10-19 13:31:11 +00:00
0% {
transform: translateX(-100%);
width: 50%;
2025-10-19 13:31:11 +00:00
}
50% {
transform: translateX(100%);
width: 50%;
}
51% {
transform: translateX(100%);
width: 50%;
2025-10-19 13:31:11 +00:00
}
100% {
transform: translateX(-100%);
width: 50%;
2025-10-19 13:31:11 +00:00
}
}
@keyframes fadeIn {
to {
opacity: 1;
transform: scale(1);
}
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app-loader">
<div class="logo"></div>
<div class="progress-container">
<div class="progress-bar"></div>
2025-10-19 13:31:11 +00:00
</div>
</div>
<script async type="module" src="/src/main.tsx"></script>
<div id="root"></div>
<script>
document.addEventListener("DOMContentLoaded", function () {
// Hide loader when the app has loaded
const appRoot = document.getElementById("root");
const observer = new MutationObserver(function (mutations) {
if (appRoot.children.length > 0) {
document.getElementById("app-loader").style.display = "none";
observer.disconnect();
}
});
observer.observe(appRoot, { childList: true });
});
</script>
</body>
{siteScript}
</html>