From d3141187ee2a3214248b407797627b3e64147fbb Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 4 May 2026 14:48:04 +0200 Subject: [PATCH] feat: migrate Payload CMS to MDX and harden static infrastructure --- app/(payload)/admin/[[...segments]]/page.tsx | 17 - app/(payload)/admin/importMap.js | 57 - app/(payload)/api/[...slug]/route.ts | 14 - app/(payload)/api/graphql/route.ts | 4 - app/(payload)/custom.scss | 151 - app/(payload)/layout.tsx | 31 - app/[locale]/[slug]/page.tsx | 6 +- app/[locale]/blog/[slug]/page.tsx | 4 +- app/[locale]/layout.tsx | 4 - app/[locale]/not-found.tsx | 66 +- app/[locale]/products/[...slug]/page.tsx | 83 +- app/actions/contact.ts | 38 +- app/api/health/cms/route.ts | 41 - app/api/health/fix-avb-now/route.ts | 25 - app/api/pages/[slug]/pdf/route.tsx | 111 - app/health/fix-avb/route.ts | 16 - check-data.ts | 39 - components/AgbHistoryBlock.tsx | 36 +- components/CMSConnectivityNotice.tsx | 84 - components/Footer.tsx | 1 + components/Header.tsx | 10 +- components/MDXContent.tsx | 41 + components/PayloadRichText.tsx | 1203 -------- content/pages/agbs.mdx | 253 ++ content/pages/blog.mdx | 23 + content/pages/datenschutz.mdx | 59 + content/pages/impressum.mdx | 34 + content/pages/kontakt.mdx | 16 + content/pages/produkte.mdx | 14 + content/pages/start.mdx | 32 + content/pages/team.mdx | 22 + ...r-mit-der-richtigen-kabelinfrastruktur.mdx | 92 + ...neuerbare-energien-im-jahr-2025-wissen.mdx | 98 + ...raft-und-solar-jetzt-bei-uns-bestellen.mdx | 77 + ...-des-fundamentes-moderner-energienetze.mdx | 122 + ...-sparen-sie-sich-unnoetige-rueckfragen.mdx | 86 + ...giewende-herausforderungen-und-chancen.mdx | 77 + ...ginnt-unter-der-erde-und-zwar-mit-plan.mdx | 72 + ...t-als-senior-key-account-manager-durch.mdx | 97 + ...der-schluessel-zur-richtigen-kabelwahl.mdx | 79 + ...ie-grundlage-der-kabelzuverlaessigkeit.mdx | 359 +++ ...r-tun-muessen-um-das-ziel-zu-erreichen.mdx | 120 + ...klz-im-adressbuch-der-windenergie-2025.mdx | 49 + ...eue-staerke-im-bereich-financial-sales.mdx | 90 + ...n-windparks-was-lohnt-sich-langfristig.mdx | 116 + ...frastruktur-der-kabel-boom-steht-bevor.mdx | 66 + ...2y-mittelspannungskabel-energieprojekt.mdx | 160 + ...ileiter-mittelspannungskabel-lieferbar.mdx | 92 + ...itung-ein-schritt-zur-energiewende-ist.mdx | 117 + ...eln-nachhaltigkeit-im-windkraftprojekt.mdx | 80 + ...icht-ein-blick-hinter-die-schlagzeilen.mdx | 97 + ...meln-unfallfrei-und-effizient-arbeiten.mdx | 155 + ...e-kabel-fuer-ihr-naechstes-projekt-aus.mdx | 66 + ...energiewirtschaft-in-naher-zukunft-aus.mdx | 118 + ...-geheime-held-der-gruenen-energie-sind.mdx | 100 + ...tremen-belastungen-standhalten-muessen.mdx | 98 + ...es-kabel-aus-finden-sie-es-hier-heraus.mdx | 140 + ...on-nieder-bis-hoechstspannung-erklaert.mdx | 144 + ...t-und-erneuerbare-energien-vorantreibt.mdx | 70 + ...von-klz-unsere-neue-website-ist-online.mdx | 77 + ...s-drei-typische-kabelherausforderungen.mdx | 94 + ...k-unser-solarkabel-zur-intersolar-2025.mdx | 98 + content/products/h1z2z2-k.mdx | 118 + content/products/n2x2y.mdx | 118 + content/products/n2xfk2y.mdx | 45 + content/products/n2xfkld2y.mdx | 46 + content/products/n2xs2y.mdx | 117 + content/products/n2xsf2y.mdx | 117 + content/products/n2xsfl2y-hv.mdx | 117 + content/products/n2xsfl2y-mv.mdx | 117 + content/products/n2xsy.mdx | 117 + content/products/n2xy.mdx | 118 + content/products/na2x2y.mdx | 118 + content/products/na2xfk2y.mdx | 45 + content/products/na2xfkld2y.mdx | 45 + content/products/na2xs2y.mdx | 117 + content/products/na2xsf2y.mdx | 118 + content/products/na2xsfl2y-hv.mdx | 117 + content/products/na2xsfl2y-mv.mdx | 118 + content/products/na2xsy.mdx | 119 + content/products/na2xy.mdx | 117 + content/products/nay2y.mdx | 119 + content/products/naycwy.mdx | 118 + content/products/nayy.mdx | 118 + content/products/ny2y.mdx | 118 + content/products/nycwy.mdx | 119 + content/products/nyy.mdx | 118 + lib/blog.ts | 199 +- lib/pages.ts | 159 +- lib/products.ts | 207 +- lib/services/logging/pino-logger-service.ts | 8 - messages/de.json | 2 +- messages/en.json | 6 +- next.config.mjs | 19 +- package.json | 19 +- payload-types.ts | 1018 ------- payload.config.ts | 105 - pnpm-lock.yaml | 2664 ++++------------- public/AGB KLZ 3-2026.pdf | Bin 0 -> 187954 bytes public/KLZ 11-24 agbs.pdf | Bin 0 -> 219044 bytes scripts/backup-db.sh | 47 - scripts/check-pages.ts | 14 - scripts/check-start.ts | 14 - scripts/check-team.ts | 14 - scripts/cms-sync.sh | 315 -- scripts/convert-lexical-to-md.ts | 125 + scripts/fix-media-urls.ts | 26 + scripts/generate-pdf-datasheets.ts | 329 -- scripts/migrate-visual-links.ts | 80 + scripts/restore-db.sh | 54 - scripts/seed-home.ts | 131 - scripts/seed-pages.ts | 242 -- scripts/seed-payload.ts | 22 - scripts/test-rich-text.js | 14 - scripts/update-cms-avb.ts | 37 - .../20260223_195005_products_collection.json | 2621 ---------------- .../20260223_195005_products_collection.ts | 356 --- .../20260223_195151_remove_sku_unique.json | 2591 ---------------- .../20260223_195151_remove_sku_unique.ts | 13 - .../20260225_003500_add_pages_collection.ts | 48 - .../20260225_175000_native_localization.ts | 285 -- ...20260305_215000_products_featured_image.ts | 52 - .../20260312_120000_pages_redirect_fields.ts | 22 - .../20260427_123000_add_agbs_collection.ts | 56 - src/migrations/index.ts | 46 - src/payload-generated-schema.ts | 1112 ------- src/payload/blocks/AgbHistory.ts | 18 - src/payload/blocks/AnimatedImage.ts | 25 - src/payload/blocks/Callout.ts | 20 - src/payload/blocks/CategoryGrid.ts | 48 - src/payload/blocks/ChatBubble.ts | 34 - src/payload/blocks/CompanyHeritage.ts | 54 - src/payload/blocks/ComparisonGrid.ts | 47 - src/payload/blocks/ContactSection.ts | 26 - src/payload/blocks/HeroSection.ts | 48 - src/payload/blocks/HighlightBox.ts | 20 - src/payload/blocks/HomeBlocks.ts | 141 - src/payload/blocks/ImageGallery.ts | 27 - src/payload/blocks/ManifestoGrid.ts | 41 - src/payload/blocks/PDFDownload.ts | 30 - src/payload/blocks/PowerCTA.ts | 12 - src/payload/blocks/ProductTabs.ts | 107 - src/payload/blocks/SplitHeading.ts | 23 - src/payload/blocks/Stats.ts | 25 - src/payload/blocks/StickyNarrative.ts | 31 - src/payload/blocks/SupportCTA.ts | 28 - src/payload/blocks/TeamProfile.ts | 62 - src/payload/blocks/TechnicalGrid.ts | 30 - src/payload/blocks/VisualLinkPreview.ts | 30 - src/payload/blocks/allBlocks.ts | 45 - src/payload/collections/Agbs.ts | 49 - src/payload/collections/FormSubmissions.ts | 77 - src/payload/collections/Media.ts | 48 - src/payload/collections/Pages.ts | 117 - src/payload/collections/Posts.ts | 138 - src/payload/collections/Products.ts | 135 - src/payload/collections/Users.ts | 12 - src/payload/components/Icon.tsx | 12 - src/payload/components/Logo.tsx | 12 - src/payload/seed.ts | 44 - src/payload/utils/lexicalParser.ts | 375 --- tests/contact-action.test.ts | 110 + tests/contact-form.e2e.test.ts | 53 + tests/image-performance.test.ts | 23 + tests/translation-links.test.ts | 46 + 165 files changed, 7654 insertions(+), 16136 deletions(-) delete mode 100644 app/(payload)/admin/[[...segments]]/page.tsx delete mode 100644 app/(payload)/admin/importMap.js delete mode 100644 app/(payload)/api/[...slug]/route.ts delete mode 100644 app/(payload)/api/graphql/route.ts delete mode 100644 app/(payload)/custom.scss delete mode 100644 app/(payload)/layout.tsx delete mode 100644 app/api/health/cms/route.ts delete mode 100644 app/api/health/fix-avb-now/route.ts delete mode 100644 app/api/pages/[slug]/pdf/route.tsx delete mode 100644 app/health/fix-avb/route.ts delete mode 100644 check-data.ts delete mode 100644 components/CMSConnectivityNotice.tsx create mode 100644 components/MDXContent.tsx delete mode 100644 components/PayloadRichText.tsx create mode 100644 content/pages/agbs.mdx create mode 100644 content/pages/blog.mdx create mode 100644 content/pages/datenschutz.mdx create mode 100644 content/pages/impressum.mdx create mode 100644 content/pages/kontakt.mdx create mode 100644 content/pages/produkte.mdx create mode 100644 content/pages/start.mdx create mode 100644 content/pages/team.mdx create mode 100644 content/posts/100-erneuerbare-energie-nur-mit-der-richtigen-kabelinfrastruktur.mdx create mode 100644 content/posts/das-muessen-sie-ueber-erneuerbare-energien-im-jahr-2025-wissen.mdx create mode 100644 content/posts/die-besten-erdkabel-fuer-windkraft-und-solar-jetzt-bei-uns-bestellen.mdx create mode 100644 content/posts/die-kunst-der-kabellogistik-der-transport-des-fundamentes-moderner-energienetze.mdx create mode 100644 content/posts/die-perfekte-kabelanfrage-so-sparen-sie-sich-unnoetige-rueckfragen.mdx create mode 100644 content/posts/erkenntnisse-ueber-die-gruene-energiewende-herausforderungen-und-chancen.mdx create mode 100644 content/posts/gruene-energie-beginnt-unter-der-erde-und-zwar-mit-plan.mdx create mode 100644 content/posts/johannes-gleich-startet-als-senior-key-account-manager-durch.mdx create mode 100644 content/posts/kabelabkuerzungen-entschluesselt-der-schluessel-zur-richtigen-kabelwahl.mdx create mode 100644 content/posts/kabeltrommelqualitaet-die-grundlage-der-kabelzuverlaessigkeit.mdx create mode 100644 content/posts/klimaneutral-bis-2050-was-wir-tun-muessen-um-das-ziel-zu-erreichen.mdx create mode 100644 content/posts/klz-im-adressbuch-der-windenergie-2025.mdx create mode 100644 content/posts/klz-waechst-weiter-neue-staerke-im-bereich-financial-sales.mdx create mode 100644 content/posts/kostenvergleich-kupfer-vs-aluminiumkabel-in-windparks-was-lohnt-sich-langfristig.mdx create mode 100644 content/posts/milliarden-paket-fuer-infrastruktur-der-kabel-boom-steht-bevor.mdx create mode 100644 content/posts/n2xsf2y-mittelspannungskabel-energieprojekt.mdx create mode 100644 content/posts/na2xsf2y-dreileiter-mittelspannungskabel-lieferbar.mdx create mode 100644 content/posts/netzausbau-2025-warum-jede-neue-leitung-ein-schritt-zur-energiewende-ist.mdx create mode 100644 content/posts/recycling-von-kabeltrommeln-nachhaltigkeit-im-windkraftprojekt.mdx create mode 100644 content/posts/reicht-windenergie-wirklich-nicht-ein-blick-hinter-die-schlagzeilen.mdx create mode 100644 content/posts/sicherheit-bei-kabeltrommeln-unfallfrei-und-effizient-arbeiten.mdx create mode 100644 content/posts/so-waehlen-sie-das-richtige-kabel-fuer-ihr-naechstes-projekt-aus.mdx create mode 100644 content/posts/von-smart-bis-nachhaltig-so-sieht-die-energiewirtschaft-in-naher-zukunft-aus.mdx create mode 100644 content/posts/warum-die-richtigen-kabel-der-geheime-held-der-gruenen-energie-sind.mdx create mode 100644 content/posts/warum-windpark-netzanschlusskabel-extremen-belastungen-standhalten-muessen.mdx create mode 100644 content/posts/was-macht-ein-erstklassiges-kabel-aus-finden-sie-es-hier-heraus.mdx create mode 100644 content/posts/welche-kabel-fuer-windkraft-unterschiede-von-nieder-bis-hoechstspannung-erklaert.mdx create mode 100644 content/posts/wie-die-kabelbranche-nachhaltigkeit-und-erneuerbare-energien-vorantreibt.mdx create mode 100644 content/posts/willkommen-in-der-zukunft-von-klz-unsere-neue-website-ist-online.mdx create mode 100644 content/posts/windparkbau-im-fokus-drei-typische-kabelherausforderungen.mdx create mode 100644 content/posts/zukunft-sichern-mit-h1z2z2-k-unser-solarkabel-zur-intersolar-2025.mdx create mode 100644 content/products/h1z2z2-k.mdx create mode 100644 content/products/n2x2y.mdx create mode 100644 content/products/n2xfk2y.mdx create mode 100644 content/products/n2xfkld2y.mdx create mode 100644 content/products/n2xs2y.mdx create mode 100644 content/products/n2xsf2y.mdx create mode 100644 content/products/n2xsfl2y-hv.mdx create mode 100644 content/products/n2xsfl2y-mv.mdx create mode 100644 content/products/n2xsy.mdx create mode 100644 content/products/n2xy.mdx create mode 100644 content/products/na2x2y.mdx create mode 100644 content/products/na2xfk2y.mdx create mode 100644 content/products/na2xfkld2y.mdx create mode 100644 content/products/na2xs2y.mdx create mode 100644 content/products/na2xsf2y.mdx create mode 100644 content/products/na2xsfl2y-hv.mdx create mode 100644 content/products/na2xsfl2y-mv.mdx create mode 100644 content/products/na2xsy.mdx create mode 100644 content/products/na2xy.mdx create mode 100644 content/products/nay2y.mdx create mode 100644 content/products/naycwy.mdx create mode 100644 content/products/nayy.mdx create mode 100644 content/products/ny2y.mdx create mode 100644 content/products/nycwy.mdx create mode 100644 content/products/nyy.mdx delete mode 100644 payload-types.ts delete mode 100644 payload.config.ts create mode 100644 public/AGB KLZ 3-2026.pdf create mode 100644 public/KLZ 11-24 agbs.pdf delete mode 100755 scripts/backup-db.sh delete mode 100644 scripts/check-pages.ts delete mode 100644 scripts/check-start.ts delete mode 100644 scripts/check-team.ts delete mode 100755 scripts/cms-sync.sh create mode 100644 scripts/convert-lexical-to-md.ts create mode 100644 scripts/fix-media-urls.ts delete mode 100644 scripts/generate-pdf-datasheets.ts create mode 100644 scripts/migrate-visual-links.ts delete mode 100755 scripts/restore-db.sh delete mode 100644 scripts/seed-home.ts delete mode 100644 scripts/seed-pages.ts delete mode 100644 scripts/seed-payload.ts delete mode 100644 scripts/test-rich-text.js delete mode 100644 scripts/update-cms-avb.ts delete mode 100644 src/migrations/20260223_195005_products_collection.json delete mode 100644 src/migrations/20260223_195005_products_collection.ts delete mode 100644 src/migrations/20260223_195151_remove_sku_unique.json delete mode 100644 src/migrations/20260223_195151_remove_sku_unique.ts delete mode 100644 src/migrations/20260225_003500_add_pages_collection.ts delete mode 100644 src/migrations/20260225_175000_native_localization.ts delete mode 100644 src/migrations/20260305_215000_products_featured_image.ts delete mode 100644 src/migrations/20260312_120000_pages_redirect_fields.ts delete mode 100644 src/migrations/20260427_123000_add_agbs_collection.ts delete mode 100644 src/migrations/index.ts delete mode 100644 src/payload-generated-schema.ts delete mode 100644 src/payload/blocks/AgbHistory.ts delete mode 100644 src/payload/blocks/AnimatedImage.ts delete mode 100644 src/payload/blocks/Callout.ts delete mode 100644 src/payload/blocks/CategoryGrid.ts delete mode 100644 src/payload/blocks/ChatBubble.ts delete mode 100644 src/payload/blocks/CompanyHeritage.ts delete mode 100644 src/payload/blocks/ComparisonGrid.ts delete mode 100644 src/payload/blocks/ContactSection.ts delete mode 100644 src/payload/blocks/HeroSection.ts delete mode 100644 src/payload/blocks/HighlightBox.ts delete mode 100644 src/payload/blocks/HomeBlocks.ts delete mode 100644 src/payload/blocks/ImageGallery.ts delete mode 100644 src/payload/blocks/ManifestoGrid.ts delete mode 100644 src/payload/blocks/PDFDownload.ts delete mode 100644 src/payload/blocks/PowerCTA.ts delete mode 100644 src/payload/blocks/ProductTabs.ts delete mode 100644 src/payload/blocks/SplitHeading.ts delete mode 100644 src/payload/blocks/Stats.ts delete mode 100644 src/payload/blocks/StickyNarrative.ts delete mode 100644 src/payload/blocks/SupportCTA.ts delete mode 100644 src/payload/blocks/TeamProfile.ts delete mode 100644 src/payload/blocks/TechnicalGrid.ts delete mode 100644 src/payload/blocks/VisualLinkPreview.ts delete mode 100644 src/payload/blocks/allBlocks.ts delete mode 100644 src/payload/collections/Agbs.ts delete mode 100644 src/payload/collections/FormSubmissions.ts delete mode 100644 src/payload/collections/Media.ts delete mode 100644 src/payload/collections/Pages.ts delete mode 100644 src/payload/collections/Posts.ts delete mode 100644 src/payload/collections/Products.ts delete mode 100644 src/payload/collections/Users.ts delete mode 100644 src/payload/components/Icon.tsx delete mode 100644 src/payload/components/Logo.tsx delete mode 100644 src/payload/seed.ts delete mode 100644 src/payload/utils/lexicalParser.ts create mode 100644 tests/contact-action.test.ts create mode 100644 tests/contact-form.e2e.test.ts create mode 100644 tests/image-performance.test.ts create mode 100644 tests/translation-links.test.ts diff --git a/app/(payload)/admin/[[...segments]]/page.tsx b/app/(payload)/admin/[[...segments]]/page.tsx deleted file mode 100644 index 362452d7..00000000 --- a/app/(payload)/admin/[[...segments]]/page.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import configPromise from '@payload-config'; -import { RootPage } from '@payloadcms/next/views'; -import { importMap } from '../importMap'; - -type Args = { - params: Promise<{ - segments: string[]; - }>; - searchParams: Promise<{ - [key: string]: string | string[]; - }>; -}; - -const Page = ({ params, searchParams }: Args) => - RootPage({ config: configPromise, importMap, params, searchParams }); - -export default Page; diff --git a/app/(payload)/admin/importMap.js b/app/(payload)/admin/importMap.js deleted file mode 100644 index aecd3639..00000000 --- a/app/(payload)/admin/importMap.js +++ /dev/null @@ -1,57 +0,0 @@ -import { RscEntryLexicalCell as RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' -import { RscEntryLexicalField as RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' -import { LexicalDiffComponent as LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e } from '@payloadcms/richtext-lexical/rsc' -import { BlocksFeatureClient as BlocksFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { InlineToolbarFeatureClient as InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { HorizontalRuleFeatureClient as HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { UploadFeatureClient as UploadFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { BlockquoteFeatureClient as BlockquoteFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { RelationshipFeatureClient as RelationshipFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { LinkFeatureClient as LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { ChecklistFeatureClient as ChecklistFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { OrderedListFeatureClient as OrderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { UnorderedListFeatureClient as UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { IndentFeatureClient as IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { AlignFeatureClient as AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { HeadingFeatureClient as HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { ParagraphFeatureClient as ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { InlineCodeFeatureClient as InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { SuperscriptFeatureClient as SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { SubscriptFeatureClient as SubscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client' -import { default as default_9ed509b5e5f7d08a16335393f27586cc } from '../../../src/payload/components/Icon' -import { default as default_5470ea90f7a8fd882c2fe59ff2b1c5b9 } from '../../../src/payload/components/Logo' -import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc' - -export const importMap = { - "@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e, - "@payloadcms/richtext-lexical/rsc#RscEntryLexicalField": RscEntryLexicalField_44fe37237e0ebf4470c9990d8cb7b07e, - "@payloadcms/richtext-lexical/rsc#LexicalDiffComponent": LexicalDiffComponent_44fe37237e0ebf4470c9990d8cb7b07e, - "@payloadcms/richtext-lexical/client#BlocksFeatureClient": BlocksFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient": InlineToolbarFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#HorizontalRuleFeatureClient": HorizontalRuleFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#UploadFeatureClient": UploadFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#BlockquoteFeatureClient": BlockquoteFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#RelationshipFeatureClient": RelationshipFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#LinkFeatureClient": LinkFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#ChecklistFeatureClient": ChecklistFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#OrderedListFeatureClient": OrderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#UnorderedListFeatureClient": UnorderedListFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#IndentFeatureClient": IndentFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#AlignFeatureClient": AlignFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#HeadingFeatureClient": HeadingFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#ParagraphFeatureClient": ParagraphFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#InlineCodeFeatureClient": InlineCodeFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#SuperscriptFeatureClient": SuperscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#SubscriptFeatureClient": SubscriptFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#StrikethroughFeatureClient": StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864, - "/src/payload/components/Icon#default": default_9ed509b5e5f7d08a16335393f27586cc, - "/src/payload/components/Logo#default": default_5470ea90f7a8fd882c2fe59ff2b1c5b9, - "@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 -} diff --git a/app/(payload)/api/[...slug]/route.ts b/app/(payload)/api/[...slug]/route.ts deleted file mode 100644 index bec81863..00000000 --- a/app/(payload)/api/[...slug]/route.ts +++ /dev/null @@ -1,14 +0,0 @@ -import config from '@payload-config'; -import { - REST_GET, - REST_OPTIONS, - REST_PATCH, - REST_POST, - REST_DELETE, -} from '@payloadcms/next/routes'; - -export const GET = REST_GET(config); -export const POST = REST_POST(config); -export const DELETE = REST_DELETE(config); -export const PATCH = REST_PATCH(config); -export const OPTIONS = REST_OPTIONS(config); diff --git a/app/(payload)/api/graphql/route.ts b/app/(payload)/api/graphql/route.ts deleted file mode 100644 index 7270fe74..00000000 --- a/app/(payload)/api/graphql/route.ts +++ /dev/null @@ -1,4 +0,0 @@ -import config from '@payload-config'; -import { GRAPHQL_POST } from '@payloadcms/next/routes'; - -export const POST = GRAPHQL_POST(config); diff --git a/app/(payload)/custom.scss b/app/(payload)/custom.scss deleted file mode 100644 index 29fc9e81..00000000 --- a/app/(payload)/custom.scss +++ /dev/null @@ -1,151 +0,0 @@ -/* ================================================================= - KLZ Cables – Payload Admin Theme - Strictly follows docs/STYLEGUIDE.md & tailwind.config.cjs - - IMPORTANT: We use `html` selector (not `:root`) because Payload's - own CSS defines variables on `:root` and loads AFTER this file. - `html` has higher specificity than `:root`, so our values win. - ================================================================= */ - -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap'); - -/* ================================================================= - COLOR OVERRIDES - Payload internally maps: - --theme-elevation-* → --color-base-* - --theme-success-* → --color-success-* - We override the SOURCE variables on `html` to beat Payload's `:root`. - ================================================================= */ - -html { - /* --------------------------------------------------------------- - KLZ Primary Blue (#011dff) → Buttons, links, active states - --------------------------------------------------------------- */ - --color-success-50: #eef0ff !important; - --color-success-100: #dfe2ff !important; - --color-success-150: #cdd2ff !important; - --color-success-200: #b8bfff !important; - --color-success-250: #a0a9ff !important; - --color-success-300: #8892ff !important; - --color-success-350: #707bff !important; - --color-success-400: #5564ff !important; - --color-success-450: #3a4dff !important; - --color-success-500: #011dff !important; - /* KLZ Primary */ - --color-success-550: #0119e6 !important; - --color-success-600: #0116cc !important; - --color-success-650: #0112b3 !important; - --color-success-700: #000e99 !important; - --color-success-750: #000b80 !important; - --color-success-800: #000866 !important; - --color-success-850: #00054d !important; - --color-success-900: #000333 !important; - --color-success-950: #00011a !important; - - /* --------------------------------------------------------------- - KLZ "Foundation Neutrals" → Backgrounds, cards, borders, text - Based on tailwind.config.cjs: neutral.light=#fff, - neutral.DEFAULT=#f8f9fa, neutral.dark=#263336, neutral.black=#0a0a0a - text.primary=#1a1a1a, text.secondary=#6c757d, text.light=#adb5bd - --------------------------------------------------------------- */ - --color-base-0: #ffffff !important; - --color-base-50: #f8f9fa !important; - --color-base-100: #f1f3f5 !important; - --color-base-150: #e9ecef !important; - --color-base-200: #dee2e6 !important; - --color-base-250: #ced4da !important; - --color-base-300: #adb5bd !important; - --color-base-350: #9ba3ab !important; - --color-base-400: #868e96 !important; - --color-base-450: #6c757d !important; - --color-base-500: #5c636a !important; - --color-base-550: #4d5358 !important; - --color-base-600: #3d4246 !important; - --color-base-650: #343a40 !important; - --color-base-700: #2b3035 !important; - --color-base-750: #263336 !important; - --color-base-800: #212529 !important; - --color-base-850: #1a1a1a !important; - --color-base-900: #121212 !important; - --color-base-950: #0a0a0a !important; - --color-base-1000: #000000 !important; - - /* Typography */ - --font-body: 'Inter', system-ui, -apple-system, sans-serif !important; - --font-headings: 'Inter', system-ui, -apple-system, sans-serif !important; -} - -/* Base Body Application */ -body { - font-family: var(--font-body) !important; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/* ================================================================= - Login / Setup Page - ================================================================= */ -.template-default.template-default--has-bg { - background: radial-gradient(circle at top right, #e6ebf5 0%, #f8f9fa 60%, #f3f4f6 100%) !important; -} - -.login__wrap, -.create-first-user__wrap { - border-top: none !important; - padding: 3rem !important; - background: rgba(255, 255, 255, 0.85) !important; - backdrop-filter: blur(20px); - -webkit-backdrop-filter: blur(20px); - border: 1px solid var(--theme-elevation-150) !important; - box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important; - border-radius: 1.5rem !important; -} - -/* ================================================================= - Buttons – override Payload's dark buttons with KLZ Blue - Payload uses .btn--style-primary { --bg-color: var(--theme-elevation-800) } - which makes all primary buttons near-black. We override to KLZ Blue. - ================================================================= */ -.btn--style-primary, -.btn--style-pill { - --bg-color: #011dff !important; - --color: #ffffff !important; - --hover-bg: #0116cc !important; - --hover-color: #ffffff !important; -} - -.btn--style-primary.btn--disabled, -.btn--style-pill.btn--disabled { - --bg-color: #b8bfff !important; - --color: #ffffff !important; - --hover-bg: #b8bfff !important; -} - -/* Sidebar Active Items */ -[class*="nav-group__link--active"], -[class*="nav__link--active"] { - --theme-elevation-800: #011dff !important; - color: #011dff !important; - border-left-color: #011dff !important; -} - -.btn--style-secondary { - --box-shadow: inset 0 0 0 1px #011dff !important; - --color: #011dff !important; - --hover-color: #0116cc !important; - --hover-box-shadow: inset 0 0 0 1px #0116cc !important; -} - -/* ================================================================= - Logo & Icon - ================================================================= */ -.klz-admin-logo, -.klz-admin-icon { - display: block !important; - visibility: visible !important; - opacity: 1 !important; - height: 32px !important; - width: auto !important; - max-width: 100% !important; - object-fit: contain !important; -} \ No newline at end of file diff --git a/app/(payload)/layout.tsx b/app/(payload)/layout.tsx deleted file mode 100644 index c9b7e796..00000000 --- a/app/(payload)/layout.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import configPromise from '@payload-config'; -import { RootLayout } from '@payloadcms/next/layouts'; -import React from 'react'; - -import '@payloadcms/next/css'; -import './custom.scss'; -import { handleServerFunctions } from '@payloadcms/next/layouts'; -import { importMap } from './admin/importMap'; - -type Args = { - children: React.ReactNode; -}; - -const serverFunction: any = async function (args: any) { - 'use server'; - return handleServerFunctions({ - ...args, - config: configPromise, - importMap, - }); -}; - -const Layout = ({ children }: Args) => { - return ( - - {children} - - ); -}; - -export default Layout; diff --git a/app/[locale]/[slug]/page.tsx b/app/[locale]/[slug]/page.tsx index e6b00602..a3dc875c 100644 --- a/app/[locale]/[slug]/page.tsx +++ b/app/[locale]/[slug]/page.tsx @@ -4,7 +4,7 @@ import { getTranslations, setRequestLocale } from 'next-intl/server'; import { Metadata } from 'next'; import { getPageBySlug, getAllPages } from '@/lib/pages'; import { mapSlugToFileSlug, mapFileSlugToTranslated } from '@/lib/slugs'; -import PayloadRichText from '@/components/PayloadRichText'; +import MDXContent from '@/components/MDXContent'; import { SITE_URL } from '@/lib/schema'; import TrackedLink from '@/components/analytics/TrackedLink'; @@ -82,7 +82,7 @@ export default async function StandardPage({ params }: PageProps) { if (pageData.frontmatter.layout === 'fullBleed') { return (
- +
); } @@ -121,7 +121,7 @@ export default async function StandardPage({ params }: PageProps) { {/* Main content with shared blog components */}
- +
{/* Support Section */} diff --git a/app/[locale]/blog/[slug]/page.tsx b/app/[locale]/blog/[slug]/page.tsx index 394f83a5..688c3d79 100644 --- a/app/[locale]/blog/[slug]/page.tsx +++ b/app/[locale]/blog/[slug]/page.tsx @@ -19,7 +19,7 @@ import { setRequestLocale } from 'next-intl/server'; import BlogEngagementTracker from '@/components/analytics/BlogEngagementTracker'; // Payload CMS Imports -import PayloadRichText from '@/components/PayloadRichText'; +import MDXContent from '@/components/MDXContent'; interface BlogPostProps { params: Promise<{ @@ -215,7 +215,7 @@ export default async function BlogPost({ params }: BlogPostProps) { {/* Main content with enhanced styling rendering Payload Lexical */}
- +
{/* Power CTA */} diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index 5d451dcb..d0bf2db0 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -2,7 +2,6 @@ import Footer from '@/components/Footer'; import Header from '@/components/Header'; import JsonLd from '@/components/JsonLd'; import SkipLink from '@/components/SkipLink'; -import CMSConnectivityNotice from '@/components/CMSConnectivityNotice'; import AnalyticsShell from '@/components/analytics/AnalyticsShell'; import { Metadata, Viewport } from 'next'; import { NextIntlClientProvider } from 'next-intl'; @@ -144,9 +143,6 @@ export default async function Layout(props: { {children}