app.html 5.0 KB

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