mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
web/index: move code block stylesheets to html
This commit is contained in:
parent
6fc070733a
commit
ab97efbcc1
2 changed files with 2 additions and 7 deletions
|
@ -3,6 +3,8 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<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"/>
|
||||
<title>gomuks web</title>
|
||||
</head>
|
||||
|
|
|
@ -18,13 +18,6 @@ import { createRoot } from "react-dom/client"
|
|||
import App from "./App.tsx"
|
||||
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 => {
|
||||
if (resp.ok) {
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
|
|
Loading…
Add table
Reference in a new issue