GHHG10's picture
download
raw
1.2 kB
// @refresh reload
import { createHandler, StartServer } from "@solidjs/start/server"
import { getRequestEvent } from "solid-js/web"
export default createHandler(() => (
<StartServer
document={({ assets, children, scripts }) => {
const lang = (() => {
const event = getRequestEvent()
const header = event?.request.headers.get("accept-language")
if (!header) return "en"
for (const item of header.split(",")) {
const value = item.trim().split(";")[0]?.toLowerCase()
if (!value) continue
if (value.startsWith("zh")) return "zh"
if (value.startsWith("en")) return "en"
}
return "en"
})()
return (
<html lang={lang}>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>OpenCode</title>
<meta name="theme-color" content="#F8F7F7" />
{assets}
</head>
<body class="antialiased overscroll-none text-12-regular">
<div id="app">{children}</div>
{scripts}
</body>
</html>
)
}}
/>
))

Xet Storage Details

Size:
1.2 kB
·
Xet hash:
04490bae41795578ee05f8fe3e04651d92078d83907045ecf2de299e590a931c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.