use mdx for privacy, impressum, terms

This commit is contained in:
Thomas Ruoff
2021-04-06 00:25:28 +02:00
parent 2d0e989c00
commit 9c4194df02
9 changed files with 4275 additions and 230 deletions

View File

@@ -1,51 +1,24 @@
import { readFileSync } from 'fs'
import renderToString from 'next-mdx-remote/render-to-string'
import mdFormatter from '../helpers/mdFormatter'
import Layout from '../components/layout'
export default function Impressum() {
export default function TermsPage({ renderedOutput }) {
return (
<Layout>
<h1 className="mb-3 text-xl font-extrabold">Impressum</h1>
<address className="mb-3">
Freundeskreis des VCP Rosenfeld e.V.
<br />
Mozartstr. 11
<br />
72348 Rosenfeld
<br />
</address>
<h2 className="text-lg">1. Vorsitzender:</h2>
<address className="mb-3">
Kevin Deckert
<br />
Mozartstr. 11
<br />
72348 Rosenfeld
<br />
Telefon: +49 7428 3423
<br />
</address>
<h2 className="text-lg">
Bussle-Wart und Technisch Verantwortlicher dieser Webanwendung:
</h2>
<address className="mb-3">
Thomas Ruoff
<br />
Mömpelgardgasse 25
<br />
72348 Rosenfeld
<br />
Telefon: +49 151 21225362
<br />
</address>
<p>
Das Impressum gilt für:{' '}
<a className="link" href="https://pfadi-bussle.tomru.space">
https://pfadi-bussle.tomru.space
</a>
</p>
<div
className="text-gray-700"
dangerouslySetInnerHTML={{ __html: renderedOutput }}
/>
</Layout>
)
}
export async function getStaticProps() {
const source = readFileSync('./md/impressum.md', 'utf8')
const { renderedOutput } = await renderToString(source, {
components: { ...mdFormatter },
})
return { props: { renderedOutput } }
}