feat: add PartnerLogoMark component for dynamic partner logo rendering

This commit is contained in:
syntaxbullet
2026-07-01 11:39:45 +02:00
parent 1bc1f31940
commit 2fda7e8122
72 changed files with 99921 additions and 3421 deletions

View File

@@ -92,9 +92,13 @@ export const homeFields: Field[] = [
text('partnersLabel', 'Partner ticker label', homeContent.hero.partnersLabel),
{
name: 'partners',
label: 'Partner ticker names',
label: 'Fallback partner ticker names',
type: 'array',
defaultValue: homeContent.hero.partners,
admin: {
description:
'Used only if partner collection records are unavailable. The frontend prefers the real logo uploads from the Partners collection.',
},
fields: [text('name', 'Name')],
},
],

View File

@@ -2,10 +2,8 @@ import type { CollectionConfig } from 'payload'
import { authenticated } from '../../access/authenticated'
import { authenticatedOrPublished } from '../../access/authenticatedOrPublished'
import { Archive } from '../../blocks/ArchiveBlock/config'
import { CallToAction } from '../../blocks/CallToAction/config'
import { Content } from '../../blocks/Content/config'
import { FormBlock } from '../../blocks/Form/config'
import { MediaBlock } from '../../blocks/MediaBlock/config'
import { hero } from '@/heros/config'
import { aboutFields } from './aboutFields'
@@ -135,6 +133,10 @@ const isManagedSpaPage = (_: unknown, siblingData?: { slug?: string; spaPath?: s
export const Pages: CollectionConfig<'pages'> = {
slug: 'pages',
labels: {
singular: 'Seite',
plural: 'Seiten',
},
access: {
create: authenticated,
delete: authenticated,
@@ -150,6 +152,7 @@ export const Pages: CollectionConfig<'pages'> = {
},
admin: {
defaultColumns: ['title', 'spaPath', 'slug', 'updatedAt'],
group: 'Inhalte',
livePreview: {
url: ({ data, req }) =>
generatePreviewPath({
@@ -190,7 +193,7 @@ export const Pages: CollectionConfig<'pages'> = {
{
name: 'layout',
type: 'blocks',
blocks: [CallToAction, Content, MediaBlock, Archive, FormBlock],
blocks: [CallToAction, Content, MediaBlock],
required: true,
admin: {
initCollapsed: true,

View File

@@ -58,46 +58,9 @@ const juryMemberFields: Field[] = [
const rowFields: Field[] = [text('num', 'Number'), text('label', 'Label'), textarea('body', 'Body')]
const partnerFields: Field[] = [
text('stableId', 'Stable ID'),
text('name', 'Name'),
text('role', 'Role'),
numberField('tier', 'Tier'),
textarea('desc', 'Short description'),
textarea('fullDesc', 'Full modal description'),
{
name: 'logoKind',
label: 'Logo style',
type: 'select',
defaultValue: 'text',
options: [
{ label: 'Text', value: 'text' },
{ label: 'Serif text', value: 'serif' },
{ label: 'Badge', value: 'badge' },
{ label: 'Monogram', value: 'monogram' },
{ label: 'Dot mark', value: 'dot' },
{ label: 'Leaf mark', value: 'leaf' },
{ label: 'RSM blocks', value: 'rsm' },
{ label: 'Deutsche Bank mark', value: 'deutschebank' },
],
},
text('logoText', 'Logo text'),
text('logoSubtext', 'Logo subtext'),
text('logoColor', 'Logo color'),
text('industry', 'Industry'),
text('location', 'Location'),
text('website', 'Website'),
text('linkedin', 'LinkedIn URL'),
text('heroImg', 'Modal hero image URL'),
]
const benefitFields: Field[] = [text('num', 'Number'), text('label', 'Label'), text('sub', 'Subline')]
const packageFields: Field[] = [text('value', 'Value'), text('title', 'Title'), textarea('desc', 'Description')]
const formStepFields: Field[] = [text('label', 'Label')]
const partnerDefaults = netzwerkContent.partners.items.map(({ id, ...partner }) => ({
...partner,
stableId: id,
}))
export const netzwerkFields: Field[] = [
{
@@ -220,7 +183,7 @@ export const netzwerkFields: Field[] = [
name: 'partners',
label: '06 · Partners',
type: 'group',
admin: sectionAdmin('Partner section, tier labels, partner records, and modal labels.'),
admin: sectionAdmin('Partner section copy, tier labels, and modal labels. Partner records are managed in the Partners collection.'),
fields: [
text('eyebrow', 'Eyebrow', netzwerkContent.partners.eyebrow),
textarea('heading', 'Heading', netzwerkContent.partners.heading),
@@ -251,14 +214,6 @@ export const netzwerkFields: Field[] = [
text('footerRolePrefix', 'Footer role prefix', netzwerkContent.partners.modal.footerRolePrefix),
],
},
{
name: 'items',
label: 'Partners',
type: 'array',
dbName: 'network_partners',
defaultValue: partnerDefaults,
fields: partnerFields,
},
],
},
{