feat: payload cms

This commit is contained in:
2026-02-26 01:32:22 +01:00
parent 1963a93123
commit 7d65237ee9
67 changed files with 3179 additions and 760 deletions

View File

@@ -0,0 +1,48 @@
import { Block } from 'payload';
export const CategoryGrid: Block = {
slug: 'categoryGrid',
interfaceName: 'CategoryGridBlock',
fields: [
{
name: 'categories',
type: 'array',
required: true,
minRows: 1,
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'description',
type: 'textarea',
required: false,
},
{
name: 'image',
type: 'upload',
relationTo: 'media',
required: false,
},
{
name: 'icon',
type: 'upload',
relationTo: 'media',
required: false,
},
{
name: 'href',
type: 'text',
required: true,
},
{
name: 'ctaLabel',
type: 'text',
required: false,
},
],
},
],
};

View File

@@ -0,0 +1,54 @@
import { Block } from 'payload';
export const TeamLegacySection: Block = {
slug: 'teamLegacySection',
interfaceName: 'TeamLegacySectionBlock',
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'subtitle',
type: 'text',
required: true,
},
{
name: 'paragraph1',
type: 'textarea',
required: true,
},
{
name: 'paragraph2',
type: 'textarea',
required: true,
},
{
name: 'expertiseTitle',
type: 'text',
required: true,
},
{
name: 'expertiseDesc',
type: 'text',
required: true,
},
{
name: 'networkTitle',
type: 'text',
required: true,
},
{
name: 'networkDesc',
type: 'text',
required: true,
},
{
name: 'backgroundImage',
type: 'upload',
relationTo: 'media',
required: false,
},
],
};

View File

@@ -0,0 +1,26 @@
import { Block } from 'payload';
export const ContactSection: Block = {
slug: 'contactSection',
interfaceName: 'ContactSectionBlock',
fields: [
{
name: 'showForm',
type: 'checkbox',
defaultValue: true,
label: 'Show Contact Form',
},
{
name: 'showMap',
type: 'checkbox',
defaultValue: true,
label: 'Show Map',
},
{
name: 'showHours',
type: 'checkbox',
defaultValue: true,
label: 'Show Opening Hours',
},
],
};

View File

@@ -0,0 +1,48 @@
import { Block } from 'payload';
export const HeroSection: Block = {
slug: 'heroSection',
interfaceName: 'HeroSectionBlock',
fields: [
{
name: 'badge',
type: 'text',
required: false,
},
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'subtitle',
type: 'textarea',
required: false,
},
{
name: 'backgroundImage',
type: 'upload',
relationTo: 'media',
required: false,
},
{
name: 'ctaLabel',
type: 'text',
required: false,
},
{
name: 'ctaHref',
type: 'text',
required: false,
},
{
name: 'alignment',
type: 'select',
defaultValue: 'left',
options: [
{ label: 'Left', value: 'left' },
{ label: 'Center', value: 'center' },
],
},
],
};

View File

@@ -0,0 +1,141 @@
import { Block } from 'payload';
export const HomeHero: Block = {
slug: 'homeHero',
interfaceName: 'HomeHeroBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
{ name: 'ctaLabel', type: 'text', localized: true },
{ name: 'secondaryCtaLabel', type: 'text', localized: true },
],
};
export const HomeProductCategories: Block = {
slug: 'homeProductCategories',
interfaceName: 'HomeProductCategoriesBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
],
};
export const HomeWhatWeDo: Block = {
slug: 'homeWhatWeDo',
interfaceName: 'HomeWhatWeDoBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
{ name: 'expertiseLabel', type: 'text', localized: true },
{ name: 'quote', type: 'textarea', localized: true },
{
name: 'items',
type: 'array',
localized: true,
fields: [
{ name: 'title', type: 'text' },
{ name: 'description', type: 'textarea' },
],
},
],
};
export const HomeRecentPosts: Block = {
slug: 'homeRecentPosts',
interfaceName: 'HomeRecentPostsBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
],
};
export const HomeExperience: Block = {
slug: 'homeExperience',
interfaceName: 'HomeExperienceBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
{ name: 'paragraph1', type: 'textarea', localized: true },
{ name: 'paragraph2', type: 'textarea', localized: true },
{ name: 'badge1', type: 'text', localized: true },
{ name: 'badge1Text', type: 'text', localized: true },
{ name: 'badge2', type: 'text', localized: true },
{ name: 'badge2Text', type: 'text', localized: true },
],
};
export const HomeWhyChooseUs: Block = {
slug: 'homeWhyChooseUs',
interfaceName: 'HomeWhyChooseUsBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
{ name: 'tagline', type: 'text', localized: true },
{
name: 'features',
type: 'array',
localized: true,
fields: [{ name: 'feature', type: 'text' }],
},
{
name: 'items',
type: 'array',
localized: true,
fields: [
{ name: 'title', type: 'text' },
{ name: 'description', type: 'textarea' },
],
},
],
};
export const HomeMeetTheTeam: Block = {
slug: 'homeMeetTheTeam',
interfaceName: 'HomeMeetTheTeamBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
{ name: 'description', type: 'textarea', localized: true },
{ name: 'ctaLabel', type: 'text', localized: true },
{ name: 'networkLabel', type: 'text', localized: true },
],
};
export const HomeGallery: Block = {
slug: 'homeGallery',
interfaceName: 'HomeGalleryBlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
],
};
export const HomeVideo: Block = {
slug: 'homeVideo',
interfaceName: 'HomeVideoBlock',
fields: [{ name: 'title', type: 'text', localized: true }],
};
export const HomeCTA: Block = {
slug: 'homeCTA',
interfaceName: 'HomeCTABlock',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'subtitle', type: 'text', localized: true },
{ name: 'description', type: 'textarea', localized: true },
{ name: 'buttonLabel', type: 'text', localized: true },
],
};
export const homeBlocksArray = [
HomeHero,
HomeProductCategories,
HomeWhatWeDo,
HomeRecentPosts,
HomeExperience,
HomeWhyChooseUs,
HomeMeetTheTeam,
HomeGallery,
HomeVideo,
HomeCTA,
];

View File

@@ -0,0 +1,27 @@
import { Block } from 'payload';
export const ImageGallery: Block = {
slug: 'imageGallery',
interfaceName: 'ImageGalleryBlock',
fields: [
{
name: 'images',
type: 'array',
required: true,
minRows: 1,
fields: [
{
name: 'image',
type: 'upload',
relationTo: 'media',
required: true,
},
{
name: 'alt',
type: 'text',
required: false,
},
],
},
],
};

View File

@@ -0,0 +1,41 @@
import { Block } from 'payload';
export const ManifestoGrid: Block = {
slug: 'manifestoGrid',
interfaceName: 'ManifestoGridBlock',
fields: [
{
name: 'title',
type: 'text',
required: false,
},
{
name: 'subtitle',
type: 'text',
required: false,
},
{
name: 'tagline',
type: 'textarea',
required: false,
},
{
name: 'items',
type: 'array',
required: true,
minRows: 1,
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'description',
type: 'textarea',
required: true,
},
],
},
],
};

View File

@@ -0,0 +1,28 @@
import { Block } from 'payload';
export const SupportCTA: Block = {
slug: 'supportCTA',
interfaceName: 'SupportCTABlock',
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'description',
type: 'textarea',
required: true,
},
{
name: 'buttonLabel',
type: 'text',
required: true,
},
{
name: 'buttonHref',
type: 'text',
required: true,
},
],
};

View File

@@ -0,0 +1,62 @@
import { Block } from 'payload';
export const TeamProfile: Block = {
slug: 'teamProfile',
interfaceName: 'TeamProfileBlock',
fields: [
{
name: 'name',
type: 'text',
required: true,
},
{
name: 'role',
type: 'text',
required: true,
},
{
name: 'quote',
type: 'textarea',
required: false,
},
{
name: 'description',
type: 'textarea',
required: false,
},
{
name: 'image',
type: 'upload',
relationTo: 'media',
required: false,
},
{
name: 'linkedinUrl',
type: 'text',
required: false,
},
{
name: 'linkedinLabel',
type: 'text',
required: false,
},
{
name: 'layout',
type: 'select',
defaultValue: 'imageRight',
options: [
{ label: 'Image Right', value: 'imageRight' },
{ label: 'Image Left', value: 'imageLeft' },
],
},
{
name: 'colorScheme',
type: 'select',
defaultValue: 'dark',
options: [
{ label: 'Dark', value: 'dark' },
{ label: 'Light', value: 'light' },
],
},
],
};

View File

@@ -1,27 +1,41 @@
import { AnimatedImage } from './AnimatedImage';
import { Callout } from './Callout';
import { CategoryGrid } from './CategoryGrid';
import { ChatBubble } from './ChatBubble';
import { ComparisonGrid } from './ComparisonGrid';
import { ContactSection } from './ContactSection';
import { HeroSection } from './HeroSection';
import { HighlightBox } from './HighlightBox';
import { ImageGallery } from './ImageGallery';
import { ManifestoGrid } from './ManifestoGrid';
import { PowerCTA } from './PowerCTA';
import { ProductTabs } from './ProductTabs';
import { SplitHeading } from './SplitHeading';
import { Stats } from './Stats';
import { StickyNarrative } from './StickyNarrative';
import { TeamProfile } from './TeamProfile';
import { TechnicalGrid } from './TechnicalGrid';
import { VisualLinkPreview } from './VisualLinkPreview';
import { homeBlocksArray } from './HomeBlocks';
export const payloadBlocks = [
...homeBlocksArray,
AnimatedImage,
Callout,
CategoryGrid,
ChatBubble,
ComparisonGrid,
ContactSection,
HeroSection,
HighlightBox,
ImageGallery,
ManifestoGrid,
PowerCTA,
ProductTabs,
SplitHeading,
Stats,
StickyNarrative,
TeamProfile,
TechnicalGrid,
VisualLinkPreview,
];