-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathPage.tsx
41 lines (39 loc) · 1.04 KB
/
Page.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { ComponentChildren, h, VNode } from "preact";
import config from "../project.config";
export default function Page({
title,
description,
css,
children,
}: {
title: string;
description: string;
css: string;
children: ComponentChildren;
}): VNode {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title}</title>
<meta name="description" content={description} />
{config.docs.favicons.map(({ output, size }) => (
<link
key={output}
rel="icon"
type="image/png"
sizes={`${size}x${size}`}
href={`${config.docs.root}/${config.docs.iconsDir}/${output}`}
/>
))}
<link
rel="stylesheet"
href={`${config.docs.root}/${config.docs.sharedCss.output}`}
/>
<link rel="stylesheet" href={`${config.docs.root}/${css}`} />
</head>
<body>{children}</body>
</html>
);
}