pub.solar/_includes/layouts/homepage.tsx

54 lines
1.2 KiB
TypeScript
Raw Normal View History

import { md } from '../../filters.ts';
2022-10-02 18:46:42 +00:00
import Head from '../Head.tsx';
import Background from '../Background.tsx';
import Langlink from '../Langlink.tsx';
2022-10-02 18:46:42 +00:00
export default ({
title,
2022-10-02 19:38:38 +00:00
content,
links,
language,
otherLang,
baseURL,
2022-10-02 18:46:42 +00:00
theme,
extraStylesheets,
2022-10-02 19:38:38 +00:00
extraScripts,
cacheBust,
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}
2022-10-02 18:46:42 +00:00
/>
<body className="ps-main">
<Background />
<Langlink otherLang={otherLang} baseURL={baseURL} />
2022-10-02 18:46:42 +00:00
<main className="ps-main--page ps-page ps-page_home">
<section
className="ps-page--contents"
dangerouslySetInnerHTML={{ __html: md(content) }}
></section>
<section className="ps-page--links">
{links.map(({ href, title, openInNewTab }) =>
<a
href={href}
target={openInNewTab ? '_blank' : '_self'}
className="ps-page--link"
key={href}
>{title}</a>
)}
</section>
2022-10-02 18:46:42 +00:00
</main>
</body>
</html>
</>;