index.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>Art Design Pro</title>
  5. <meta charset="UTF-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <meta
  8. name="description"
  9. content="Art Design Pro - A modern admin dashboard template built with Vue 3, TypeScript, and Element Plus."
  10. />
  11. <link rel="shortcut icon" type="image/x-icon" href="src/assets/img/favicon.ico" />
  12. <style>
  13. /* 防止页面刷新时白屏的初始样式 */
  14. html {
  15. background-color: #fafbfc;
  16. }
  17. html.dark {
  18. background-color: #070707;
  19. }
  20. </style>
  21. <script>
  22. // 初始化 html class 主题属性
  23. ;(function () {
  24. try {
  25. if (typeof Storage === 'undefined' || !window.localStorage) {
  26. return
  27. }
  28. const themeType = localStorage.getItem('sys-theme')
  29. if (themeType === 'dark') {
  30. document.documentElement.classList.add('dark')
  31. }
  32. } catch (e) {
  33. console.warn('Failed to apply initial theme:', e)
  34. }
  35. })()
  36. </script>
  37. </head>
  38. <body>
  39. <div id="app"></div>
  40. <script type="module" src="/src/main.ts"></script>
  41. </body>
  42. </html>