Update to use payload for landing page
This commit is contained in:
10
apps/next/src/payload/collections/users.ts
Normal file
10
apps/next/src/payload/collections/users.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { CollectionConfig } from 'payload';
|
||||
|
||||
export const Users: CollectionConfig = {
|
||||
slug: 'users',
|
||||
auth: true,
|
||||
admin: {
|
||||
useAsTitle: 'email',
|
||||
},
|
||||
fields: [],
|
||||
};
|
||||
203
apps/next/src/payload/globals/landing-page.ts
Normal file
203
apps/next/src/payload/globals/landing-page.ts
Normal file
@@ -0,0 +1,203 @@
|
||||
import type { GlobalConfig } from 'payload';
|
||||
|
||||
import { defaultLandingPageContent } from '../../components/landing/content';
|
||||
|
||||
export const LandingPage: GlobalConfig = {
|
||||
slug: 'landing-page',
|
||||
label: 'Landing Page',
|
||||
access: {
|
||||
read: () => true,
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
label: 'Hero',
|
||||
fields: [
|
||||
{
|
||||
name: 'hero',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{
|
||||
name: 'badgeEmoji',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.hero.badgeEmoji,
|
||||
},
|
||||
{
|
||||
name: 'badgeText',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.hero.badgeText,
|
||||
},
|
||||
{
|
||||
name: 'headingPrefix',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.hero.headingPrefix,
|
||||
},
|
||||
{
|
||||
name: 'headingHighlight',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.hero.headingHighlight,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingPageContent.hero.description,
|
||||
},
|
||||
{
|
||||
name: 'primaryCta',
|
||||
label: 'Primary CTA',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
defaultValue:
|
||||
defaultLandingPageContent.hero.primaryCta.label,
|
||||
},
|
||||
{
|
||||
name: 'url',
|
||||
type: 'text',
|
||||
defaultValue:
|
||||
defaultLandingPageContent.hero.primaryCta.url,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'highlights',
|
||||
type: 'array',
|
||||
defaultValue: defaultLandingPageContent.hero.highlights.map(
|
||||
(label) => ({ label }),
|
||||
),
|
||||
fields: [
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Features',
|
||||
fields: [
|
||||
{
|
||||
name: 'features',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{
|
||||
name: 'heading',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.features.heading,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingPageContent.features.description,
|
||||
},
|
||||
{
|
||||
name: 'items',
|
||||
type: 'array',
|
||||
defaultValue: defaultLandingPageContent.features.items,
|
||||
fields: [
|
||||
{
|
||||
name: 'icon',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Tech Stack',
|
||||
fields: [
|
||||
{
|
||||
name: 'techStack',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{
|
||||
name: 'heading',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.techStack.heading,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingPageContent.techStack.description,
|
||||
},
|
||||
{
|
||||
name: 'categories',
|
||||
type: 'array',
|
||||
defaultValue: defaultLandingPageContent.techStack.categories,
|
||||
fields: [
|
||||
{
|
||||
name: 'category',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'technologies',
|
||||
type: 'array',
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'CTA',
|
||||
fields: [
|
||||
{
|
||||
name: 'cta',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{
|
||||
name: 'heading',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.cta.heading,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingPageContent.cta.description,
|
||||
},
|
||||
{
|
||||
name: 'commandLabel',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingPageContent.cta.commandLabel,
|
||||
},
|
||||
{
|
||||
name: 'command',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingPageContent.cta.command,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user