feat: add PartnerLogoMark component for dynamic partner logo rendering
This commit is contained in:
@@ -1,111 +0,0 @@
|
||||
import { RequiredDataFromCollectionSlug } from 'payload'
|
||||
|
||||
export const contactForm: RequiredDataFromCollectionSlug<'forms'> = {
|
||||
confirmationMessage: {
|
||||
root: {
|
||||
type: 'root',
|
||||
children: [
|
||||
{
|
||||
type: 'heading',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'The contact form has been submitted successfully.',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
tag: 'h2',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
confirmationType: 'message',
|
||||
createdAt: '2023-01-12T21:47:41.374Z',
|
||||
emails: [
|
||||
{
|
||||
emailFrom: '"Payload" \u003Cdemo@payloadcms.com\u003E',
|
||||
emailTo: '{{email}}',
|
||||
message: {
|
||||
root: {
|
||||
type: 'root',
|
||||
children: [
|
||||
{
|
||||
type: 'paragraph',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'Your contact form submission was successfully received.',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
textFormat: 0,
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
subject: "You've received a new message.",
|
||||
},
|
||||
],
|
||||
fields: [
|
||||
{
|
||||
name: 'full-name',
|
||||
blockName: 'full-name',
|
||||
blockType: 'text',
|
||||
label: 'Full Name',
|
||||
required: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
name: 'email',
|
||||
blockName: 'email',
|
||||
blockType: 'email',
|
||||
label: 'Email',
|
||||
required: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
name: 'phone',
|
||||
blockName: 'phone',
|
||||
blockType: 'number',
|
||||
label: 'Phone',
|
||||
required: false,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
name: 'message',
|
||||
blockName: 'message',
|
||||
blockType: 'textarea',
|
||||
label: 'Message',
|
||||
required: true,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
redirect: undefined,
|
||||
submitButtonLabel: 'Submit',
|
||||
title: 'Contact Form',
|
||||
updatedAt: '2023-01-12T21:47:41.374Z',
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
import type { Form } from '@/payload-types'
|
||||
import { RequiredDataFromCollectionSlug } from 'payload'
|
||||
|
||||
type ContactArgs = {
|
||||
contactForm: Form
|
||||
}
|
||||
|
||||
export const contact: (args: ContactArgs) => RequiredDataFromCollectionSlug<'pages'> = ({
|
||||
contactForm,
|
||||
}) => {
|
||||
return {
|
||||
slug: 'contact',
|
||||
_status: 'published',
|
||||
hero: {
|
||||
type: 'none',
|
||||
},
|
||||
layout: [
|
||||
{
|
||||
blockType: 'formBlock',
|
||||
enableIntro: true,
|
||||
form: contactForm,
|
||||
introContent: {
|
||||
root: {
|
||||
type: 'root',
|
||||
children: [
|
||||
{
|
||||
type: 'heading',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'Example contact form:',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
tag: 'h3',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
title: 'Contact',
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ export const homeStatic: RequiredDataFromCollectionSlug<'pages'> = {
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'Payload Website Template',
|
||||
text: 'Bayerischer Mittelstandspreis',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
@@ -80,8 +80,8 @@ export const homeStatic: RequiredDataFromCollectionSlug<'pages'> = {
|
||||
},
|
||||
},
|
||||
meta: {
|
||||
description: 'An open-source website built with Payload and Next.js.',
|
||||
title: 'Payload Website Template',
|
||||
description: 'Der Preis für herausragenden Mittelstand in Bayern.',
|
||||
title: 'Bayerischer Mittelstandspreis',
|
||||
},
|
||||
title: 'Home',
|
||||
layout: [],
|
||||
|
||||
@@ -47,7 +47,7 @@ export const home: (args: HomeArgs) => RequiredDataFromCollectionSlug<'pages'> =
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'Payload Website Template',
|
||||
text: 'Bayerischer Mittelstandspreis',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
@@ -513,62 +513,6 @@ export const home: (args: HomeArgs) => RequiredDataFromCollectionSlug<'pages'> =
|
||||
blockType: 'mediaBlock',
|
||||
media: metaImage.id,
|
||||
},
|
||||
{
|
||||
blockName: 'Archive Block',
|
||||
blockType: 'archive',
|
||||
categories: [],
|
||||
introContent: {
|
||||
root: {
|
||||
type: 'root',
|
||||
children: [
|
||||
{
|
||||
type: 'heading',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'Recent posts',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
tag: 'h3',
|
||||
version: 1,
|
||||
},
|
||||
{
|
||||
type: 'paragraph',
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
detail: 0,
|
||||
format: 0,
|
||||
mode: 'normal',
|
||||
style: '',
|
||||
text: 'The posts below are displayed in an "Archive" layout building block which is an extremely powerful way to display documents on a page. It can be auto-populated by collection or by category, or posts can be individually selected. Pagination controls will automatically appear if the number of results exceeds the number of items per page.',
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
textFormat: 0,
|
||||
version: 1,
|
||||
},
|
||||
],
|
||||
direction: 'ltr',
|
||||
format: '',
|
||||
indent: 0,
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
populateBy: 'collection',
|
||||
relationTo: 'posts',
|
||||
},
|
||||
{
|
||||
blockName: 'CTA',
|
||||
blockType: 'cta',
|
||||
@@ -666,9 +610,9 @@ export const home: (args: HomeArgs) => RequiredDataFromCollectionSlug<'pages'> =
|
||||
},
|
||||
],
|
||||
meta: {
|
||||
description: 'An open-source website built with Payload and Next.js.',
|
||||
description: 'Der Preis für herausragenden Mittelstand in Bayern.',
|
||||
image: heroImage.id,
|
||||
title: 'Payload Website Template',
|
||||
title: 'Bayerischer Mittelstandspreis',
|
||||
},
|
||||
title: 'Home',
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import type { CollectionSlug, GlobalSlug, Payload, PayloadRequest, File } from 'payload'
|
||||
|
||||
import { contactForm as contactFormData } from './contact-form'
|
||||
import { contact as contactPageData } from './contact-page'
|
||||
import { home } from './home'
|
||||
import { image1 } from './image-1'
|
||||
import { image2 } from './image-2'
|
||||
@@ -14,19 +12,13 @@ import { defaultFooterData, defaultHeaderData } from '@/spa/cmsNavigation'
|
||||
import { defaultSiteSettings } from '@/spa/siteSettings'
|
||||
|
||||
const collections: CollectionSlug[] = [
|
||||
'categories',
|
||||
'media',
|
||||
'pages',
|
||||
'posts',
|
||||
'forms',
|
||||
'form-submissions',
|
||||
'search',
|
||||
]
|
||||
|
||||
const globals: GlobalSlug[] = ['header', 'footer', 'site-settings', 'application-phase']
|
||||
|
||||
const categories = ['Technology', 'News', 'Finance', 'Design', 'Software', 'Engineering']
|
||||
|
||||
// Next.js revalidation errors are normal when seeding the database without a server running
|
||||
// i.e. running `yarn seed` locally instead of using the admin UI within an active app
|
||||
// The app is not running to revalidate the pages and so the API routes are not available
|
||||
@@ -128,15 +120,6 @@ export const seed = async ({
|
||||
data: imageHero1,
|
||||
file: hero1Buffer,
|
||||
}),
|
||||
categories.map((category) =>
|
||||
payload.create({
|
||||
collection: 'categories',
|
||||
data: {
|
||||
title: category,
|
||||
slug: category,
|
||||
},
|
||||
}),
|
||||
),
|
||||
])
|
||||
|
||||
payload.logger.info(`— Seeding posts...`)
|
||||
@@ -193,14 +176,6 @@ export const seed = async ({
|
||||
},
|
||||
})
|
||||
|
||||
payload.logger.info(`— Seeding contact form...`)
|
||||
|
||||
const contactForm = await payload.create({
|
||||
collection: 'forms',
|
||||
depth: 0,
|
||||
data: contactFormData,
|
||||
})
|
||||
|
||||
payload.logger.info(`— Seeding pages...`)
|
||||
|
||||
await Promise.all([
|
||||
@@ -209,11 +184,6 @@ export const seed = async ({
|
||||
depth: 0,
|
||||
data: home({ heroImage: imageHomeDoc, metaImage: image2Doc }),
|
||||
}),
|
||||
payload.create({
|
||||
collection: 'pages',
|
||||
depth: 0,
|
||||
data: contactPageData({ contactForm: contactForm }),
|
||||
}),
|
||||
])
|
||||
|
||||
payload.logger.info(`— Seeding globals...`)
|
||||
|
||||
Reference in New Issue
Block a user