Skip to content
Snippets Groups Projects

feat(10): add content collections

Merged Jon Richter requested to merge feat/10/contentCollections into feature/8
11 files
+ 649
3410
Compare changes
  • Side-by-side
  • Inline
Files
11
+ 36
35
@@ -2,46 +2,47 @@
import "../global.scss";
import { zipper } from "fp-ts-contrib";
import Link from "./Link.astro";
import Toc from "./Toc.astro";
const { languages = zipper.insertLeft("en")(zipper.of("de")) } =
Astro.props as { languages: zipper.Zipper<string> };
Astro.props as { languages: zipper.Zipper<string> };
---
<html lang={languages.focus}>
<head>
<meta charset="utf-8" />
<link
rel="shortcut icon"
type="image/vnd.microsoft.icon"
href="favicon.ico"
/>
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>ecobytes</title>
</head>
<body>
<header>
<small style="position:relative;">
<Link href="/"><h1>ecobytes</h1></Link>
<img
src="favicon.ico"
style="position:absolute; left:-18px; top:-7px; pointer-events: none;
<head>
<meta charset="utf-8" />
<link
rel="shortcut icon"
type="image/vnd.microsoft.icon"
href="favicon.ico"
/>
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>ecobytes</title>
</head>
<body>
<header>
<small style="position:relative;">
<Link href="/"><h1>ecobytes</h1></Link>
<img
src="favicon.ico"
style="position:absolute; left:-18px; top:-7px; pointer-events: none;
width:24px;
filter: drop-shadow(0px 1px 0px #eee) drop-shadow(1px 0px 0px #eee)"
/>
</small>
<small>
{
languages.lefts.map((entry) => <button>{entry}</button>)
}<button aria-pressed="true" disabled>{languages.focus}</button
>{languages.rights.map((entry) => <button>{entry}</button>)}
</small>
</header>
<main>
<slot><code>Error on SSG: Missing Global content</code></slot>
</main>
<footer>
<Link href="Impressum">Impressum</Link>
</footer>
</body>
/>
</small>
<small>
{languages.lefts.map((entry) => <button>{entry}</button>)}<button
aria-pressed="true"
disabled>{languages.focus}</button
>{languages.rights.map((entry) => <button>{entry}</button>)}
</small>
</header>
<main>
<slot><code>Error on SSG: Missing `Global` content</code></slot>
</main>
<footer>
<Toc collectionName="policies" />
</footer>
</body>
</html>
Loading