app.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <link rel="icon" href="%sveltekit.assets%/favicon.png" />
  6. <link rel="manifest" href="%sveltekit.assets%/manifest.json" crossorigin="use-credentials" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  8. <meta name="robots" content="noindex,nofollow" />
  9. <link
  10. rel="search"
  11. type="application/opensearchdescription+xml"
  12. title="Open WebUI"
  13. href="/opensearch.xml"
  14. />
  15. <script>
  16. // On page load or when changing themes, best to add inline in `head` to avoid FOUC
  17. (() => {
  18. if (localStorage?.theme && localStorage?.theme.includes('oled')) {
  19. document.documentElement.style.setProperty('--color-gray-900', '#000000');
  20. document.documentElement.style.setProperty('--color-gray-950', '#000000');
  21. document.documentElement.classList.add('dark');
  22. } else if (
  23. localStorage.theme === 'light' ||
  24. (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches)
  25. ) {
  26. document.documentElement.classList.add('light');
  27. } else if (localStorage.theme && localStorage.theme !== 'system') {
  28. localStorage.theme.split(' ').forEach((e) => {
  29. document.documentElement.classList.add(e);
  30. });
  31. } else if (localStorage.theme && localStorage.theme === 'system') {
  32. systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
  33. document.documentElement.classList.add(systemTheme ? 'dark' : 'light');
  34. } else if (localStorage.theme && localStorage.theme === 'her') {
  35. document.documentElement.classList.add('dark');
  36. document.documentElement.classList.add('her');
  37. } else {
  38. document.documentElement.classList.add('dark');
  39. }
  40. window.matchMedia('(prefers-color-scheme: dark)').addListener((e) => {
  41. if (localStorage.theme === 'system') {
  42. if (e.matches) {
  43. document.documentElement.classList.add('dark');
  44. document.documentElement.classList.remove('light');
  45. } else {
  46. document.documentElement.classList.add('light');
  47. document.documentElement.classList.remove('dark');
  48. }
  49. }
  50. });
  51. })();
  52. </script>
  53. <title>Open WebUI</title>
  54. %sveltekit.head%
  55. </head>
  56. <body data-sveltekit-preload-data="hover">
  57. <div style="display: contents">%sveltekit.body%</div>
  58. <div
  59. id="splash-screen"
  60. style="position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 100%"
  61. >
  62. <style type="text/css" nonce="">
  63. html {
  64. overflow-y: scroll !important;
  65. }
  66. </style>
  67. <img
  68. id="logo"
  69. style="
  70. position: absolute;
  71. width: 6rem;
  72. height: 6rem;
  73. top: 41%;
  74. left: 50%;
  75. margin-left: -3rem;
  76. "
  77. src="/logo.svg"
  78. />
  79. <div
  80. style="
  81. position: absolute;
  82. top: 33%;
  83. left: 50%;
  84. width: 24rem;
  85. margin-left: -12rem;
  86. display: flex;
  87. flex-direction: column;
  88. align-items: center;
  89. "
  90. >
  91. <img
  92. id="logo-her"
  93. style="width: 13rem; height: 13rem"
  94. src="/logo.svg"
  95. class="animate-pulse-fast"
  96. />
  97. <div style="position: relative; width: 24rem; margin-top: 0.5rem">
  98. <div
  99. id="progress-background"
  100. style="
  101. position: absolute;
  102. width: 100%;
  103. height: 0.75rem;
  104. border-radius: 9999px;
  105. background-color: #fafafa9a;
  106. "
  107. ></div>
  108. <div
  109. id="progress-bar"
  110. style="
  111. position: absolute;
  112. width: 0%;
  113. height: 0.75rem;
  114. border-radius: 9999px;
  115. background-color: #fff;
  116. "
  117. class="bg-white"
  118. ></div>
  119. </div>
  120. </div>
  121. <!-- <span style="position: absolute; bottom: 32px; left: 50%; margin: -36px 0 0 -36px">
  122. Footer content
  123. </span> -->
  124. </div>
  125. </body>
  126. </html>
  127. <style type="text/css" nonce="">
  128. html {
  129. overflow-y: hidden !important;
  130. }
  131. #splash-screen {
  132. background: #fff;
  133. }
  134. html.dark #splash-screen {
  135. background: #000;
  136. }
  137. html.dark #splash-screen img {
  138. filter: invert(1);
  139. }
  140. html.her #splash-screen {
  141. background: #983724;
  142. }
  143. #logo-her {
  144. display: none;
  145. }
  146. #progress-background {
  147. display: none;
  148. }
  149. #progress-bar {
  150. display: none;
  151. }
  152. html.her #logo {
  153. display: none;
  154. }
  155. html.her #logo-her {
  156. display: block;
  157. filter: invert(1);
  158. }
  159. html.her #progress-background {
  160. display: block;
  161. }
  162. html.her #progress-bar {
  163. display: block;
  164. }
  165. @media (max-width: 24rem) {
  166. html.her #progress-background {
  167. display: none;
  168. }
  169. html.her #progress-bar {
  170. display: none;
  171. }
  172. }
  173. @keyframes pulse {
  174. 50% {
  175. opacity: 0.65;
  176. }
  177. }
  178. .animate-pulse-fast {
  179. animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  180. }
  181. </style>