kofi-stack-template-generator 2.1.37 → 2.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +6 -6
- package/dist/index.js +8057 -440
- package/package.json +1 -1
- package/src/templates.generated.ts +248 -94
- package/templates/integrations/posthog/src/components/providers/posthog-provider.tsx.hbs +4 -1
- package/templates/marketing/payload/package.json.hbs +41 -26
- package/templates/marketing/payload/src/Footer/Component.client.tsx +288 -0
- package/templates/marketing/payload/src/Footer/Component.tsx +11 -0
- package/templates/marketing/payload/src/Footer/RowLabel.tsx +15 -0
- package/templates/marketing/payload/src/Footer/config.ts +178 -0
- package/templates/marketing/payload/src/Footer/hooks/{revalidateFooter.ts.hbs → revalidateFooter.ts} +5 -5
- package/templates/marketing/payload/src/Header/Component.client.tsx +94 -0
- package/templates/marketing/payload/src/Header/Component.tsx +10 -0
- package/templates/marketing/payload/src/Header/MegaMenu/index.tsx +197 -0
- package/templates/marketing/payload/src/Header/MobileMenu/HamburgerIcon.tsx +48 -0
- package/templates/marketing/payload/src/Header/MobileMenu/index.tsx +299 -0
- package/templates/marketing/payload/src/Header/Nav/index.tsx +76 -0
- package/templates/marketing/payload/src/Header/RowLabel.tsx +21 -0
- package/templates/marketing/payload/src/Header/config.ts +208 -0
- package/templates/marketing/payload/src/Header/hooks/{revalidateHeader.ts.hbs → revalidateHeader.ts} +5 -5
- package/templates/marketing/payload/src/access/{authenticated.ts.hbs → authenticated.ts} +1 -1
- package/templates/marketing/payload/src/access/{authenticatedOrPublished.ts.hbs → authenticatedOrPublished.ts} +8 -8
- package/templates/marketing/payload/src/app/(docs)/docs/[[...slug]]/page.tsx +117 -0
- package/templates/marketing/payload/src/app/(docs)/docs/layout.tsx +39 -0
- package/templates/marketing/payload/src/app/(docs)/layout.tsx +44 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/pages-sitemap.xml/route.ts +68 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/posts-sitemap.xml/route.ts +55 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/api/docs-search/route.ts +67 -0
- package/templates/marketing/payload/src/app/(frontend)/api/newsletter/route.ts +260 -0
- package/templates/marketing/payload/src/app/(frontend)/api/pricing/route.ts +266 -0
- package/templates/marketing/payload/src/app/(frontend)/globals.css +1019 -0
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/next/exit-preview/route.ts +7 -0
- package/templates/marketing/payload/src/app/(frontend)/next/preview/route.ts +56 -0
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts +31 -0
- package/templates/marketing/payload/src/app/(frontend)/not-found.tsx +17 -0
- package/templates/marketing/payload/src/app/(frontend)/page.tsx +5 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/BlogPageClient.tsx +190 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/BlogPostContent.tsx +67 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.tsx +118 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page.tsx +49 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js +83 -0
- package/templates/marketing/payload/src/app/(payload)/api/[...slug]/{route.ts.hbs → route.ts} +13 -9
- package/templates/marketing/payload/src/app/(payload)/api/graphql/{route.ts.hbs → route.ts} +2 -2
- package/templates/marketing/payload/src/app/(payload)/api/graphql-playground/{route.ts.hbs → route.ts} +3 -3
- package/templates/marketing/payload/src/app/(payload)/custom.scss +0 -0
- package/templates/marketing/payload/src/app/(payload)/layout.tsx +31 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/config.ts +120 -0
- package/templates/marketing/payload/src/blocks/Banner/Component.tsx +26 -0
- package/templates/marketing/payload/src/blocks/Banner/config.ts +67 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/Component.tsx +243 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/config.ts +147 -0
- package/templates/marketing/payload/src/blocks/CallToAction/Component.tsx +31 -0
- package/templates/marketing/payload/src/blocks/CallToAction/config.ts +68 -0
- package/templates/marketing/payload/src/blocks/Code/Component.client.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/Component.tsx +21 -0
- package/templates/marketing/payload/src/blocks/Code/CopyButton.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/config.ts +33 -0
- package/templates/marketing/payload/src/blocks/Content/Component.tsx +41 -0
- package/templates/marketing/payload/src/blocks/Content/config.ts +105 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/Component.tsx +90 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/config.ts +75 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/Component.tsx +124 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/config.ts +120 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/config.ts +111 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/Component.tsx +117 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/config.ts +50 -0
- package/templates/marketing/payload/src/blocks/Form/Checkbox/index.tsx +45 -0
- package/templates/marketing/payload/src/blocks/Form/Component.tsx +170 -0
- package/templates/marketing/payload/src/blocks/Form/Country/index.tsx +65 -0
- package/templates/marketing/payload/src/blocks/Form/Country/options.ts +982 -0
- package/templates/marketing/payload/src/blocks/Form/Email/index.tsx +38 -0
- package/templates/marketing/payload/src/blocks/Form/Error/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Message/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Number/index.tsx +36 -0
- package/templates/marketing/payload/src/blocks/Form/Select/index.tsx +63 -0
- package/templates/marketing/payload/src/blocks/Form/State/index.tsx +64 -0
- package/templates/marketing/payload/src/blocks/Form/State/options.ts +52 -0
- package/templates/marketing/payload/src/blocks/Form/Text/index.tsx +32 -0
- package/templates/marketing/payload/src/blocks/Form/Textarea/index.tsx +40 -0
- package/templates/marketing/payload/src/blocks/Form/Width/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/Form/fields.tsx +21 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/Component.tsx +59 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/config.ts +88 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/Component.tsx +132 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/Component.tsx +95 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/config.ts +48 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/Component.tsx +67 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/config.ts +14 -0
- package/templates/marketing/payload/src/blocks/Personas/Component.tsx +69 -0
- package/templates/marketing/payload/src/blocks/Personas/config.ts +96 -0
- package/templates/marketing/payload/src/blocks/PricingTable/ComparisonTable.tsx +250 -0
- package/templates/marketing/payload/src/blocks/PricingTable/Component.tsx +443 -0
- package/templates/marketing/payload/src/blocks/PricingTable/config.ts +142 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/config.ts +42 -0
- package/templates/marketing/payload/src/blocks/RelatedPosts/Component.tsx +32 -0
- package/templates/marketing/payload/src/blocks/RenderBlocks.tsx +92 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/config.ts +76 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/Component.tsx +83 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/config.ts +70 -0
- package/templates/marketing/payload/src/collections/Categories.ts +28 -0
- package/templates/marketing/payload/src/collections/FAQs/index.ts +100 -0
- package/templates/marketing/payload/src/collections/Media.ts +160 -0
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts +43 -0
- package/templates/marketing/payload/src/collections/Pages/index.ts +168 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts +41 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts +44 -0
- package/templates/marketing/payload/src/collections/Posts/index.ts +259 -0
- package/templates/marketing/payload/src/collections/Users/index.ts +26 -0
- package/templates/marketing/payload/src/components/AdminBar/index.scss +7 -0
- package/templates/marketing/payload/src/components/AdminBar/index.tsx +89 -0
- package/templates/marketing/payload/src/components/Analytics/CTATracker.tsx +33 -0
- package/templates/marketing/payload/src/components/Analytics/FeatureSectionTracker.tsx +47 -0
- package/templates/marketing/payload/src/components/Analytics/PricingViewTracker.tsx +46 -0
- package/templates/marketing/payload/src/components/Analytics/index.tsx +3 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx +89 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx +69 -0
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx +14 -0
- package/templates/marketing/payload/src/components/BlogCTA/index.tsx +77 -0
- package/templates/marketing/payload/src/components/Card/index.tsx +85 -0
- package/templates/marketing/payload/src/components/CollectionArchive/index.tsx +32 -0
- package/templates/marketing/payload/src/components/JsonLd/index.tsx +138 -0
- package/templates/marketing/payload/src/components/Link/index.tsx +66 -0
- package/templates/marketing/payload/src/components/LivePreviewListener/index.tsx +10 -0
- package/templates/marketing/payload/src/components/Logo/Logo.tsx +46 -0
- package/templates/marketing/payload/src/components/Media/ImageMedia/index.tsx +80 -0
- package/templates/marketing/payload/src/components/Media/VideoMedia/index.tsx +47 -0
- package/templates/marketing/payload/src/components/Media/index.tsx +26 -0
- package/templates/marketing/payload/src/components/Media/types.ts +22 -0
- package/templates/marketing/payload/src/components/PageRange/index.tsx +57 -0
- package/templates/marketing/payload/src/components/Pagination/index.tsx +101 -0
- package/templates/marketing/payload/src/components/PayloadRedirects/index.tsx +48 -0
- package/templates/marketing/payload/src/components/RichText/index.tsx +152 -0
- package/templates/marketing/payload/src/components/TableOfContents/index.tsx +128 -0
- package/templates/marketing/payload/src/components/ui/accordion.tsx +64 -0
- package/templates/marketing/payload/src/components/ui/button.tsx +52 -0
- package/templates/marketing/payload/src/components/ui/card.tsx +48 -0
- package/templates/marketing/payload/src/components/ui/checkbox.tsx +27 -0
- package/templates/marketing/payload/src/components/ui/input.tsx +22 -0
- package/templates/marketing/payload/src/components/ui/label.tsx +19 -0
- package/templates/marketing/payload/src/components/ui/pagination.tsx +92 -0
- package/templates/marketing/payload/src/components/ui/select.tsx +144 -0
- package/templates/marketing/payload/src/components/ui/textarea.tsx +21 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-form.ts +111 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-page.ts +56 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/about.ts +281 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/faqs.ts +224 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/automation.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/custom-fields.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/dashboard.ts +228 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/index.ts +6 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/monetization.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/seo.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/templates.ts +218 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/home.ts +555 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/index.ts +767 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/posts.ts +623 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/pricing.ts +251 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/privacy.ts +457 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/richtext-helper.ts +88 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/terms.ts +478 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/b2b-vendor-hubs.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/communities.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/index.ts +4 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/local-services.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/marketplaces.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/home-static.ts +691 -0
- package/templates/marketing/payload/src/endpoints/seed/home.ts +675 -0
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-3.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero-1.ts +5 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post2.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post3.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/index.ts +335 -0
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts +315 -0
- package/templates/marketing/payload/src/endpoints/seed/post-2.ts +232 -0
- package/templates/marketing/payload/src/endpoints/seed/post-3.ts +268 -0
- package/templates/marketing/payload/src/fields/defaultLexical.ts +73 -0
- package/templates/marketing/payload/src/fields/link.ts +139 -0
- package/templates/marketing/payload/src/fields/linkGroup.ts +28 -0
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx +56 -0
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx +48 -0
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx +50 -0
- package/templates/marketing/payload/src/heros/PostHero/index.tsx +73 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/AnimatedMockup.tsx +241 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx +108 -0
- package/templates/marketing/payload/src/heros/{RenderHero.tsx.hbs → RenderHero.tsx} +9 -9
- package/templates/marketing/payload/src/heros/config.ts +121 -0
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts +15 -0
- package/templates/marketing/payload/src/hooks/{revalidateRedirects.ts.hbs → revalidateRedirects.ts} +3 -3
- package/templates/marketing/payload/src/lib/convex.ts +13 -0
- package/templates/marketing/payload/src/lib/docs-source.ts +138 -0
- package/templates/marketing/payload/src/lib/mdx.tsx +191 -0
- package/templates/marketing/payload/src/payload.config.ts.hbs +95 -145
- package/templates/marketing/payload/src/plugins/index.ts +107 -0
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx +34 -0
- package/templates/marketing/payload/src/providers/PostHogProvider.tsx +33 -0
- package/templates/marketing/payload/src/providers/Theme/InitTheme/{index.tsx.hbs → index.tsx} +11 -10
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/index.tsx +133 -0
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/types.ts +7 -0
- package/templates/marketing/payload/src/providers/Theme/index.tsx +60 -0
- package/templates/marketing/payload/src/providers/Theme/shared.ts +17 -0
- package/templates/marketing/payload/src/providers/Theme/{types.ts.hbs → types.ts} +3 -3
- package/templates/marketing/payload/src/providers/index.tsx +17 -0
- package/templates/marketing/payload/src/search/Component.tsx +42 -0
- package/templates/marketing/payload/src/search/beforeSync.ts +56 -0
- package/templates/marketing/payload/src/search/fieldOverrides.ts +61 -0
- package/templates/marketing/payload/src/utilities/deepMerge.ts +35 -0
- package/templates/marketing/payload/src/utilities/extractHeadings.ts +78 -0
- package/templates/marketing/payload/src/utilities/formatAuthors.ts +24 -0
- package/templates/marketing/payload/src/utilities/formatDateTime.ts +20 -0
- package/templates/marketing/payload/src/utilities/generateMeta.ts +93 -0
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts +33 -0
- package/templates/marketing/payload/src/utilities/getDocument.ts +32 -0
- package/templates/marketing/payload/src/utilities/getGlobals.ts +26 -0
- package/templates/marketing/payload/src/utilities/getMeUser.ts +43 -0
- package/templates/marketing/payload/src/utilities/getMediaUrl.ts +24 -0
- package/templates/marketing/payload/src/utilities/getRedirects.ts +26 -0
- package/templates/marketing/payload/src/utilities/getURL.ts +26 -0
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts +26 -0
- package/templates/marketing/payload/src/utilities/toKebabCase.ts +5 -0
- package/templates/marketing/payload/src/utilities/ui.ts +12 -0
- package/templates/marketing/payload/src/utilities/useClickableCard.ts +108 -0
- package/templates/marketing/payload/src/utilities/useDebounce.ts +17 -0
- package/templates/packages/ui/src/components/button.tsx.hbs +53 -0
- package/templates/packages/ui/src/components/card.tsx.hbs +76 -0
- package/templates/packages/ui/src/components/separator.tsx.hbs +26 -0
- package/templates/marketing/payload/src/Footer/config.ts.hbs +0 -178
- package/templates/marketing/payload/src/Footer/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/Header/RowLabel.tsx.hbs +0 -21
- package/templates/marketing/payload/src/Header/config.ts.hbs +0 -208
- package/templates/marketing/payload/src/Header/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/access/index.ts.hbs +0 -3
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx.hbs +0 -19
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts.hbs +0 -31
- package/templates/marketing/payload/src/app/(frontend)/page.tsx.hbs +0 -83
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/custom.scss.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/layout.tsx.hbs +0 -31
- package/templates/marketing/payload/src/app/globals.css.hbs +0 -83
- package/templates/marketing/payload/src/app/layout.tsx.hbs +0 -10
- package/templates/marketing/payload/src/blocks/Benefits.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/CTA.ts.hbs +0 -39
- package/templates/marketing/payload/src/blocks/Content.ts.hbs +0 -9
- package/templates/marketing/payload/src/blocks/FAQ.ts.hbs +0 -18
- package/templates/marketing/payload/src/blocks/Features.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/Hero.ts.hbs +0 -40
- package/templates/marketing/payload/src/blocks/LogoBanner.ts.hbs +0 -17
- package/templates/marketing/payload/src/blocks/Pricing.ts.hbs +0 -37
- package/templates/marketing/payload/src/blocks/Testimonials.ts.hbs +0 -21
- package/templates/marketing/payload/src/blocks/index.ts.hbs +0 -9
- package/templates/marketing/payload/src/collections/Categories/index.ts.hbs +0 -28
- package/templates/marketing/payload/src/collections/FAQs/index.ts.hbs +0 -100
- package/templates/marketing/payload/src/collections/Media.ts.hbs +0 -164
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts.hbs +0 -43
- package/templates/marketing/payload/src/collections/Pages/index.ts.hbs +0 -142
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts.hbs +0 -41
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts.hbs +0 -44
- package/templates/marketing/payload/src/collections/Posts/index.ts.hbs +0 -244
- package/templates/marketing/payload/src/collections/Users/index.ts.hbs +0 -26
- package/templates/marketing/payload/src/collections/index.ts.hbs +0 -6
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx.hbs +0 -89
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx.hbs +0 -69
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx.hbs +0 -14
- package/templates/marketing/payload/src/components/Link/index.tsx.hbs +0 -79
- package/templates/marketing/payload/src/components/Media/index.tsx.hbs +0 -67
- package/templates/marketing/payload/src/components/RichText/index.tsx.hbs +0 -44
- package/templates/marketing/payload/src/endpoints/seed/home.ts.hbs +0 -76
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-hero.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/index.ts.hbs +0 -235
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts.hbs +0 -252
- package/templates/marketing/payload/src/fields/defaultLexical.ts.hbs +0 -73
- package/templates/marketing/payload/src/fields/link.ts.hbs +0 -139
- package/templates/marketing/payload/src/fields/linkGroup.ts.hbs +0 -28
- package/templates/marketing/payload/src/globals/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx.hbs +0 -53
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx.hbs +0 -48
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx.hbs +0 -46
- package/templates/marketing/payload/src/heros/PostHero/index.tsx.hbs +0 -68
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx.hbs +0 -88
- package/templates/marketing/payload/src/heros/config.ts.hbs +0 -112
- package/templates/marketing/payload/src/heros/index.ts.hbs +0 -7
- package/templates/marketing/payload/src/hooks/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts.hbs +0 -15
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx.hbs +0 -34
- package/templates/marketing/payload/src/providers/Theme/index.tsx.hbs +0 -60
- package/templates/marketing/payload/src/providers/Theme/shared.ts.hbs +0 -17
- package/templates/marketing/payload/src/providers/index.tsx.hbs +0 -18
- package/templates/marketing/payload/src/utilities/deepMerge.ts.hbs +0 -35
- package/templates/marketing/payload/src/utilities/formatAuthors.ts.hbs +0 -24
- package/templates/marketing/payload/src/utilities/formatDateTime.ts.hbs +0 -13
- package/templates/marketing/payload/src/utilities/generateMeta.ts.hbs +0 -87
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts.hbs +0 -33
- package/templates/marketing/payload/src/utilities/getURL.ts.hbs +0 -26
- package/templates/marketing/payload/src/utilities/index.ts.hbs +0 -8
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts.hbs +0 -26
- /package/templates/marketing/payload/src/access/{anyone.ts.hbs → anyone.ts} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/fields/{index.ts.hbs → index.ts} +0 -0
- /package/templates/marketing/payload/src/utilities/{canUseDOM.ts.hbs → canUseDOM.ts} +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
|
|
5
|
+
import type { IndustryTabsBlock as IndustryTabsBlockProps } from "@/payload-types"
|
|
6
|
+
|
|
7
|
+
import { CMSLink } from "@/components/Link"
|
|
8
|
+
import { Media } from "@/components/Media"
|
|
9
|
+
import { cn } from "@/utilities/ui"
|
|
10
|
+
|
|
11
|
+
export const IndustryTabsBlock: React.FC<IndustryTabsBlockProps> = ({
|
|
12
|
+
heading,
|
|
13
|
+
subheading,
|
|
14
|
+
tabs,
|
|
15
|
+
}) => {
|
|
16
|
+
const [activeTab, setActiveTab] = useState(0)
|
|
17
|
+
|
|
18
|
+
if (!Array.isArray(tabs) || tabs.length === 0) {
|
|
19
|
+
return null
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const activeTabData = tabs[activeTab]
|
|
23
|
+
const hasMedia = activeTabData?.media && typeof activeTabData.media === "object"
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<section className="py-20 md:py-28">
|
|
27
|
+
<div className="container">
|
|
28
|
+
{/* Header */}
|
|
29
|
+
{(heading || subheading) && (
|
|
30
|
+
<div className="mb-12">
|
|
31
|
+
{heading && (
|
|
32
|
+
<h2 className="text-3xl md:text-4xl lg:text-5xl font-bold mb-4">{heading}</h2>
|
|
33
|
+
)}
|
|
34
|
+
{subheading && <p className="text-lg text-muted-foreground max-w-2xl">{subheading}</p>}
|
|
35
|
+
</div>
|
|
36
|
+
)}
|
|
37
|
+
|
|
38
|
+
{/* Tabs */}
|
|
39
|
+
<div className="flex flex-wrap gap-2 mb-12 border-b border-border pb-4">
|
|
40
|
+
{tabs.map((tab, index) => (
|
|
41
|
+
<button
|
|
42
|
+
type="button"
|
|
43
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Tab order is static
|
|
44
|
+
key={index}
|
|
45
|
+
onClick={() => setActiveTab(index)}
|
|
46
|
+
className={cn(
|
|
47
|
+
"px-4 py-2 text-sm font-medium rounded-lg transition-all duration-200",
|
|
48
|
+
activeTab === index
|
|
49
|
+
? "bg-primary text-primary-foreground"
|
|
50
|
+
: "text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
51
|
+
)}
|
|
52
|
+
>
|
|
53
|
+
{tab.name}
|
|
54
|
+
</button>
|
|
55
|
+
))}
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
{/* Tab Content */}
|
|
59
|
+
<div className="grid lg:grid-cols-2 gap-12 items-center">
|
|
60
|
+
{/* Stats Side */}
|
|
61
|
+
<div className="industry-tab-content">
|
|
62
|
+
{activeTabData?.stat && (
|
|
63
|
+
<div className="mb-6">
|
|
64
|
+
<span className="text-6xl md:text-7xl lg:text-8xl font-bold text-primary leading-none">
|
|
65
|
+
{activeTabData.stat}
|
|
66
|
+
</span>
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
69
|
+
|
|
70
|
+
{activeTabData?.statLabel && (
|
|
71
|
+
<h3 className="text-2xl md:text-3xl font-semibold mb-4">{activeTabData.statLabel}</h3>
|
|
72
|
+
)}
|
|
73
|
+
|
|
74
|
+
{activeTabData?.description && (
|
|
75
|
+
<p className="text-lg text-muted-foreground mb-8">{activeTabData.description}</p>
|
|
76
|
+
)}
|
|
77
|
+
|
|
78
|
+
{activeTabData?.link?.label && <CMSLink {...activeTabData.link} />}
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
{/* Visual Side */}
|
|
82
|
+
<div className="relative hidden lg:block">
|
|
83
|
+
<div className="aspect-[4/3] rounded-2xl bg-gradient-to-br from-muted via-accent to-muted/50 overflow-hidden">
|
|
84
|
+
{hasMedia ? (
|
|
85
|
+
/* Uploaded Image */
|
|
86
|
+
<Media
|
|
87
|
+
resource={activeTabData.media}
|
|
88
|
+
imgClassName="w-full h-full object-cover"
|
|
89
|
+
size="(max-width: 1024px) 100vw, 50vw"
|
|
90
|
+
/>
|
|
91
|
+
) : (
|
|
92
|
+
/* Decorative Placeholder */
|
|
93
|
+
<>
|
|
94
|
+
{/* Decorative grid pattern */}
|
|
95
|
+
<div className="absolute inset-0 opacity-30">
|
|
96
|
+
<div
|
|
97
|
+
className="w-full h-full"
|
|
98
|
+
style={{
|
|
99
|
+
backgroundImage: `
|
|
100
|
+
linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
|
|
101
|
+
linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px)
|
|
102
|
+
`,
|
|
103
|
+
backgroundSize: "40px 40px",
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
{/* Floating stat card */}
|
|
109
|
+
<div className="absolute bottom-8 left-8 right-8">
|
|
110
|
+
<div className="bg-card border border-border rounded-xl p-6 shadow-lg">
|
|
111
|
+
<div className="flex items-center gap-4">
|
|
112
|
+
<div className="w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center">
|
|
113
|
+
<span className="text-xl font-bold text-primary">
|
|
114
|
+
{activeTabData?.stat?.charAt(0)}
|
|
115
|
+
</span>
|
|
116
|
+
</div>
|
|
117
|
+
<div>
|
|
118
|
+
<p className="font-semibold">{activeTabData?.statLabel}</p>
|
|
119
|
+
<p className="text-sm text-muted-foreground">{activeTabData?.name}</p>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</>
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</section>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
import { link } from "@/fields/link"
|
|
4
|
+
|
|
5
|
+
export const IndustryTabs: Block = {
|
|
6
|
+
slug: "industryTabs",
|
|
7
|
+
interfaceName: "IndustryTabsBlock",
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
name: "heading",
|
|
11
|
+
type: "text",
|
|
12
|
+
label: "Section Heading",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "subheading",
|
|
16
|
+
type: "textarea",
|
|
17
|
+
label: "Section Subheading",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "tabs",
|
|
21
|
+
type: "array",
|
|
22
|
+
label: "Industry Tabs",
|
|
23
|
+
minRows: 2,
|
|
24
|
+
maxRows: 6,
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
name: "name",
|
|
28
|
+
type: "text",
|
|
29
|
+
label: "Tab Name",
|
|
30
|
+
required: true,
|
|
31
|
+
admin: {
|
|
32
|
+
description: 'e.g., "Ecommerce and Retail"',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "stat",
|
|
37
|
+
type: "text",
|
|
38
|
+
label: "Stat Number",
|
|
39
|
+
required: true,
|
|
40
|
+
admin: {
|
|
41
|
+
description: 'e.g., "340%" or "$2M+"',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "statLabel",
|
|
46
|
+
type: "text",
|
|
47
|
+
label: "Stat Label",
|
|
48
|
+
required: true,
|
|
49
|
+
admin: {
|
|
50
|
+
description: 'e.g., "Higher conversion rates"',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "description",
|
|
55
|
+
type: "textarea",
|
|
56
|
+
label: "Description",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "media",
|
|
60
|
+
type: "upload",
|
|
61
|
+
relationTo: "media",
|
|
62
|
+
label: "Tab Image",
|
|
63
|
+
admin: {
|
|
64
|
+
description: "Optional image/illustration for this tab (recommended: 800x600)",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
link({
|
|
68
|
+
appearances: ["default", "outline"],
|
|
69
|
+
}),
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
labels: {
|
|
74
|
+
plural: "Industry Tabs",
|
|
75
|
+
singular: "Industry Tabs",
|
|
76
|
+
},
|
|
77
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { Media } from "@/components/Media"
|
|
4
|
+
import { cn } from "@/utilities/ui"
|
|
5
|
+
import type React from "react"
|
|
6
|
+
|
|
7
|
+
import type { LogoBannerBlock as LogoBannerBlockProps } from "@/payload-types"
|
|
8
|
+
|
|
9
|
+
// Placeholder logos for initial setup (before real logos are added)
|
|
10
|
+
const placeholderLogos = [
|
|
11
|
+
{ name: "TechCorp", initials: "TC" },
|
|
12
|
+
{ name: "StartupX", initials: "SX" },
|
|
13
|
+
{ name: "GrowthCo", initials: "GC" },
|
|
14
|
+
{ name: "InnovateLab", initials: "IL" },
|
|
15
|
+
{ name: "ScaleUp", initials: "SU" },
|
|
16
|
+
{ name: "VenturePro", initials: "VP" },
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
export const LogoBannerBlock: React.FC<LogoBannerBlockProps> = ({
|
|
20
|
+
heading,
|
|
21
|
+
logos,
|
|
22
|
+
style = "scroll",
|
|
23
|
+
}) => {
|
|
24
|
+
const hasLogos = Array.isArray(logos) && logos.length > 0
|
|
25
|
+
const displayLogos = hasLogos ? logos : placeholderLogos
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<section className="py-12 md:py-16 border-y border-border/50">
|
|
29
|
+
<div className="container">
|
|
30
|
+
{heading && (
|
|
31
|
+
<p className="text-center text-sm text-muted-foreground mb-8 uppercase tracking-wider">
|
|
32
|
+
{heading}
|
|
33
|
+
</p>
|
|
34
|
+
)}
|
|
35
|
+
|
|
36
|
+
{style === "scroll" ? (
|
|
37
|
+
<div className="logo-scroll-container">
|
|
38
|
+
<div className="logo-scroll-track">
|
|
39
|
+
{/* Double the logos for seamless loop */}
|
|
40
|
+
{[...displayLogos, ...displayLogos].map((logo, index) => (
|
|
41
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Logos are duplicated for animation, index is required
|
|
42
|
+
<LogoItem key={index} logo={logo} hasLogos={hasLogos} />
|
|
43
|
+
))}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
) : (
|
|
47
|
+
<div className="grid grid-cols-3 md:grid-cols-6 gap-8 items-center justify-items-center">
|
|
48
|
+
{displayLogos.map((logo, index) => (
|
|
49
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Logo order is static
|
|
50
|
+
<LogoItem key={index} logo={logo} hasLogos={hasLogos} />
|
|
51
|
+
))}
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
</section>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface LogoItemProps {
|
|
60
|
+
logo: {
|
|
61
|
+
name?: string | null
|
|
62
|
+
initials?: string
|
|
63
|
+
logo?: unknown
|
|
64
|
+
}
|
|
65
|
+
hasLogos: boolean
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const LogoItem: React.FC<LogoItemProps> = ({ logo, hasLogos }) => {
|
|
69
|
+
const hasImage = hasLogos && logo.logo && typeof logo.logo === "object"
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div
|
|
73
|
+
className={cn(
|
|
74
|
+
"logo-item flex items-center justify-center px-6 md:px-8",
|
|
75
|
+
"grayscale hover:grayscale-0 transition-all duration-300",
|
|
76
|
+
)}
|
|
77
|
+
>
|
|
78
|
+
{hasImage ? (
|
|
79
|
+
<Media
|
|
80
|
+
resource={logo.logo as Parameters<typeof Media>[0]["resource"]}
|
|
81
|
+
imgClassName="h-8 md:h-10 w-auto object-contain opacity-60 hover:opacity-100 transition-opacity"
|
|
82
|
+
/>
|
|
83
|
+
) : (
|
|
84
|
+
<div className="flex items-center gap-2">
|
|
85
|
+
<span className="w-8 h-8 rounded bg-muted flex items-center justify-center text-xs font-bold text-foreground">
|
|
86
|
+
{"initials" in logo ? logo.initials : logo.name?.slice(0, 2).toUpperCase()}
|
|
87
|
+
</span>
|
|
88
|
+
<span className="text-sm font-medium text-muted-foreground hidden md:block">
|
|
89
|
+
{logo.name}
|
|
90
|
+
</span>
|
|
91
|
+
</div>
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
export const LogoBanner: Block = {
|
|
4
|
+
slug: "logoBanner",
|
|
5
|
+
interfaceName: "LogoBannerBlock",
|
|
6
|
+
fields: [
|
|
7
|
+
{
|
|
8
|
+
name: "heading",
|
|
9
|
+
type: "text",
|
|
10
|
+
label: "Heading",
|
|
11
|
+
defaultValue: "Trusted by entrepreneurs worldwide",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "logos",
|
|
15
|
+
type: "array",
|
|
16
|
+
label: "Logos",
|
|
17
|
+
minRows: 1,
|
|
18
|
+
maxRows: 12,
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
name: "name",
|
|
22
|
+
type: "text",
|
|
23
|
+
required: true,
|
|
24
|
+
label: "Company Name",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "logo",
|
|
28
|
+
type: "upload",
|
|
29
|
+
relationTo: "media",
|
|
30
|
+
label: "Logo Image",
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "style",
|
|
36
|
+
type: "select",
|
|
37
|
+
defaultValue: "scroll",
|
|
38
|
+
options: [
|
|
39
|
+
{ label: "Scrolling", value: "scroll" },
|
|
40
|
+
{ label: "Static Grid", value: "grid" },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
labels: {
|
|
45
|
+
plural: "Logo Banners",
|
|
46
|
+
singular: "Logo Banner",
|
|
47
|
+
},
|
|
48
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { StaticImageData } from "next/image"
|
|
2
|
+
|
|
3
|
+
import RichText from "@/components/RichText"
|
|
4
|
+
import { cn } from "@/utilities/ui"
|
|
5
|
+
import type React from "react"
|
|
6
|
+
|
|
7
|
+
import type { MediaBlock as MediaBlockProps } from "@/payload-types"
|
|
8
|
+
|
|
9
|
+
import { Media } from "../../components/Media"
|
|
10
|
+
|
|
11
|
+
type Props = MediaBlockProps & {
|
|
12
|
+
breakout?: boolean
|
|
13
|
+
captionClassName?: string
|
|
14
|
+
className?: string
|
|
15
|
+
enableGutter?: boolean
|
|
16
|
+
imgClassName?: string
|
|
17
|
+
staticImage?: StaticImageData
|
|
18
|
+
disableInnerContainer?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const MediaBlock: React.FC<Props> = (props) => {
|
|
22
|
+
const {
|
|
23
|
+
captionClassName,
|
|
24
|
+
className,
|
|
25
|
+
enableGutter = true,
|
|
26
|
+
imgClassName,
|
|
27
|
+
media,
|
|
28
|
+
staticImage,
|
|
29
|
+
disableInnerContainer,
|
|
30
|
+
} = props
|
|
31
|
+
|
|
32
|
+
let caption
|
|
33
|
+
if (media && typeof media === "object") caption = media.caption
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
className={cn(
|
|
38
|
+
"",
|
|
39
|
+
{
|
|
40
|
+
container: enableGutter,
|
|
41
|
+
},
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
>
|
|
45
|
+
{(media || staticImage) && (
|
|
46
|
+
<Media
|
|
47
|
+
imgClassName={cn("border border-border rounded-[0.8rem]", imgClassName)}
|
|
48
|
+
resource={media}
|
|
49
|
+
src={staticImage}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
{caption && (
|
|
53
|
+
<div
|
|
54
|
+
className={cn(
|
|
55
|
+
"mt-6",
|
|
56
|
+
{
|
|
57
|
+
container: !disableInnerContainer,
|
|
58
|
+
},
|
|
59
|
+
captionClassName,
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
<RichText data={caption} enableGutter={false} />
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Award,
|
|
3
|
+
Briefcase,
|
|
4
|
+
Building,
|
|
5
|
+
Code,
|
|
6
|
+
Lightbulb,
|
|
7
|
+
type LucideIcon,
|
|
8
|
+
TrendingUp,
|
|
9
|
+
User,
|
|
10
|
+
Users,
|
|
11
|
+
} from "lucide-react"
|
|
12
|
+
import type React from "react"
|
|
13
|
+
|
|
14
|
+
import type { PersonasBlock as PersonasBlockProps } from "@/payload-types"
|
|
15
|
+
|
|
16
|
+
import RichText from "@/components/RichText"
|
|
17
|
+
|
|
18
|
+
const iconMap: Record<string, LucideIcon> = {
|
|
19
|
+
user: User,
|
|
20
|
+
briefcase: Briefcase,
|
|
21
|
+
users: Users,
|
|
22
|
+
award: Award,
|
|
23
|
+
building: Building,
|
|
24
|
+
lightbulb: Lightbulb,
|
|
25
|
+
trendingUp: TrendingUp,
|
|
26
|
+
code: Code,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const PersonasBlock: React.FC<PersonasBlockProps> = ({ heading, subheading, personas }) => {
|
|
30
|
+
return (
|
|
31
|
+
<section className="py-20 md:py-28">
|
|
32
|
+
<div className="container">
|
|
33
|
+
{(heading || subheading) && (
|
|
34
|
+
<div className="text-center mb-16 max-w-3xl mx-auto">
|
|
35
|
+
{heading && <h2 className="text-3xl md:text-4xl font-bold mb-4">{heading}</h2>}
|
|
36
|
+
{subheading && <p className="text-lg text-muted-foreground">{subheading}</p>}
|
|
37
|
+
</div>
|
|
38
|
+
)}
|
|
39
|
+
|
|
40
|
+
{Array.isArray(personas) && personas.length > 0 && (
|
|
41
|
+
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
|
|
42
|
+
{personas.map((persona, index) => {
|
|
43
|
+
const Icon = persona.icon ? iconMap[persona.icon] : User
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
key={index}
|
|
48
|
+
className="text-center p-8 rounded-lg border border-border bg-card hover:shadow-lg transition-shadow"
|
|
49
|
+
>
|
|
50
|
+
{Icon && (
|
|
51
|
+
<div className="w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
|
|
52
|
+
<Icon className="w-8 h-8 text-primary" />
|
|
53
|
+
</div>
|
|
54
|
+
)}
|
|
55
|
+
{persona.title && <h3 className="text-xl font-semibold mb-2">{persona.title}</h3>}
|
|
56
|
+
{persona.description && (
|
|
57
|
+
<div className="text-muted-foreground text-sm">
|
|
58
|
+
<RichText data={persona.description} enableGutter={false} />
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
)
|
|
63
|
+
})}
|
|
64
|
+
</div>
|
|
65
|
+
)}
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlignFeature,
|
|
5
|
+
BlockquoteFeature,
|
|
6
|
+
ChecklistFeature,
|
|
7
|
+
EXPERIMENTAL_TableFeature,
|
|
8
|
+
FixedToolbarFeature,
|
|
9
|
+
IndentFeature,
|
|
10
|
+
InlineCodeFeature,
|
|
11
|
+
InlineToolbarFeature,
|
|
12
|
+
OrderedListFeature,
|
|
13
|
+
RelationshipFeature,
|
|
14
|
+
StrikethroughFeature,
|
|
15
|
+
SubscriptFeature,
|
|
16
|
+
SuperscriptFeature,
|
|
17
|
+
UnorderedListFeature,
|
|
18
|
+
UploadFeature,
|
|
19
|
+
lexicalEditor,
|
|
20
|
+
} from "@payloadcms/richtext-lexical"
|
|
21
|
+
|
|
22
|
+
export const Personas: Block = {
|
|
23
|
+
slug: "personas",
|
|
24
|
+
interfaceName: "PersonasBlock",
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
name: "heading",
|
|
28
|
+
type: "text",
|
|
29
|
+
label: "Section Heading",
|
|
30
|
+
defaultValue: "Who It's For",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "subheading",
|
|
34
|
+
type: "textarea",
|
|
35
|
+
label: "Section Subheading",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "personas",
|
|
39
|
+
type: "array",
|
|
40
|
+
label: "Personas",
|
|
41
|
+
minRows: 1,
|
|
42
|
+
maxRows: 8,
|
|
43
|
+
fields: [
|
|
44
|
+
{
|
|
45
|
+
name: "icon",
|
|
46
|
+
type: "select",
|
|
47
|
+
options: [
|
|
48
|
+
{ label: "User", value: "user" },
|
|
49
|
+
{ label: "Briefcase", value: "briefcase" },
|
|
50
|
+
{ label: "Users", value: "users" },
|
|
51
|
+
{ label: "Award", value: "award" },
|
|
52
|
+
{ label: "Building", value: "building" },
|
|
53
|
+
{ label: "Lightbulb", value: "lightbulb" },
|
|
54
|
+
{ label: "TrendingUp", value: "trendingUp" },
|
|
55
|
+
{ label: "Code", value: "code" },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "title",
|
|
60
|
+
type: "text",
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "description",
|
|
65
|
+
type: "richText",
|
|
66
|
+
editor: lexicalEditor({
|
|
67
|
+
features: ({ rootFeatures }) => {
|
|
68
|
+
return [
|
|
69
|
+
...rootFeatures,
|
|
70
|
+
FixedToolbarFeature(),
|
|
71
|
+
InlineToolbarFeature(),
|
|
72
|
+
StrikethroughFeature(),
|
|
73
|
+
SubscriptFeature(),
|
|
74
|
+
SuperscriptFeature(),
|
|
75
|
+
InlineCodeFeature(),
|
|
76
|
+
BlockquoteFeature(),
|
|
77
|
+
UnorderedListFeature(),
|
|
78
|
+
OrderedListFeature(),
|
|
79
|
+
ChecklistFeature(),
|
|
80
|
+
AlignFeature(),
|
|
81
|
+
IndentFeature(),
|
|
82
|
+
RelationshipFeature(),
|
|
83
|
+
UploadFeature(),
|
|
84
|
+
EXPERIMENTAL_TableFeature(),
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
}),
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
labels: {
|
|
93
|
+
plural: "Personas Sections",
|
|
94
|
+
singular: "Personas",
|
|
95
|
+
},
|
|
96
|
+
}
|