mirror of
https://github.com/gogs/gogs.git
synced 2026-06-19 15:37:48 +02:00
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
{{.WebContext}}
|
|
<link rel="shortcut icon" href="/img/favicon.png" />
|
|
<title>Gogs</title>
|
|
<style>
|
|
/* Inlined so the page paints with the right theme background before the main stylesheet arrives. */
|
|
html {
|
|
background-color: #fffffe;
|
|
}
|
|
html.dark {
|
|
background-color: #16161a;
|
|
}
|
|
</style>
|
|
<script>
|
|
// Inlined to run before paint and avoid theme flash. Treat any value
|
|
// other than "light" or "dark" (missing, corrupted, "system", etc.)
|
|
// as a follow-the-system signal so the OS preference still wins.
|
|
(function () {
|
|
var saved = localStorage.getItem("gogs-theme");
|
|
var explicit = saved === "light" || saved === "dark";
|
|
var dark = saved === "dark" || (!explicit && window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
if (dark) document.documentElement.classList.add("dark");
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|