Compare commits
2 Commits
309d825110
...
88e76e1d68
| Author | SHA1 | Date | |
|---|---|---|---|
| 88e76e1d68 | |||
| 919e6d192a |
@ -11,12 +11,15 @@
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="stylesheet" href="/fonts/fonts.css" />
|
||||
<link rel="stylesheet" href="/fonts/fonts.css" preload />
|
||||
<link rel="stylesheet" href="/preload.css" preload />
|
||||
<script type="module" src="/src/index.jsx"></script>
|
||||
<title>Farm Control</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<div id="root">
|
||||
<div class="fc-preload"><div class="fc-loader"></div></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
37
public/preload.css
Normal file
37
public/preload.css
Normal file
@ -0,0 +1,37 @@
|
||||
.fc-preload {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: black;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
}
|
||||
|
||||
/* HTML: <div class="loader"></div> */
|
||||
.fc-loader {
|
||||
width: 35px;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 50%;
|
||||
background:
|
||||
radial-gradient(farthest-side, #008eff 94%, #0000) top/6px 6px no-repeat,
|
||||
conic-gradient(#0000 30%, #008eff);
|
||||
-webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 6px), #000 0);
|
||||
animation: l13 1s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes l13 {
|
||||
100% {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,22 @@ import { defineConfig } from 'vite'
|
||||
import eslintPlugin from 'vite-plugin-eslint'
|
||||
import svgr from 'vite-plugin-svgr'
|
||||
import svgo from 'vite-plugin-svgo'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
export default defineConfig({
|
||||
base: '/',
|
||||
resolve: {
|
||||
alias: {
|
||||
three: path.resolve(__dirname, 'node_modules/three')
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['@ant-design/icons']
|
||||
},
|
||||
plugins: [react(), svgo(), svgr(), eslintPlugin()],
|
||||
build: {
|
||||
outDir: 'build',
|
||||
@ -28,10 +41,6 @@ export default defineConfig({
|
||||
return 'antd'
|
||||
}
|
||||
|
||||
if (id.includes('node_modules/@ant-design/icons')) {
|
||||
return 'ant-icons'
|
||||
}
|
||||
|
||||
if (id.includes('node_modules/@ant-design/charts')) {
|
||||
return 'ant-charts'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user