重构进度指示器,使用新的LinearProgress组件替换原有的CircularProgress 更新文件管理器中的进度指示器引用 修改首页加载动画为线性进度条样式
118 lines
3.2 KiB
HTML
Executable File
118 lines
3.2 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<!--
|
|
Using LeonPan open source project.
|
|
Powered by LeonCloud
|
|
awa
|
|
-->
|
|
<link href="https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Latin/MiSansLatin-Medium.min.css" rel="stylesheet">
|
|
<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;
|
|
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;
|
|
}
|
|
|
|
@keyframes linearProgress {
|
|
0% {
|
|
transform: translateX(-100%);
|
|
width: 50%;
|
|
}
|
|
50% {
|
|
transform: translateX(100%);
|
|
width: 50%;
|
|
}
|
|
51% {
|
|
transform: translateX(100%);
|
|
width: 50%;
|
|
}
|
|
100% {
|
|
transform: translateX(-100%);
|
|
width: 50%;
|
|
}
|
|
}
|
|
@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>
|
|
</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>
|