30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { VERSION } from "../version.js";
|
|
|
|
export function renderDocsHtml(): string {
|
|
return `<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
<title>Seal Home API Docs (v${VERSION})</title>
|
|
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🦭</text></svg>" />
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #0f172a;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script
|
|
id="api-reference"
|
|
data-url="/openapi.json"
|
|
data-configuration='{"theme":"purple","layout":"modern","showSidebar":true}'
|
|
src="https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.101/dist/browser/standalone.js"
|
|
></script>
|
|
</body>
|
|
</html>`;
|
|
}
|