pub.solar/_includes/Head.tsx

42 lines
1.1 KiB
TypeScript
Raw Normal View History

2022-10-02 18:46:42 +00:00
import { title as titleFilter } from '../filters.ts';
2022-10-02 19:38:38 +00:00
export default ({
title,
theme,
extraStylesheets,
extraScripts,
cacheBust,
}) => <head>
2022-10-20 16:12:31 +00:00
<meta charSet="utf-8" />
2022-10-02 18:46:42 +00:00
<title>{ titleFilter(title) }</title>
2022-11-17 14:02:48 +00:00
<link rel="shortcut icon" href="/assets/pub.solar.svg" />
2022-10-02 18:46:42 +00:00
<meta name="theme-color" content="{{ theme.color }}" id="theme-color" />
<meta name="description" content="pub.solar wants you to have control of your data and privacy. We host Matrix, Nextcloud, and Mastodon for you to use." />
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0" />
2022-10-03 00:02:47 +00:00
<link rel="stylesheet" type="text/css" href={`/styles.css${cacheBust}`} media="all" />
2022-10-02 18:46:42 +00:00
<>
{(extraStylesheets || [])
2022-10-20 16:12:31 +00:00
.map(extraStylesheet => <link
rel="stylesheet"
type="text/css"
href={`${extraStylesheet}${cacheBust}`}
media="all"
key={extraStylesheet}
/>)}
2022-10-02 19:38:38 +00:00
</>
<>
{(extraScripts || [])
2022-10-20 16:12:31 +00:00
.map(extraScript => <script
defer
type="application/javascript"
src={`${extraScript}${cacheBust}`}
key={extraScript}
></script>)}
2022-10-02 18:46:42 +00:00
</>
</head>;