app.html 5.5 KB

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