1
0
Fork 0
forked from Mirrors/gomuks

web/index: move code block stylesheets to html

This commit is contained in:
Tulir Asokan 2024-10-29 01:26:44 +02:00
parent 6fc070733a
commit ab97efbcc1
2 changed files with 2 additions and 7 deletions

View file

@ -3,6 +3,8 @@
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<link rel="icon" type="image/png" href="/gomuks.png"/> <link rel="icon" type="image/png" href="/gomuks.png"/>
<link rel="stylesheet" media="(prefers-color-scheme: light)" href="_gomuks/codeblock/github.css" />
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="_gomuks/codeblock/github-dark.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>gomuks web</title> <title>gomuks web</title>
</head> </head>

View file

@ -18,13 +18,6 @@ import { createRoot } from "react-dom/client"
import App from "./App.tsx" import App from "./App.tsx"
import "./index.css" import "./index.css"
const styleTags = document.createElement("style")
styleTags.textContent = `
@import "_gomuks/codeblock/github-dark.css" (prefers-color-scheme: dark);
@import "_gomuks/codeblock/github.css" (prefers-color-scheme: light);
`
document.head.appendChild(styleTags)
fetch("_gomuks/auth", { method: "POST" }).then(resp => { fetch("_gomuks/auth", { method: "POST" }).then(resp => {
if (resp.ok) { if (resp.ok) {
createRoot(document.getElementById("root")!).render( createRoot(document.getElementById("root")!).render(