index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="icon" href="/favicon.ico">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="theme-color" content="#eef5f1">
  8. <title>Flyfish File Viewer 在线预览器 Vue3</title>
  9. <style>
  10. :root {
  11. color-scheme: light;
  12. background: #eef5f1;
  13. }
  14. html,
  15. body {
  16. margin: 0;
  17. min-width: 320px;
  18. min-height: 100%;
  19. background: #eef5f1;
  20. color: #172033;
  21. font-family: Aptos, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  22. -webkit-font-smoothing: antialiased;
  23. -moz-osx-font-smoothing: grayscale;
  24. }
  25. body {
  26. min-height: 100vh;
  27. }
  28. #app {
  29. min-height: 100vh;
  30. }
  31. /* Vue 挂载前的首屏骨架,避免大文件预览器资源加载期间出现空白或黑屏。 */
  32. .app-boot-screen {
  33. min-height: 100vh;
  34. display: grid;
  35. place-items: center;
  36. padding: 32px;
  37. background:
  38. linear-gradient(90deg, rgba(31, 150, 110, 0.07) 1px, transparent 1px),
  39. linear-gradient(180deg, rgba(31, 150, 110, 0.06) 1px, transparent 1px),
  40. linear-gradient(135deg, #eef5f1 0%, #f8fbff 52%, #edf7f2 100%);
  41. background-size: 28px 28px, 28px 28px, auto;
  42. box-sizing: border-box;
  43. }
  44. .app-boot-shell {
  45. width: min(960px, 100%);
  46. display: grid;
  47. grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.45fr);
  48. gap: 18px;
  49. align-items: stretch;
  50. }
  51. .app-boot-brand,
  52. .app-boot-preview {
  53. min-width: 0;
  54. border: 1px solid rgba(114, 137, 161, 0.2);
  55. border-radius: 8px;
  56. background: rgba(255, 255, 255, 0.9);
  57. box-shadow: 0 24px 70px rgba(41, 66, 90, 0.12);
  58. }
  59. .app-boot-brand {
  60. display: flex;
  61. flex-direction: column;
  62. justify-content: space-between;
  63. padding: 26px;
  64. }
  65. .app-boot-title {
  66. display: flex;
  67. gap: 14px;
  68. align-items: center;
  69. }
  70. .app-boot-mark {
  71. width: 48px;
  72. height: 48px;
  73. display: grid;
  74. place-items: center;
  75. border-radius: 8px;
  76. background: #1f966e;
  77. color: #ffffff;
  78. font-size: 26px;
  79. font-weight: 800;
  80. line-height: 1;
  81. box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  82. }
  83. .app-boot-name {
  84. display: block;
  85. font-size: 22px;
  86. font-weight: 800;
  87. line-height: 1.2;
  88. }
  89. .app-boot-status {
  90. display: block;
  91. margin-top: 6px;
  92. color: #6b7b8f;
  93. font-size: 14px;
  94. line-height: 1.5;
  95. }
  96. .app-boot-progress {
  97. position: relative;
  98. height: 6px;
  99. margin-top: 42px;
  100. overflow: hidden;
  101. border-radius: 999px;
  102. background: #dce7ee;
  103. }
  104. .app-boot-progress::after {
  105. position: absolute;
  106. inset: 0 auto 0 0;
  107. width: 42%;
  108. border-radius: inherit;
  109. background: linear-gradient(90deg, #1f966e, #3b82f6);
  110. animation: bootProgress 1.35s ease-in-out infinite;
  111. content: "";
  112. }
  113. .app-boot-preview {
  114. display: grid;
  115. grid-template-rows: auto 1fr;
  116. overflow: hidden;
  117. }
  118. .app-boot-toolbar {
  119. display: flex;
  120. gap: 8px;
  121. align-items: center;
  122. padding: 14px 16px;
  123. border-bottom: 1px solid rgba(114, 137, 161, 0.18);
  124. }
  125. .app-boot-dot {
  126. width: 10px;
  127. height: 10px;
  128. border-radius: 999px;
  129. background: #1f966e;
  130. }
  131. .app-boot-chip,
  132. .app-boot-line,
  133. .app-boot-page {
  134. background: linear-gradient(90deg, #eef3f7 0%, #f9fbfd 45%, #e7eff4 100%);
  135. background-size: 240% 100%;
  136. animation: bootShimmer 1.6s ease-in-out infinite;
  137. }
  138. .app-boot-chip {
  139. width: 86px;
  140. height: 18px;
  141. border-radius: 999px;
  142. }
  143. .app-boot-chip:nth-child(4) {
  144. width: 118px;
  145. margin-left: auto;
  146. }
  147. .app-boot-canvas {
  148. display: grid;
  149. grid-template-columns: 140px 1fr;
  150. gap: 18px;
  151. padding: 18px;
  152. background: #f4f8fb;
  153. }
  154. .app-boot-nav {
  155. display: grid;
  156. gap: 12px;
  157. align-content: start;
  158. }
  159. .app-boot-line {
  160. height: 14px;
  161. border-radius: 999px;
  162. }
  163. .app-boot-line:nth-child(2) {
  164. width: 72%;
  165. }
  166. .app-boot-line:nth-child(3) {
  167. width: 86%;
  168. }
  169. .app-boot-page {
  170. min-height: 300px;
  171. border: 1px solid rgba(114, 137, 161, 0.16);
  172. border-radius: 8px;
  173. background-color: #ffffff;
  174. }
  175. @keyframes bootProgress {
  176. 0% {
  177. transform: translateX(-110%);
  178. }
  179. 50% {
  180. transform: translateX(75%);
  181. }
  182. 100% {
  183. transform: translateX(240%);
  184. }
  185. }
  186. @keyframes bootShimmer {
  187. 0% {
  188. background-position: 160% 0;
  189. }
  190. 100% {
  191. background-position: -120% 0;
  192. }
  193. }
  194. @media (max-width: 720px) {
  195. .app-boot-screen {
  196. padding: 18px;
  197. }
  198. .app-boot-shell {
  199. grid-template-columns: 1fr;
  200. }
  201. .app-boot-brand {
  202. padding: 22px;
  203. }
  204. .app-boot-progress {
  205. margin-top: 26px;
  206. }
  207. .app-boot-canvas {
  208. grid-template-columns: 1fr;
  209. }
  210. .app-boot-nav {
  211. display: none;
  212. }
  213. }
  214. @media (prefers-reduced-motion: reduce) {
  215. .app-boot-progress::after,
  216. .app-boot-chip,
  217. .app-boot-line,
  218. .app-boot-page {
  219. animation: none;
  220. }
  221. }
  222. </style>
  223. </head>
  224. <body>
  225. <div id="app">
  226. <main class="app-boot-screen" role="status" aria-live="polite" aria-label="正在加载 Flyfish File Viewer">
  227. <div class="app-boot-shell">
  228. <section class="app-boot-brand">
  229. <div class="app-boot-title">
  230. <div class="app-boot-mark" aria-hidden="true">F</div>
  231. <div>
  232. <strong class="app-boot-name">Flyfish File Viewer</strong>
  233. <span class="app-boot-status">正在准备文档预览环境...</span>
  234. </div>
  235. </div>
  236. <div class="app-boot-progress" aria-hidden="true"></div>
  237. </section>
  238. <section class="app-boot-preview" aria-hidden="true">
  239. <div class="app-boot-toolbar">
  240. <span class="app-boot-dot"></span>
  241. <span class="app-boot-chip"></span>
  242. <span class="app-boot-chip"></span>
  243. <span class="app-boot-chip"></span>
  244. </div>
  245. <div class="app-boot-canvas">
  246. <div class="app-boot-nav">
  247. <span class="app-boot-line"></span>
  248. <span class="app-boot-line"></span>
  249. <span class="app-boot-line"></span>
  250. </div>
  251. <div class="app-boot-page"></div>
  252. </div>
  253. </section>
  254. </div>
  255. </main>
  256. </div>
  257. <script type="module" src="/src/main.ts"></script>
  258. </body>
  259. </html>