update admin dashboard & landing page editor
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
import type { Block } from 'payload';
|
||||
|
||||
import {
|
||||
defaultLandingCtaContent,
|
||||
defaultLandingFeaturesContent,
|
||||
defaultLandingHeroContent,
|
||||
defaultLandingTechStackContent,
|
||||
} from '../../components/landing/content';
|
||||
|
||||
export const landingPageBlocks: Block[] = [
|
||||
{
|
||||
slug: 'hero',
|
||||
labels: {
|
||||
singular: 'Hero Section',
|
||||
plural: 'Hero Sections',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'badgeEmoji',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingHeroContent.badgeEmoji,
|
||||
},
|
||||
{
|
||||
name: 'badgeText',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingHeroContent.badgeText,
|
||||
},
|
||||
{
|
||||
name: 'headingPrefix',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingHeroContent.headingPrefix,
|
||||
},
|
||||
{
|
||||
name: 'headingHighlight',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingHeroContent.headingHighlight,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingHeroContent.description,
|
||||
},
|
||||
{
|
||||
name: 'primaryCta',
|
||||
label: 'Primary CTA',
|
||||
type: 'group',
|
||||
fields: [
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingHeroContent.primaryCta.label,
|
||||
},
|
||||
{
|
||||
name: 'url',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingHeroContent.primaryCta.url,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'highlights',
|
||||
type: 'array',
|
||||
defaultValue: defaultLandingHeroContent.highlights.map((label) => ({
|
||||
label,
|
||||
})),
|
||||
fields: [
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
slug: 'features',
|
||||
labels: {
|
||||
singular: 'Features Section',
|
||||
plural: 'Features Sections',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'heading',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingFeaturesContent.heading,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingFeaturesContent.description,
|
||||
},
|
||||
{
|
||||
name: 'items',
|
||||
type: 'array',
|
||||
defaultValue: defaultLandingFeaturesContent.items,
|
||||
fields: [
|
||||
{
|
||||
name: 'icon',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
slug: 'techStack',
|
||||
labels: {
|
||||
singular: 'Tech Stack Section',
|
||||
plural: 'Tech Stack Sections',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'heading',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingTechStackContent.heading,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingTechStackContent.description,
|
||||
},
|
||||
{
|
||||
name: 'categories',
|
||||
type: 'array',
|
||||
defaultValue: defaultLandingTechStackContent.categories,
|
||||
fields: [
|
||||
{
|
||||
name: 'category',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'technologies',
|
||||
type: 'array',
|
||||
fields: [
|
||||
{
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
slug: 'cta',
|
||||
labels: {
|
||||
singular: 'CTA Section',
|
||||
plural: 'CTA Sections',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'heading',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingCtaContent.heading,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingCtaContent.description,
|
||||
},
|
||||
{
|
||||
name: 'commandLabel',
|
||||
type: 'text',
|
||||
defaultValue: defaultLandingCtaContent.commandLabel,
|
||||
},
|
||||
{
|
||||
name: 'command',
|
||||
type: 'textarea',
|
||||
defaultValue: defaultLandingCtaContent.command,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user