pub.solar/_includes/layouts/default.tsx

78 lines
1.8 KiB
TypeScript
Raw Permalink Normal View History

2022-10-02 19:38:38 +00:00
import { md } from '../../filters.ts';
2022-10-02 18:46:42 +00:00
import Head from '../Head.tsx';
import Background from '../Background.tsx';
2022-10-02 20:03:44 +00:00
import Homelink from '../Homelink.tsx';
2022-10-02 19:38:38 +00:00
import HakkenDates from '../HakkenDates.tsx';
2022-10-02 18:46:42 +00:00
export default ({
title,
2022-10-02 19:38:38 +00:00
content,
2022-10-02 18:46:42 +00:00
theme,
extraStylesheets,
2022-10-02 19:38:38 +00:00
extraScripts,
cacheBust,
showHakkenDates,
2022-10-02 18:46:42 +00:00
}) => <>
<html>
<Head
title={title}
theme={theme}
extraStylesheets={extraStylesheets}
2022-10-02 19:38:38 +00:00
cacheBust={cacheBust}
extraScripts={[...(extraScripts || []), '/scripts/copy-code.js']}
2022-10-02 18:46:42 +00:00
/>
<body className="ps-main">
2022-10-02 19:38:38 +00:00
2022-10-02 18:46:42 +00:00
<Background />
2022-10-02 19:38:38 +00:00
2022-10-02 20:03:44 +00:00
<Homelink />
2022-10-02 18:46:42 +00:00
<main className="ps-main--page ps-page">
<section
lang="en"
id="en"
className="ps-page--section"
>
<a
className="ps-page--section-link"
href="#de"
2022-10-02 20:46:59 +00:00
>
Deutsche übersetzung unten
<span className="ps-page--section-link-icon"></span>
</a>
2022-10-02 18:46:42 +00:00
<div
dangerouslySetInnerHTML={{ __html: md(content.en) }}
className="ps-page--section-contents"
></div>
2022-10-02 19:38:38 +00:00
2022-10-03 02:47:39 +00:00
{showHakkenDates ? <HakkenDates lang="en" className="ps-page--section-contents" /> : null}
2022-10-02 18:46:42 +00:00
</section>
<section
lang="de"
id="de"
className="ps-page--section"
>
<a
className="ps-page--section-link"
href="#en"
2022-10-02 20:46:59 +00:00
>
English translation above
<span className="ps-page--section-link-icon"></span>
</a>
2022-10-02 18:46:42 +00:00
<div
dangerouslySetInnerHTML={{ __html: md(content.de) }}
className="ps-page--section-contents"
></div>
2022-10-02 19:38:38 +00:00
2022-10-03 02:47:39 +00:00
{showHakkenDates ? <HakkenDates lang="de" className="ps-page--section-contents" /> : null}
2022-10-02 18:46:42 +00:00
</section>
</main>
</body>
</html>
</>;