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>
<link rel="shortcut icon" href="/assets/pubsolar.svg" />
2022-10-02 18:46:42 +00:00
<meta name="theme-color" content="{{ theme.color }}" id="theme-color" />
2022-11-22 18:25:01 +00:00
<meta name="description" content="You should have control of your data! We host Matrix, Nextcloud, and Mastodon for you to use." />
2022-10-02 18:46:42 +00:00
<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>;