This commit is contained in:
parent
d6fe6446a5
commit
f558be2bcd
@ -1,25 +1,16 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import './global.css'
|
import './global.css'
|
||||||
/* import { Inter } from 'next/font/google'
|
|
||||||
|
|
||||||
const inter = Inter({
|
import Header from '@/components/Header'
|
||||||
subsets: ['latin'],
|
import Footer from '@/components/Footer'
|
||||||
display: 'swap',
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
/* Our app sits here to not cause any conflicts with payload's root layout */
|
|
||||||
const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||||
{
|
|
||||||
/* <html className={inter.className}>
|
|
||||||
<body>{children}</body>
|
|
||||||
</html>
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html>
|
<html>
|
||||||
<body className="autonomic min-h-screen flex flex-col mx-auto max-w-7xl px-6 text-primary bg-background">
|
<body className="autonomic min-h-screen flex flex-col mx-auto max-w-7xl px-6 text-primary bg-background">
|
||||||
{children}
|
<Header />
|
||||||
|
<main className="flex flex-col gap-4 flex-grow">{children}</main>
|
||||||
|
<Footer />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
)
|
)
|
||||||
|
@ -12,19 +12,15 @@ interface Props {}
|
|||||||
const Page = (props: Props) => {
|
const Page = (props: Props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<main className="flex flex-col gap-4 flex-grow">
|
<h1 className="">Nextload</h1>
|
||||||
<Header />
|
<p className="mt-3">
|
||||||
<h1 className="">Nextload</h1>
|
{`Nextload is a pre-configured setup for Nextjs and PayloadCMS that makes it easy to get started with building your website. With Nextload, you'll have a complete development environment that you can run locally using Docker. This makes it easy to test and develop your website before deploying it to a production environment.`}
|
||||||
<p className="mt-3">
|
<br />
|
||||||
{`Nextload is a pre-configured setup for Nextjs and PayloadCMS that makes it easy to get started with building your website. With Nextload, you'll have a complete development environment that you can run locally using Docker. This makes it easy to test and develop your website before deploying it to a production environment.`}
|
{`When you're ready to deploy the website on your own server, Nextload comes with a production environment that requires the use of Traefik as a reverse proxy. This setup provides a secure and scalable production environment for your website.`}
|
||||||
<br />
|
</p>
|
||||||
{`When you're ready to deploy the website on your own server, Nextload comes with a production environment that requires the use of Traefik as a reverse proxy. This setup provides a secure and scalable production environment for your website.`}
|
<section className="mt-4">
|
||||||
</p>
|
<Posts />
|
||||||
<section className="mt-4">
|
</section>
|
||||||
<Posts />
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
<Footer />
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ const Page = async ({ params }: PageArgs) => {
|
|||||||
depth: 3,
|
depth: 3,
|
||||||
})
|
})
|
||||||
if (!post) notFound()
|
if (!post) notFound()
|
||||||
return <PostPage post={post} />
|
return <PostPage post={post} locale="en" />
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Page
|
export default Page
|
||||||
|
@ -14,14 +14,14 @@ const AuthorComponent: React.FC<Props> = ({ author }) => {
|
|||||||
{typeof author.avatar === 'object' && (
|
{typeof author.avatar === 'object' && (
|
||||||
<Image
|
<Image
|
||||||
src={author.avatar.url || ''}
|
src={author.avatar.url || ''}
|
||||||
width={150}
|
width={100}
|
||||||
height={150}
|
height={10}
|
||||||
alt={author.avatar.alt || ''}
|
alt={author.avatar.alt || ''}
|
||||||
layout="fixed"
|
layout="fixed"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<h3 className="font-semibold text-base">{author.name}</h3>
|
<h3 className="">{author.name}</h3>
|
||||||
<p className="text-sm font-light">{author.bio}</p>
|
<p className="text-sm font-light">{author.bio}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Post } from 'types/payload-types'
|
import { Post } from 'types/payload-types'
|
||||||
import Blocks from './Blocks'
|
import Blocks from './Blocks'
|
||||||
|
import Author from './Blocks/Author'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
post: Post
|
post: Post
|
||||||
@ -11,6 +12,9 @@ export default function PostPage(props: Props) {
|
|||||||
return (
|
return (
|
||||||
<article>
|
<article>
|
||||||
<Blocks blocks={props?.post.blocks} locale="en" />
|
<Blocks blocks={props?.post.blocks} locale="en" />
|
||||||
|
{props?.post.author && typeof props?.post.author !== 'string' && (
|
||||||
|
<Author author={props?.post.author} />
|
||||||
|
)}
|
||||||
</article>
|
</article>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import deepmerge from 'deepmerge'
|
|||||||
import { getDocument } from '@/utils/getDocument'
|
import { getDocument } from '@/utils/getDocument'
|
||||||
import normalizePath from './normalizePath'
|
import normalizePath from './normalizePath'
|
||||||
|
|
||||||
const defaultTitle = 'Payload SaaS Starter'
|
const defaultTitle = 'Nextload'
|
||||||
const defaultDescription = 'An open-source website built with Payload and Next.js.'
|
const defaultDescription = 'An open-source website built with Payload and Next.js.'
|
||||||
const siteName = 'Payload SaaS Starter'
|
const siteName = 'Nextload'
|
||||||
|
|
||||||
const defaultOpenGraph: Metadata['openGraph'] = {
|
const defaultOpenGraph: Metadata['openGraph'] = {
|
||||||
type: 'website',
|
type: 'website',
|
||||||
|
Loading…
Reference in New Issue
Block a user