index.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>中科兴皖 - 一体化门户</title>
  5. <meta charset="UTF-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <meta name="description" content="中科兴皖一体化门户管理系统" />
  8. <link rel="icon" type="image/png" href="/logo1.png" />
  9. <style>
  10. /* 防止页面刷新时白屏的初始样式 */
  11. html {
  12. background-color: #fafbfc;
  13. }
  14. html.dark {
  15. background-color: #070707;
  16. }
  17. </style>
  18. <script>
  19. // 初始化 html class 主题属性
  20. ;(function () {
  21. try {
  22. if (typeof Storage === 'undefined' || !window.localStorage) {
  23. return
  24. }
  25. const themeType = localStorage.getItem('sys-theme')
  26. if (themeType === 'dark') {
  27. document.documentElement.classList.add('dark')
  28. }
  29. } catch (e) {
  30. console.warn('Failed to apply initial theme:', e)
  31. }
  32. })()
  33. </script>
  34. </head>
  35. <body>
  36. <div id="app"></div>
  37. <script type="module" src="/src/main.ts"></script>
  38. </body>
  39. </html>