pub.solar/_includes/layouts/default.tsx

56 lines
1.3 KiB
TypeScript

import { md } from '../../filters.ts';
import Head from '../Head.tsx';
import Background from '../Background.tsx';
import Homelink from '../Homelink.tsx';
import Langlink from '../Langlink.tsx';
import HakkenDates from '../HakkenDates.tsx';
import Services from '../Services.tsx';
export default ({
title,
content,
language,
otherLang,
baseURL,
theme,
extraStylesheets,
extraScripts,
cacheBust,
showHakkenDates,
hakken,
showServices,
services,
}) => <>
<html lang={language.slug}>
<Head
title={title}
theme={theme}
otherLang={otherLang}
baseURL={baseURL}
extraStylesheets={extraStylesheets}
cacheBust={cacheBust}
extraScripts={[...(extraScripts || []), '/scripts/copy-code.js']}
/>
<body className="ps-main">
<Background />
<Homelink />
<Langlink otherLang={otherLang} baseURL={baseURL} />
<main className="ps-main--page ps-page">
<div className="ps-page--contents">
<section dangerouslySetInnerHTML={{ __html: md(content) }}></section>
{showServices ? <Services language={language} data={services} /> : null}
{showHakkenDates ? <HakkenDates language={language} data={hakken} /> : null}
</div>
</main>
</body>
</html>
</>;