You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
2.2 KiB
75 lines
2.2 KiB
import sass from "https://deno.land/x/denosass@1.0.6/mod.ts";
|
|
import { h, PropsWithChildren } from "../jsx.ts";
|
|
|
|
import Header from "../components/Header.tsx";
|
|
|
|
interface TemplateProps {
|
|
title: string;
|
|
description: string;
|
|
style?: string;
|
|
stylepath?: string;
|
|
}
|
|
|
|
export default (props: PropsWithChildren<TemplateProps>) => (
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0"
|
|
/>
|
|
|
|
{/* favicon stuff generated with https://realfavicongenerator.net */}
|
|
<link
|
|
rel="apple-touch-icon"
|
|
sizes="180x180"
|
|
href="/apple-touch-icon.png"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
sizes="32x32"
|
|
href="/favicon-32x32.png"
|
|
/>
|
|
<link
|
|
rel="icon"
|
|
type="image/png"
|
|
sizes="16x16"
|
|
href="/favicon-16x16.png"
|
|
/>
|
|
<link rel="manifest" href="/site.webmanifest" />
|
|
<link
|
|
rel="mask-icon"
|
|
href="/safari-pinned-tab.svg"
|
|
color="#5bbad5"
|
|
/>
|
|
<meta name="apple-mobile-web-app-title" content="Voltpad" />
|
|
<meta name="application-name" content="Voltpad" />
|
|
<meta name="msapplication-TileColor" content="#2b5797" />
|
|
<meta name="theme-color" content="#ffffff" />
|
|
|
|
<title>{props.title} | Voltpad</title>
|
|
{(() => {
|
|
if (!props.style) props.style = "";
|
|
if (props.stylepath)
|
|
props.style += Deno.readTextFileSync(props.stylepath);
|
|
else return <div></div>;
|
|
return <style>{sass(props.style).to_string()}</style>;
|
|
})()}
|
|
</head>
|
|
<Header
|
|
entries={[
|
|
{
|
|
name: "Home",
|
|
href: "/"
|
|
},
|
|
{
|
|
name: "Search",
|
|
href: "/search"
|
|
}
|
|
]}
|
|
></Header>
|
|
<div class="main">{props.children}</div>
|
|
</html>
|
|
);
|