index.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title><%= VITE_APP_TITLE %></title>
  8. </head>
  9. <body>
  10. <div id="app">
  11. <style>
  12. html,
  13. body,
  14. #app {
  15. width: 100%;
  16. height: 100%;
  17. display: flex;
  18. position: relative;
  19. justify-content: center;
  20. align-items: center;
  21. overflow: hidden;
  22. }
  23. .loader,
  24. .loader:before,
  25. .loader:after {
  26. border-radius: 50%;
  27. width: 2.5em;
  28. height: 2.5em;
  29. -webkit-animation-fill-mode: both;
  30. animation-fill-mode: both;
  31. -webkit-animation: loadAnimation 1.8s infinite ease-in-out;
  32. animation: loadAnimation 1.8s infinite ease-in-out;
  33. }
  34. .loader {
  35. color: #409eff;
  36. font-size: 10px;
  37. margin: 80px auto;
  38. position: relative;
  39. text-indent: -9999em;
  40. -webkit-transform: translateZ(0);
  41. -ms-transform: translateZ(0);
  42. transform: translateZ(0);
  43. -webkit-animation-delay: -0.16s;
  44. animation-delay: -0.16s;
  45. top: 0;
  46. transform: translate(-50%, 0);
  47. }
  48. .loader:before,
  49. .loader:after {
  50. content: "";
  51. position: absolute;
  52. top: 0;
  53. }
  54. .loader:before {
  55. left: -3.5em;
  56. -webkit-animation-delay: -0.32s;
  57. animation-delay: -0.32s;
  58. }
  59. .loader:after {
  60. left: 3.5em;
  61. }
  62. @-webkit-keyframes loadAnimation {
  63. 0%,
  64. 80%,
  65. 100% {
  66. box-shadow: 0 2.5em 0 -1.3em;
  67. }
  68. 40% {
  69. box-shadow: 0 2.5em 0 0;
  70. }
  71. }
  72. @keyframes loadAnimation {
  73. 0%,
  74. 80%,
  75. 100% {
  76. box-shadow: 0 2.5em 0 -1.3em;
  77. }
  78. 40% {
  79. box-shadow: 0 2.5em 0 0;
  80. }
  81. }
  82. </style>
  83. <div class="loader"></div>
  84. </div>
  85. <script>
  86. try {
  87. const setting = JSON.parse(localStorage.getItem('setting'))
  88. if (setting) {
  89. document.querySelector('.loader').style.color = setting.themeColor || '#409eff'
  90. }
  91. }catch (e) {}
  92. </script>
  93. <script type="module" src="/src/main.ts"></script>
  94. </body>
  95. </html>