Use base layout and style
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobias 2024-06-24 08:47:53 +02:00
parent d6fe6446a5
commit f558be2bcd
6 changed files with 25 additions and 34 deletions

View File

@ -1,25 +1,16 @@
import React from 'react'
import './global.css'
/* import { Inter } from 'next/font/google'
const inter = Inter({
subsets: ['latin'],
display: 'swap',
})
*/
/* Our app sits here to not cause any conflicts with payload's root layout */
import Header from '@/components/Header'
import Footer from '@/components/Footer'
const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
{
/* <html className={inter.className}>
<body>{children}</body>
</html>
*/
}
return (
<html>
<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>
</html>
)

View File

@ -12,19 +12,15 @@ interface Props {}
const Page = (props: Props) => {
return (
<>
<main className="flex flex-col gap-4 flex-grow">
<Header />
<h1 className="">Nextload</h1>
<p className="mt-3">
{`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.`}
<br />
{`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.`}
</p>
<section className="mt-4">
<Posts />
</section>
</main>
<Footer />
<h1 className="">Nextload</h1>
<p className="mt-3">
{`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.`}
<br />
{`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.`}
</p>
<section className="mt-4">
<Posts />
</section>
</>
)
}

View File

@ -30,7 +30,7 @@ const Page = async ({ params }: PageArgs) => {
depth: 3,
})
if (!post) notFound()
return <PostPage post={post} />
return <PostPage post={post} locale="en" />
}
export default Page

View File

@ -14,14 +14,14 @@ const AuthorComponent: React.FC<Props> = ({ author }) => {
{typeof author.avatar === 'object' && (
<Image
src={author.avatar.url || ''}
width={150}
height={150}
width={100}
height={10}
alt={author.avatar.alt || ''}
layout="fixed"
/>
)}
<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>
</div>
</div>

View File

@ -1,6 +1,7 @@
import React from 'react'
import { Post } from 'types/payload-types'
import Blocks from './Blocks'
import Author from './Blocks/Author'
interface Props {
post: Post
@ -11,6 +12,9 @@ export default function PostPage(props: Props) {
return (
<article>
<Blocks blocks={props?.post.blocks} locale="en" />
{props?.post.author && typeof props?.post.author !== 'string' && (
<Author author={props?.post.author} />
)}
</article>
)
}

View File

@ -4,9 +4,9 @@ import deepmerge from 'deepmerge'
import { getDocument } from '@/utils/getDocument'
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 siteName = 'Payload SaaS Starter'
const siteName = 'Nextload'
const defaultOpenGraph: Metadata['openGraph'] = {
type: 'website',