[site/theme][xs]: move prose from Layout onto DataLiterate component as we don't want automatically on all pages.
This commit is contained in:
parent
cd627353fa
commit
10ea882f00
@ -26,20 +26,22 @@ const components = {
|
|||||||
export default function DataLiterate({ children, source, frontMatter }) {
|
export default function DataLiterate({ children, source, frontMatter }) {
|
||||||
return (
|
return (
|
||||||
<Layout title={frontMatter.title}>
|
<Layout title={frontMatter.title}>
|
||||||
<header>
|
<div className="prose mx-auto">
|
||||||
<div className="mb-6">
|
<header>
|
||||||
<h1>{frontMatter.title}</h1>
|
<div className="mb-6">
|
||||||
{frontMatter.author && (
|
<h1>{frontMatter.title}</h1>
|
||||||
<div className="-mt-6"><p className="opacity-60 pl-1">{frontMatter.author}</p></div>
|
{frontMatter.author && (
|
||||||
)}
|
<div className="-mt-6"><p className="opacity-60 pl-1">{frontMatter.author}</p></div>
|
||||||
{frontMatter.description && (
|
)}
|
||||||
<p className="description">{frontMatter.description}</p>
|
{frontMatter.description && (
|
||||||
)}
|
<p className="description">{frontMatter.description}</p>
|
||||||
</div>
|
)}
|
||||||
</header>
|
</div>
|
||||||
<main>
|
</header>
|
||||||
<MDXRemote {...source} components={components} />
|
<main>
|
||||||
</main>
|
<MDXRemote {...source} components={components} />
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export default function Layout({ children, title = 'Home' }) {
|
|||||||
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
||||||
</Head>
|
</Head>
|
||||||
<Nav />
|
<Nav />
|
||||||
<div className="prose mx-auto p-6">
|
<div className="mx-auto p-6">
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<footer className="flex items-center justify-center w-full h-24 border-t">
|
<footer className="flex items-center justify-center w-full h-24 border-t">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user