Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { getPostBySlug } from '@/lib/mdx'
- import {Card, CardHeader, CardBody, CardFooter, Divider, Link, Image} from "@nextui-org/react";
- const getPageContent = async slug => {
- const { meta, content } = await getPostBySlug(slug)
- return { meta, content }
- }
- export async function generateMetadata({ params }) {
- const { meta } = await getPageContent(params.slug)
- return { title: meta.title }
- }
- const Page = async ({ params }) => {
- const { content } = await getPageContent(params.slug)
- return (
- // <section className='py-24'>
- <section className="xl:col-start-2 xl:col-span-3 lg:col-span-3 col-span-5 px-5 pt-11">
- <div className='Ads-block p-4 mb-5 bg-slate-400 rounded-xl'>
- <p>This is the Advertisment Block</p>
- </div>
- <Card className="max-w-[400px]">
- <CardHeader className="flex gap-3">
- <Image
- alt="nextui logo"
- height={40}
- radius="sm"
- src="https://avatars.githubusercontent.com/u/86160567?s=200&v=4"
- width={40}
- />
- <div className="flex flex-col">
- <p className="text-md">NextUI</p>
- <p className="text-small text-default-500">nextui.org</p>
- </div>
- </CardHeader>
- <Divider/>
- <CardBody>
- <p>Make beautiful websites regardless of your design experience.</p>
- </CardBody>
- <Divider/>
- <CardFooter>
- <Link
- isExternal
- showAnchorIcon
- href="https://github.com/nextui-org/nextui"
- >
- Visit source code on GitHub.
- </Link>
- </CardFooter>
- </Card>
- <div className='container py-4 prose prose-headings:text-slate-900 prose-p:text-slate-700 dark:prose-headings:text-slate-100 dark:prose-p:text-slate-300'>{content}</div>
- </section>
- //</section>
- )
- }
- export default Page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement