app.html 4.9 KB

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