pub.solar/_includes/layouts/default.tsx

56 lines
1.3 KiB
TypeScript
Raw 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';
import Langlink from '../Langlink.tsx';
2022-10-02 19:38:38 +00:00
import HakkenDates from '../HakkenDates.tsx';
import Services from '../Services.tsx';
2022-10-02 18:46:42 +00:00
export default ({
title,
2022-10-02 19:38:38 +00:00
content,
language,
otherLang,
baseURL,
2022-10-02 18:46:42 +00:00
theme,
extraStylesheets,
2022-10-02 19:38:38 +00:00
extraScripts,
cacheBust,
showHakkenDates,
hakken,
showServices,
services,
2022-10-02 18:46:42 +00:00
}) => <>
<html lang={language.slug}>
2022-10-02 18:46:42 +00:00
<Head
title={title}
theme={theme}
otherLang={otherLang}
baseURL={baseURL}
2022-10-02 18:46:42 +00:00
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 />
<Langlink otherLang={otherLang} baseURL={baseURL} />
2022-10-02 19:38:38 +00:00
<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>
2022-10-02 19:38:38 +00:00
2022-10-02 18:46:42 +00:00
</main>
</body>
</html>
</>;