index.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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><%- 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. padding: 0;
  18. margin: 0;
  19. }
  20. .loading-box {
  21. display: flex;
  22. flex-direction: column;
  23. align-items: center;
  24. justify-content: center;
  25. width: 100%;
  26. height: 100%;
  27. }
  28. .loading-box .loading-wrap {
  29. display: flex;
  30. align-items: center;
  31. justify-content: center;
  32. padding: 98px;
  33. }
  34. .dot {
  35. position: relative;
  36. box-sizing: border-box;
  37. display: inline-block;
  38. width: 32px;
  39. height: 32px;
  40. font-size: 32px;
  41. transform: rotate(45deg);
  42. animation: ant-rotate 1.2s infinite linear;
  43. }
  44. .dot i {
  45. position: absolute;
  46. display: block;
  47. width: 14px;
  48. height: 14px;
  49. background-color: #409eff;
  50. border-radius: 100%;
  51. opacity: 0.3;
  52. transform: scale(0.75);
  53. transform-origin: 50% 50%;
  54. animation: ant-spin-move 1s infinite linear alternate;
  55. }
  56. .dot i:nth-child(1) {
  57. top: 0;
  58. left: 0;
  59. }
  60. .dot i:nth-child(2) {
  61. top: 0;
  62. right: 0;
  63. animation-delay: 0.4s;
  64. }
  65. .dot i:nth-child(3) {
  66. right: 0;
  67. bottom: 0;
  68. animation-delay: 0.8s;
  69. }
  70. .dot i:nth-child(4) {
  71. bottom: 0;
  72. left: 0;
  73. animation-delay: 1.2s;
  74. }
  75. @keyframes ant-rotate {
  76. to {
  77. transform: rotate(405deg);
  78. }
  79. }
  80. @keyframes ant-spin-move {
  81. to {
  82. opacity: 1;
  83. }
  84. }
  85. </style>
  86. <div class="loading-box">
  87. <div class="loading-wrap">
  88. <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
  89. </div>
  90. </div>
  91. </div>
  92. <script>
  93. const globalState = JSON.parse(window.localStorage.getItem("geeker-global"));
  94. if (globalState) {
  95. const dot = document.querySelectorAll(".dot i");
  96. const html = document.querySelector("html");
  97. dot.forEach(item => (item.style.background = globalState.primary));
  98. if (globalState.isDark) html.style.background = "#141414";
  99. }
  100. </script>
  101. <script type="module" src="/src/main.ts"></script>
  102. </body>
  103. </html>