|
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | 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" /> |
| 5 | + <link rel="icon" type="image/png" href="/static/favicon.png" /> |
| 6 | + <link rel="icon" type="image/png" href="/static/favicon-96x96.png" sizes="96x96" /> |
| 7 | + <link rel="icon" type="image/svg+xml" href="/static/favicon.svg" /> |
| 8 | + <link rel="shortcut icon" href="/static/favicon.ico" /> |
| 9 | + <link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png" /> |
9 | 10 | <meta name="apple-mobile-web-app-title" content="Open WebUI" /> |
| 11 | + |
10 | 12 | <link rel="manifest" href="/manifest.json" /> |
11 | 13 | <meta |
12 | 14 | name="viewport" |
|
74 | 76 | } |
75 | 77 | } |
76 | 78 | }); |
| 79 | + |
| 80 | + |
| 81 | + function setSplashImage() { |
| 82 | + const logo = document.getElementById('logo'); |
| 83 | + const isDarkMode = document.documentElement.classList.contains('dark'); |
| 84 | + |
| 85 | + if (isDarkMode) { |
| 86 | + const darkImage = new Image(); |
| 87 | + darkImage.src = '/static/splash-dark.png'; |
| 88 | + |
| 89 | + darkImage.onload = () => { |
| 90 | + logo.src = '/static/splash-dark.png'; |
| 91 | + logo.style.filter = ''; // Ensure no inversion is applied if splash-dark.png exists |
| 92 | + }; |
| 93 | + |
| 94 | + darkImage.onerror = () => { |
| 95 | + logo.style.filter = 'invert(1)'; // Invert image if splash-dark.png is missing |
| 96 | + }; |
| 97 | + } |
| 98 | + } |
| 99 | + |
| 100 | + // Runs after classes are assigned |
| 101 | + window.onload = setSplashImage; |
| 102 | + |
| 103 | + |
77 | 104 | })(); |
78 | 105 | </script> |
79 | 106 |
|
|
176 | 203 | background: #000; |
177 | 204 | } |
178 | 205 |
|
179 | | - html.dark #splash-screen img { |
180 | | - filter: invert(1); |
181 | | - } |
182 | | - |
183 | 206 | html.her #splash-screen { |
184 | 207 | background: #983724; |
185 | 208 | } |
|
0 commit comments