[Layout][m] remove unneccessary sections from layout component
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import Layout from '../components/Layout'
|
import Layout from './Layout'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import Excel from '../components/Excel'
|
import Excel from './Excel'
|
||||||
import Table from '../components/Table'
|
import Table from './Table'
|
||||||
import TableGrid from '../components/TableGrid'
|
import TableGrid from './TableGrid'
|
||||||
import LineChart from '../components/LineChart'
|
import LineChart from './LineChart'
|
||||||
|
import MetaData from './Metadata'
|
||||||
import { MDXProvider } from '@mdx-js/react'
|
import { MDXProvider } from '@mdx-js/react'
|
||||||
import { Vega, VegaLite } from 'react-vega'
|
import { Vega, VegaLite } from 'react-vega'
|
||||||
|
|
||||||
@@ -18,7 +19,8 @@ const components = {
|
|||||||
VegaLite,
|
VegaLite,
|
||||||
LineChart,
|
LineChart,
|
||||||
Head,
|
Head,
|
||||||
TableGrid
|
TableGrid,
|
||||||
|
MetaData,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -26,25 +28,12 @@ export default function DataLiterate({ children }) {
|
|||||||
const { Component, pageProps } = children
|
const { Component, pageProps } = children
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout title={pageProps.title}>
|
<Layout>
|
||||||
<div className="prose mx-auto">
|
|
||||||
<header>
|
|
||||||
<div className="mb-6">
|
|
||||||
<h1>{pageProps.title}</h1>
|
|
||||||
{pageProps.author && (
|
|
||||||
<div className="-mt-6"><p className="opacity-60 pl-1">{pageProps.author}</p></div>
|
|
||||||
)}
|
|
||||||
{pageProps.description && (
|
|
||||||
<p className="description">{pageProps.description}</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<main>
|
<main>
|
||||||
<MDXProvider components={components}>
|
<MDXProvider components={components}>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</MDXProvider>
|
</MDXProvider>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,10 @@ 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>
|
||||||
<div className="mx-auto p-6">
|
<div className="mx-auto p-6">
|
||||||
|
<div className="prose mx-auto">
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</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">
|
||||||
<a
|
<a
|
||||||
className="flex items-center justify-center"
|
className="flex items-center justify-center"
|
||||||
|
|||||||
Reference in New Issue
Block a user