index.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <!doctype html>
  2. <html lang="en" id="htmlRoot">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <meta name="renderer" content="webkit" />
  7. <meta
  8. name="viewport"
  9. content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
  10. />
  11. <!-- <title><%= VITE_GLOB_APP_TITLE %></title> -->
  12. <!-- <link rel="icon" href="./src/assets/images/gooki.ico" /> -->
  13. <title>{{title}}</title>
  14. <link rel="icon" href="./src/assets/images/gooki.ico" />
  15. </head>
  16. <body>
  17. <div id="app">
  18. <style>
  19. html {
  20. /* same as ant-design-vue/dist/reset.css setting, avoid the title line-height changed */
  21. line-height: 1.15;
  22. }
  23. html[data-theme='dark'] .app-loading {
  24. background-color: #2c344a;
  25. }
  26. html[data-theme='dark'] .app-loading .app-loading-title {
  27. color: rgb(255 255 255 / 85%);
  28. }
  29. .app-loading {
  30. display: flex;
  31. flex-direction: column;
  32. align-items: center;
  33. justify-content: center;
  34. width: 100%;
  35. height: 100%;
  36. background-color: #f4f7f9;
  37. }
  38. .app-loading .app-loading-wrap {
  39. display: flex;
  40. position: absolute;
  41. top: 50%;
  42. left: 50%;
  43. flex-direction: column;
  44. align-items: center;
  45. justify-content: center;
  46. transform: translate3d(-50%, -50%, 0);
  47. }
  48. .app-loading .dots {
  49. display: flex;
  50. align-items: center;
  51. justify-content: center;
  52. padding: 98px;
  53. }
  54. .app-loading .app-loading-title {
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. margin-top: 30px;
  59. color: rgb(0 0 0 / 85%);
  60. font-size: 30px;
  61. }
  62. .app-loading .app-loading-logo {
  63. display: block;
  64. width: 90px;
  65. margin: 0 auto;
  66. margin-bottom: 20px;
  67. }
  68. .dot {
  69. display: inline-block;
  70. position: relative;
  71. box-sizing: border-box;
  72. width: 48px;
  73. height: 48px;
  74. margin-top: 30px;
  75. transform: rotate(45deg);
  76. animation: ant-rotate 1.2s infinite linear;
  77. font-size: 32px;
  78. }
  79. .dot i {
  80. display: block;
  81. position: absolute;
  82. width: 20px;
  83. height: 20px;
  84. transform: scale(0.75);
  85. transform-origin: 50% 50%;
  86. animation: ant-spin-move 1s infinite linear alternate;
  87. border-radius: 100%;
  88. opacity: 0.3;
  89. background-color: #0065cc;
  90. }
  91. .dot i:nth-child(1) {
  92. top: 0;
  93. left: 0;
  94. }
  95. .dot i:nth-child(2) {
  96. top: 0;
  97. right: 0;
  98. animation-delay: 0.4s;
  99. }
  100. .dot i:nth-child(3) {
  101. right: 0;
  102. bottom: 0;
  103. animation-delay: 0.8s;
  104. }
  105. .dot i:nth-child(4) {
  106. bottom: 0;
  107. left: 0;
  108. animation-delay: 1.2s;
  109. }
  110. @keyframes ant-rotate {
  111. to {
  112. transform: rotate(405deg);
  113. }
  114. }
  115. @keyframes ant-spin-move {
  116. to {
  117. opacity: 1;
  118. }
  119. }
  120. </style>
  121. <div class="app-loading">
  122. <div class="app-loading-wrap">
  123. <img src="/resource/img/gooki.ico" id="loadingImage" class="app-loading-logo" alt="Logo" />
  124. <div class="app-loading-dots">
  125. <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
  126. </div>
  127. <div class="app-loading-title"><%= VITE_GLOB_APP_TITLE %></div>
  128. </div>
  129. </div>
  130. </div>
  131. <script type="module" src="/src/main.ts"></script>
  132. <script>
  133. document.addEventListener('DOMContentLoaded', () => {
  134. const title = localStorage.getItem('departmentName') || 'Default Title';
  135. const avatar = localStorage.getItem('avatar') || '/src/assets/images/gooki.ico';
  136. // 设置文档标题
  137. document.title = title;
  138. // 设置图标
  139. const link = document.querySelector("link[rel~='icon']");
  140. if (link) {
  141. link.href = avatar;
  142. }
  143. const loadingImage = document.getElementById('loadingImage');
  144. if (loadingImage) {
  145. loadingImage.src = avatar;
  146. }
  147. });
  148. </script>
  149. </body>
  150. </html>