Files
coder/site/index.html
T
Mathias Fredriksson 0f3e1aa328 fix(site): make the PWA title bar follow the active theme (#31297)
Installed PWAs paint their title bar from the theme-color meta, which
was Coder v1's static #17172E and matched no current theme, so
light-theme users got a dark title bar. ThemeProvider now writes the
rendered body background into every theme-color meta whenever the
resolved theme changes, including OS light/dark switches in sync mode.
Until React mounts, index.html picks the light or dark surface from
prefers-color-scheme, so launching on a dark OS does not flash a white
title bar.
2026-10-27 11:27:39 +02:00

81 lines
2.8 KiB
HTML

<!doctype html>
<!--
-####### +######- ########+ ########## ########+. ###########
+#####--###### +#####--#####+ ############ ########## ####+++#####- ###########
####- -#### ####- ##### #### ####+ #### #### .#### ###########
.#### #### #### #### #### ######### ####...+##+ ###########
####. .#### #### +#### #### +#### #### ####+####### ###########
#####- -##### ######..###### ############- ########## #### ##### ###########
.########+ -########. #########+ ########## #### .#### ###########
-->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Coder</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- ThemeProvider overwrites both with the active theme. Until then, a dark OS gets a dark title bar, not a white one. -->
<meta
name="theme-color"
media="(prefers-color-scheme: light)"
content="#ffffff"
/>
<meta
name="theme-color"
media="(prefers-color-scheme: dark)"
content="#09090b"
/>
<meta name="application-name" content="{{ .ApplicationName }}" />
<meta property="og:type" content="website" />
<meta property="csrf-token" content="{{ .CSRF.Token }}" />
<meta property="build-info" content="{{ .BuildInfo }}" />
<meta property="user" content="{{ .User }}" />
<meta property="entitlements" content="{{ .Entitlements }}" />
<meta property="appearance" content="{{ .Appearance }}" />
<meta property="userAppearance" content="{{ .UserAppearance }}" />
<meta property="experiments" content="{{ .Experiments }}" />
<meta property="regions" content="{{ .Regions }}" />
<meta property="docs-url" content="{{ .DocsURL }}" />
<meta property="logo-url" content="{{ .LogoURL }}" />
<meta property="ai-gateway-enabled" content="{{ .AIGatewayEnabled }}" />
<meta
property="user-secret-file-path-enabled"
content="{{ .UserSecretFilePathEnabled }}"
/>
<meta property="permissions" content="{{ .Permissions }}" />
<meta property="organizations" content="{{ .Organizations }}" />
<link
rel="alternate icon"
type="image/png"
href="/favicons/favicon-light.png"
media="(prefers-color-scheme: dark)"
/>
<link
rel="icon"
type="image/svg+xml"
href="/favicons/favicon-light.svg"
media="(prefers-color-scheme: dark)"
/>
<link
rel="alternate icon"
type="image/png"
href="/favicons/favicon-dark.png"
media="(prefers-color-scheme: light)"
/>
<link
rel="icon"
type="image/svg+xml"
href="/favicons/favicon-dark.svg"
media="(prefers-color-scheme: light)"
/>
</head>
<body>
<!-- Invisible color source for the iOS standalone status bar; see .ios-status-bar-band. -->
<div class="ios-status-bar-band" aria-hidden="true"></div>
<div id="root"></div>
<script type="module" src="./src/index.tsx"></script>
</body>
</html>