UI changes:
- Locations section: replace 3D coverflow with draggable card stack (framer-motion), auto-advance 4s, dot navigation
- Footer: orange gradient matching header, dark green text for readability
- VideoSection: orange box-shadow glow around video block, green wave pattern preserved
Bug fixes:
- fix(revalidate): SECRET empty check was blocking all CMS cache invalidations on prod
- fix(revalidate): location pages now revalidate /lokatsii/{slug} + /lokatsii + layout
- fix(revalidate): blog posts revalidate /blog/{slug} + /blog
- fix(pages): add dynamicParams=true to /[slug] and /lokatsii/[slug] for post-build new entries
- fix(lokatsii): dynamic DETAIL_HREF — new locations with showDetailPage:true auto-get detail button
- fix(combo): cursor:pointer on combo ticket cards
- fix(blog): add EXPERIMENTAL_TableFeature to Lexical editor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
62 lines
1.9 KiB
TypeScript
62 lines
1.9 KiB
TypeScript
import type { CollectionConfig } from 'payload'
|
|
import { lexicalEditor, EXPERIMENTAL_TableFeature } from '@payloadcms/richtext-lexical'
|
|
import { isAdminOrEditor } from '@/access/isAdminOrEditor'
|
|
import { isAuthenticatedOrPublished } from '@/access/isAuthenticatedOrPublished'
|
|
import { slugifyBeforeChange } from '@/hooks/slugify'
|
|
import { revalidateAfterChange } from '@/hooks/revalidatePath'
|
|
|
|
export const BlogPosts: CollectionConfig = {
|
|
slug: 'blog-posts',
|
|
admin: {
|
|
useAsTitle: 'title',
|
|
defaultColumns: ['title', 'slug', 'status', 'publishedAt', 'updatedAt'],
|
|
group: 'Блог',
|
|
},
|
|
versions: { drafts: true },
|
|
access: {
|
|
read: isAuthenticatedOrPublished,
|
|
create: isAdminOrEditor,
|
|
update: isAdminOrEditor,
|
|
delete: isAdminOrEditor,
|
|
},
|
|
hooks: {
|
|
beforeChange: [slugifyBeforeChange],
|
|
afterChange: [revalidateAfterChange],
|
|
},
|
|
fields: [
|
|
{ name: 'title', type: 'text', required: true },
|
|
{
|
|
name: 'slug',
|
|
type: 'text',
|
|
unique: true,
|
|
index: true,
|
|
admin: { readOnly: true, position: 'sidebar' },
|
|
},
|
|
{
|
|
name: 'publishedAt',
|
|
type: 'date',
|
|
admin: { position: 'sidebar', date: { pickerAppearance: 'dayAndTime' } },
|
|
},
|
|
{ name: 'hero', type: 'upload', relationTo: 'media' },
|
|
{
|
|
name: 'body',
|
|
type: 'richText',
|
|
editor: lexicalEditor({
|
|
features: ({ defaultFeatures }) => [...defaultFeatures, EXPERIMENTAL_TableFeature()],
|
|
}),
|
|
},
|
|
{ name: 'excerpt', type: 'textarea' },
|
|
{ name: 'categories', type: 'relationship', relationTo: 'categories', hasMany: true },
|
|
{ name: 'tags', type: 'relationship', relationTo: 'tags', hasMany: true },
|
|
{
|
|
name: 'status',
|
|
type: 'select',
|
|
defaultValue: 'draft',
|
|
options: [
|
|
{ label: 'Draft', value: 'draft' },
|
|
{ label: 'Published', value: 'published' },
|
|
],
|
|
admin: { position: 'sidebar' },
|
|
},
|
|
],
|
|
}
|