feat 更新h5脚手架

This commit is contained in:
DaxPay
2024-05-15 13:23:15 +08:00
parent d9cb42a890
commit 5459778faf
99 changed files with 5829 additions and 3937 deletions

View File

@@ -1,34 +1,35 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans" id="htmlRoot" class>
<!doctype html>
<html lang="zh-cmn-Hans" id="htmlRoot">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<!-- 要使用安全区域,需要加上这个 viewport-fit=cover -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<title>
<%= title %>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= title %></title>
</head>
<body>
<div id="app">
<script>
(() => {
let htmlRoot = document.getElementById('htmlRoot');
const appDesignSetting = window.localStorage.getItem('DESIGN-SETTING')
let darkMode = appDesignSetting && JSON.parse(appDesignSetting).darkMode
if (htmlRoot && darkMode) {
htmlRoot.setAttribute('data-theme', darkMode);
darkMode = htmlRoot = null;
} else {
htmlRoot.setAttribute('data-theme', 'light');
;(() => {
const { darkMode = 'dark', appTheme = '#5d9dfe' } =
JSON.parse(window.localStorage.getItem('DESIGN-SETTING')) || {}
let htmlRoot = document.getElementById('htmlRoot')
if (htmlRoot) {
htmlRoot.classList.add(darkMode)
}
})();
// 设置主题色变量
document.documentElement.style.setProperty(
'--app-theme-color',
appTheme,
)
})()
</script>
<style>
body {
margin: 0;
}
html[data-theme='dark'] .first-loading-wrap {
html.dark .first-loading-wrap {
background-color: #101014;
}
.first-loading-wrap {
@@ -39,79 +40,79 @@
align-items: center;
flex-direction: column;
}
.first-loading-wrap>h1 {
font-size: 128px
.first-loading-wrap > h1 {
font-size: 28px;
}
.first-loading-wrap .loading-wrap {
padding: 98px;
display: flex;
justify-content: center;
align-items: center
align-items: center;
}
.dot {
animation: antRotate 1.2s infinite linear;
transform: rotate(45deg);
position: relative;
display: inline-block;
font-size: 52px;
width: 52px;
height: 52px;
box-sizing: border-box
font-size: 12px;
width: 30px;
height: 30px;
box-sizing: border-box;
}
.dot i {
width: 24px;
height: 24px;
width: 14px;
height: 14px;
position: absolute;
display: block;
background-color: #1890ff;
background: var(--app-theme-color);
border-radius: 100%;
transform: scale(.75);
transform: scale(0.75);
transform-origin: 50% 50%;
opacity: .3;
animation: antSpinMove 1s infinite linear alternate
opacity: 0.3;
animation: antSpinMove 1s infinite linear alternate;
}
.dot i:nth-child(1) {
top: 0;
left: 0
left: 0;
}
.dot i:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: .4s;
animation-delay: .4s
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.dot i:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: .8s;
animation-delay: .8s
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.dot i:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s
animation-delay: 1.2s;
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg)
transform: rotate(405deg);
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg)
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
opacity: 1
opacity: 1;
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1
opacity: 1;
}
}
</style>