app.html 4.7 KB

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