index.html 3.56 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <link
            rel="shortcut icon"
            type="image/x-icon"
            href="./src/assets/favicon-light.ico"
    />
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title id="app-title"></title>
    <script type="module">
        document.addEventListener('DOMContentLoaded', function () {
            document.querySelector('#app-title').innerHTML = import.meta.env.VITE_APP_TITLE + '管理';
            console.log(import.meta.env.VITE_APP_TITLE + '管理')
        });
    </script>
    <style>
        .first-loading-wrp {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100vw;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            background: url("src/assets/svg/loading-background.svg") no-repeat;
            background-size: 100% 100%;
        }

        .first-loading-wrp > h1 {
            font-size: 30px;
            font-weight: bolder;
        }

        .first-loading-wrp .loading-wrp {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 98px;
        }

        .dot {
            position: relative;
            box-sizing: border-box;
            display: inline-block;
            width: 64px;
            height: 64px;
            font-size: 64px;
            transform: rotate(45deg);
            animation: antRotate 1.2s infinite linear;
        }

        .dot i {
            position: absolute;
            display: block;
            width: 28px;
            height: 28px;
            background-color: #1890ff;
            border-radius: 100%;
            opacity: 0.3;
            transform: scale(0.75);
            transform-origin: 50% 50%;
            animation: antSpinMove 1s infinite linear alternate;
        }

        .dot i:nth-child(1) {
            top: 0;
            left: 0;
        }

        .dot i:nth-child(2) {
            top: 0;
            right: 0;
            -webkit-animation-delay: 0.4s;
            animation-delay: 0.4s;
        }

        .dot i:nth-child(3) {
            right: 0;
            bottom: 0;
            -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;
        }

        @keyframes antRotate {
            to {
                -webkit-transform: rotate(405deg);
                transform: rotate(405deg);
            }
        }

        @-webkit-keyframes antRotate {
            to {
                -webkit-transform: rotate(405deg);
                transform: rotate(405deg);
            }
        }

        @keyframes antSpinMove {
            to {
                opacity: 1;
            }
        }

        @-webkit-keyframes antSpinMove {
            to {
                opacity: 1;
            }
        }
    </style>
</head>
<body>
<noscript>
    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
        Please enable it to continue.</strong>
</noscript>
<div id="app">
    <div class="first-loading-wrp">
        <div class="loading-wrp">
        <span class="dot dot-spin">
          <i></i>
          <i></i>
          <i></i>
          <i></i>
        </span>
        </div>
    </div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>