kofi-stack-template-generator 2.1.37 → 2.1.38
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 +108 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/config.ts +109 -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,33 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
export const Code: Block = {
|
|
4
|
+
slug: "code",
|
|
5
|
+
interfaceName: "CodeBlock",
|
|
6
|
+
fields: [
|
|
7
|
+
{
|
|
8
|
+
name: "language",
|
|
9
|
+
type: "select",
|
|
10
|
+
defaultValue: "typescript",
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
label: "Typescript",
|
|
14
|
+
value: "typescript",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "Javascript",
|
|
18
|
+
value: "javascript",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "CSS",
|
|
22
|
+
value: "css",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "code",
|
|
28
|
+
type: "code",
|
|
29
|
+
label: false,
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import RichText from "@/components/RichText"
|
|
2
|
+
import type React from "react"
|
|
3
|
+
|
|
4
|
+
import type { ContentBlock as ContentBlockProps } from "@/payload-types"
|
|
5
|
+
|
|
6
|
+
import { CMSLink } from "../../components/Link"
|
|
7
|
+
|
|
8
|
+
// Use static class mappings for Tailwind to properly detect classes
|
|
9
|
+
const colSpanClasses: Record<string, string> = {
|
|
10
|
+
full: "col-span-4 lg:col-span-12",
|
|
11
|
+
half: "col-span-4 md:col-span-2 lg:col-span-6",
|
|
12
|
+
oneThird: "col-span-4 md:col-span-2 lg:col-span-4",
|
|
13
|
+
twoThirds: "col-span-4 md:col-span-2 lg:col-span-8",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const ContentBlock: React.FC<ContentBlockProps> = (props) => {
|
|
17
|
+
const { columns } = props
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className="container my-16">
|
|
21
|
+
<div className="grid grid-cols-4 lg:grid-cols-12 gap-y-8 gap-x-16">
|
|
22
|
+
{columns &&
|
|
23
|
+
columns.length > 0 &&
|
|
24
|
+
columns.map((col, index) => {
|
|
25
|
+
const { enableLink, link, richText, size } = col
|
|
26
|
+
const sizeKey = size || "full"
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className={colSpanClasses[sizeKey] || colSpanClasses.full} key={index}>
|
|
30
|
+
{richText && (
|
|
31
|
+
<RichText data={richText} enableGutter={false} className="max-w-none" />
|
|
32
|
+
)}
|
|
33
|
+
|
|
34
|
+
{enableLink && <CMSLink {...link} />}
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
})}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Block, Field } from "payload"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlignFeature,
|
|
5
|
+
BlockquoteFeature,
|
|
6
|
+
ChecklistFeature,
|
|
7
|
+
EXPERIMENTAL_TableFeature,
|
|
8
|
+
FixedToolbarFeature,
|
|
9
|
+
HeadingFeature,
|
|
10
|
+
IndentFeature,
|
|
11
|
+
InlineCodeFeature,
|
|
12
|
+
InlineToolbarFeature,
|
|
13
|
+
OrderedListFeature,
|
|
14
|
+
RelationshipFeature,
|
|
15
|
+
StrikethroughFeature,
|
|
16
|
+
SubscriptFeature,
|
|
17
|
+
SuperscriptFeature,
|
|
18
|
+
UnorderedListFeature,
|
|
19
|
+
UploadFeature,
|
|
20
|
+
lexicalEditor,
|
|
21
|
+
} from "@payloadcms/richtext-lexical"
|
|
22
|
+
|
|
23
|
+
import { link } from "@/fields/link"
|
|
24
|
+
|
|
25
|
+
const columnFields: Field[] = [
|
|
26
|
+
{
|
|
27
|
+
name: "size",
|
|
28
|
+
type: "select",
|
|
29
|
+
defaultValue: "oneThird",
|
|
30
|
+
options: [
|
|
31
|
+
{
|
|
32
|
+
label: "One Third",
|
|
33
|
+
value: "oneThird",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Half",
|
|
37
|
+
value: "half",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Two Thirds",
|
|
41
|
+
value: "twoThirds",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "Full",
|
|
45
|
+
value: "full",
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "richText",
|
|
51
|
+
type: "richText",
|
|
52
|
+
editor: lexicalEditor({
|
|
53
|
+
features: ({ rootFeatures }) => {
|
|
54
|
+
return [
|
|
55
|
+
...rootFeatures,
|
|
56
|
+
HeadingFeature({ enabledHeadingSizes: ["h2", "h3", "h4"] }),
|
|
57
|
+
FixedToolbarFeature(),
|
|
58
|
+
InlineToolbarFeature(),
|
|
59
|
+
StrikethroughFeature(),
|
|
60
|
+
SubscriptFeature(),
|
|
61
|
+
SuperscriptFeature(),
|
|
62
|
+
InlineCodeFeature(),
|
|
63
|
+
BlockquoteFeature(),
|
|
64
|
+
UnorderedListFeature(),
|
|
65
|
+
OrderedListFeature(),
|
|
66
|
+
ChecklistFeature(),
|
|
67
|
+
AlignFeature(),
|
|
68
|
+
IndentFeature(),
|
|
69
|
+
RelationshipFeature(),
|
|
70
|
+
UploadFeature(),
|
|
71
|
+
EXPERIMENTAL_TableFeature(),
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
label: false,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "enableLink",
|
|
79
|
+
type: "checkbox",
|
|
80
|
+
},
|
|
81
|
+
link({
|
|
82
|
+
overrides: {
|
|
83
|
+
admin: {
|
|
84
|
+
condition: (_data, siblingData) => {
|
|
85
|
+
return Boolean(siblingData?.enableLink)
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
export const Content: Block = {
|
|
93
|
+
slug: "content",
|
|
94
|
+
interfaceName: "ContentBlock",
|
|
95
|
+
fields: [
|
|
96
|
+
{
|
|
97
|
+
name: "columns",
|
|
98
|
+
type: "array",
|
|
99
|
+
admin: {
|
|
100
|
+
initCollapsed: true,
|
|
101
|
+
},
|
|
102
|
+
fields: columnFields,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import RichText from "@/components/RichText"
|
|
4
|
+
import {
|
|
5
|
+
Accordion,
|
|
6
|
+
AccordionContent,
|
|
7
|
+
AccordionItem,
|
|
8
|
+
AccordionTrigger,
|
|
9
|
+
} from "@/components/ui/accordion"
|
|
10
|
+
import type { FAQAccordionBlock as FAQAccordionBlockProps, Faq } from "@/payload-types"
|
|
11
|
+
import { cn } from "@/utilities/ui"
|
|
12
|
+
import type React from "react"
|
|
13
|
+
|
|
14
|
+
export const FAQAccordionBlock: React.FC<FAQAccordionBlockProps> = ({
|
|
15
|
+
heading,
|
|
16
|
+
subheading,
|
|
17
|
+
style = "default",
|
|
18
|
+
faqs,
|
|
19
|
+
}) => {
|
|
20
|
+
// Type guard to ensure we have FAQ objects, not just IDs
|
|
21
|
+
const faqItems = (faqs || []).filter((faq): faq is Faq => typeof faq === "object" && faq !== null)
|
|
22
|
+
|
|
23
|
+
if (faqItems.length === 0) {
|
|
24
|
+
return null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const isCentered = style === "centered"
|
|
28
|
+
const isTwoColumn = style === "twoColumn"
|
|
29
|
+
|
|
30
|
+
// Split FAQs into two columns for two-column layout
|
|
31
|
+
const midpoint = Math.ceil(faqItems.length / 2)
|
|
32
|
+
const leftColumnFaqs = isTwoColumn ? faqItems.slice(0, midpoint) : faqItems
|
|
33
|
+
const rightColumnFaqs = isTwoColumn ? faqItems.slice(midpoint) : []
|
|
34
|
+
|
|
35
|
+
const renderFAQAccordion = (items: Faq[], columnKey: string) => (
|
|
36
|
+
<Accordion type="single" collapsible className="w-full">
|
|
37
|
+
{items.map((faq, index) => (
|
|
38
|
+
<AccordionItem
|
|
39
|
+
key={faq.id || `${columnKey}-${index}`}
|
|
40
|
+
value={`${columnKey}-item-${index}`}
|
|
41
|
+
className="border-b border-border/50"
|
|
42
|
+
>
|
|
43
|
+
<AccordionTrigger className="text-left text-base md:text-lg font-semibold hover:no-underline py-5">
|
|
44
|
+
{faq.question}
|
|
45
|
+
</AccordionTrigger>
|
|
46
|
+
<AccordionContent className="text-muted-foreground pb-5">
|
|
47
|
+
{faq.answer && (
|
|
48
|
+
<RichText
|
|
49
|
+
data={faq.answer}
|
|
50
|
+
enableGutter={false}
|
|
51
|
+
enableProse={false}
|
|
52
|
+
className="prose-sm"
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
55
|
+
</AccordionContent>
|
|
56
|
+
</AccordionItem>
|
|
57
|
+
))}
|
|
58
|
+
</Accordion>
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<section className="py-16 md:py-24">
|
|
63
|
+
<div className="container">
|
|
64
|
+
{/* Header */}
|
|
65
|
+
{(heading || subheading) && (
|
|
66
|
+
<div className={cn("mb-12 md:mb-16", isCentered && "text-center max-w-3xl mx-auto")}>
|
|
67
|
+
{heading && (
|
|
68
|
+
<h2 className="text-3xl md:text-4xl lg:text-5xl font-bold tracking-tight mb-4">
|
|
69
|
+
{heading}
|
|
70
|
+
</h2>
|
|
71
|
+
)}
|
|
72
|
+
{subheading && <p className="text-lg md:text-xl text-muted-foreground">{subheading}</p>}
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
|
|
76
|
+
{/* FAQ Content */}
|
|
77
|
+
{isTwoColumn ? (
|
|
78
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-16">
|
|
79
|
+
<div>{renderFAQAccordion(leftColumnFaqs, "left")}</div>
|
|
80
|
+
<div>{renderFAQAccordion(rightColumnFaqs, "right")}</div>
|
|
81
|
+
</div>
|
|
82
|
+
) : (
|
|
83
|
+
<div className={cn(isCentered && "max-w-3xl mx-auto")}>
|
|
84
|
+
{renderFAQAccordion(faqItems, "main")}
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
</section>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { Block } from "payload"
|
|
2
|
+
|
|
3
|
+
export const FAQAccordion: Block = {
|
|
4
|
+
slug: "faqAccordion",
|
|
5
|
+
interfaceName: "FAQAccordionBlock",
|
|
6
|
+
labels: {
|
|
7
|
+
singular: "FAQ Accordion",
|
|
8
|
+
plural: "FAQ Accordions",
|
|
9
|
+
},
|
|
10
|
+
fields: [
|
|
11
|
+
{
|
|
12
|
+
name: "heading",
|
|
13
|
+
type: "text",
|
|
14
|
+
label: "Section Heading",
|
|
15
|
+
defaultValue: "Frequently Asked Questions",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "subheading",
|
|
19
|
+
type: "textarea",
|
|
20
|
+
label: "Section Subheading",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "style",
|
|
24
|
+
type: "select",
|
|
25
|
+
defaultValue: "default",
|
|
26
|
+
options: [
|
|
27
|
+
{ label: "Default", value: "default" },
|
|
28
|
+
{ label: "Centered", value: "centered" },
|
|
29
|
+
{ label: "Two Column", value: "twoColumn" },
|
|
30
|
+
],
|
|
31
|
+
admin: {
|
|
32
|
+
description: "Layout style for the FAQ section",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "faqs",
|
|
37
|
+
type: "relationship",
|
|
38
|
+
relationTo: "faqs",
|
|
39
|
+
hasMany: true,
|
|
40
|
+
label: "FAQs to Display",
|
|
41
|
+
admin: {
|
|
42
|
+
description: "Select FAQs to display in this section. Leave empty to show all FAQs.",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "filterByCategory",
|
|
47
|
+
type: "select",
|
|
48
|
+
label: "Filter by Category",
|
|
49
|
+
options: [
|
|
50
|
+
{ label: "All Categories", value: "all" },
|
|
51
|
+
{ label: "General", value: "general" },
|
|
52
|
+
{ label: "Pricing", value: "pricing" },
|
|
53
|
+
{ label: "Features", value: "features" },
|
|
54
|
+
{ label: "Getting Started", value: "getting-started" },
|
|
55
|
+
{ label: "Technical", value: "technical" },
|
|
56
|
+
{ label: "Support", value: "support" },
|
|
57
|
+
],
|
|
58
|
+
defaultValue: "all",
|
|
59
|
+
admin: {
|
|
60
|
+
condition: (data, siblingData) => !siblingData?.faqs?.length,
|
|
61
|
+
description: "Only used when no specific FAQs are selected",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "maxItems",
|
|
66
|
+
type: "number",
|
|
67
|
+
label: "Maximum Items",
|
|
68
|
+
defaultValue: 10,
|
|
69
|
+
admin: {
|
|
70
|
+
condition: (data, siblingData) => !siblingData?.faqs?.length,
|
|
71
|
+
description: "Maximum number of FAQs to display (only when using category filter)",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BarChart3,
|
|
3
|
+
Building,
|
|
4
|
+
Database,
|
|
5
|
+
DollarSign,
|
|
6
|
+
Globe,
|
|
7
|
+
Layers,
|
|
8
|
+
Layout,
|
|
9
|
+
type LucideIcon,
|
|
10
|
+
Rocket,
|
|
11
|
+
Search,
|
|
12
|
+
Settings,
|
|
13
|
+
Shield,
|
|
14
|
+
Star,
|
|
15
|
+
Target,
|
|
16
|
+
Users,
|
|
17
|
+
Zap,
|
|
18
|
+
} from "lucide-react"
|
|
19
|
+
import type React from "react"
|
|
20
|
+
|
|
21
|
+
import type { FeatureGridBlock as FeatureGridBlockProps } from "@/payload-types"
|
|
22
|
+
|
|
23
|
+
import RichText from "@/components/RichText"
|
|
24
|
+
import { cn } from "@/utilities/ui"
|
|
25
|
+
|
|
26
|
+
const iconMap: Record<string, LucideIcon> = {
|
|
27
|
+
rocket: Rocket,
|
|
28
|
+
zap: Zap,
|
|
29
|
+
building: Building,
|
|
30
|
+
target: Target,
|
|
31
|
+
layout: Layout,
|
|
32
|
+
star: Star,
|
|
33
|
+
dollarSign: DollarSign,
|
|
34
|
+
search: Search,
|
|
35
|
+
users: Users,
|
|
36
|
+
globe: Globe,
|
|
37
|
+
shield: Shield,
|
|
38
|
+
settings: Settings,
|
|
39
|
+
database: Database,
|
|
40
|
+
barChart: BarChart3,
|
|
41
|
+
layers: Layers,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const FeatureGridBlock: React.FC<FeatureGridBlockProps> = ({
|
|
45
|
+
heading,
|
|
46
|
+
subheading,
|
|
47
|
+
columns,
|
|
48
|
+
features,
|
|
49
|
+
}) => {
|
|
50
|
+
const gridCols: Record<string, string> = {
|
|
51
|
+
"2": "md:grid-cols-2",
|
|
52
|
+
"3": "md:grid-cols-2 lg:grid-cols-3",
|
|
53
|
+
"4": "md:grid-cols-2 lg:grid-cols-4",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const columnClass = columns && columns in gridCols ? gridCols[columns] : gridCols["3"]
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<section className="py-20 md:py-28">
|
|
60
|
+
<div className="container">
|
|
61
|
+
{(heading || subheading) && (
|
|
62
|
+
<div className="text-center mb-16 max-w-3xl mx-auto">
|
|
63
|
+
{heading && <h2 className="text-3xl md:text-4xl font-bold mb-4">{heading}</h2>}
|
|
64
|
+
{subheading && <p className="text-lg text-muted-foreground">{subheading}</p>}
|
|
65
|
+
</div>
|
|
66
|
+
)}
|
|
67
|
+
|
|
68
|
+
{Array.isArray(features) && features.length > 0 && (
|
|
69
|
+
<div className={cn("grid gap-6 lg:gap-8", columnClass)}>
|
|
70
|
+
{features.map((feature, index) => {
|
|
71
|
+
const iconKey = feature.icon
|
|
72
|
+
const Icon =
|
|
73
|
+
iconKey && iconKey in iconMap ? iconMap[iconKey as keyof typeof iconMap] : null
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<div
|
|
77
|
+
key={index}
|
|
78
|
+
className="group relative p-6 lg:p-8 rounded-xl border border-border bg-card hover:border-primary/30 hover:shadow-lg transition-all duration-300"
|
|
79
|
+
>
|
|
80
|
+
{/* Subtle gradient hover effect */}
|
|
81
|
+
<div className="absolute inset-0 rounded-xl bg-gradient-to-br from-primary/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
|
|
82
|
+
|
|
83
|
+
<div className="relative">
|
|
84
|
+
{Icon && (
|
|
85
|
+
<div className="w-14 h-14 rounded-xl bg-primary/10 flex items-center justify-center mb-5 group-hover:bg-primary/15 group-hover:scale-105 transition-all duration-300">
|
|
86
|
+
<Icon className="w-7 h-7 text-primary" />
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
{feature.title && (
|
|
90
|
+
<h3 className="text-lg lg:text-xl font-semibold mb-3 group-hover:text-primary transition-colors duration-300">
|
|
91
|
+
{feature.title}
|
|
92
|
+
</h3>
|
|
93
|
+
)}
|
|
94
|
+
{feature.description && (
|
|
95
|
+
<div className="text-muted-foreground text-sm lg:text-base leading-relaxed">
|
|
96
|
+
<RichText data={feature.description} enableGutter={false} />
|
|
97
|
+
</div>
|
|
98
|
+
)}
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
)
|
|
102
|
+
})}
|
|
103
|
+
</div>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
</section>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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 FeatureGrid: Block = {
|
|
23
|
+
slug: "featureGrid",
|
|
24
|
+
interfaceName: "FeatureGridBlock",
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
name: "heading",
|
|
28
|
+
type: "text",
|
|
29
|
+
label: "Section Heading",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "subheading",
|
|
33
|
+
type: "textarea",
|
|
34
|
+
label: "Section Subheading",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "columns",
|
|
38
|
+
type: "select",
|
|
39
|
+
defaultValue: "3",
|
|
40
|
+
options: [
|
|
41
|
+
{ label: "2 Columns", value: "2" },
|
|
42
|
+
{ label: "3 Columns", value: "3" },
|
|
43
|
+
{ label: "4 Columns", value: "4" },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "features",
|
|
48
|
+
type: "array",
|
|
49
|
+
label: "Features",
|
|
50
|
+
minRows: 1,
|
|
51
|
+
maxRows: 12,
|
|
52
|
+
fields: [
|
|
53
|
+
{
|
|
54
|
+
name: "icon",
|
|
55
|
+
type: "select",
|
|
56
|
+
options: [
|
|
57
|
+
{ label: "Rocket", value: "rocket" },
|
|
58
|
+
{ label: "Zap", value: "zap" },
|
|
59
|
+
{ label: "Building", value: "building" },
|
|
60
|
+
{ label: "Target", value: "target" },
|
|
61
|
+
{ label: "Layout", value: "layout" },
|
|
62
|
+
{ label: "Star", value: "star" },
|
|
63
|
+
{ label: "DollarSign", value: "dollarSign" },
|
|
64
|
+
{ label: "Search", value: "search" },
|
|
65
|
+
{ label: "Users", value: "users" },
|
|
66
|
+
{ label: "Globe", value: "globe" },
|
|
67
|
+
{ label: "Shield", value: "shield" },
|
|
68
|
+
{ label: "Settings", value: "settings" },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "title",
|
|
73
|
+
type: "text",
|
|
74
|
+
required: true,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "description",
|
|
78
|
+
type: "richText",
|
|
79
|
+
editor: lexicalEditor({
|
|
80
|
+
features: ({ rootFeatures }) => {
|
|
81
|
+
return [
|
|
82
|
+
...rootFeatures,
|
|
83
|
+
FixedToolbarFeature(),
|
|
84
|
+
InlineToolbarFeature(),
|
|
85
|
+
StrikethroughFeature(),
|
|
86
|
+
SubscriptFeature(),
|
|
87
|
+
SuperscriptFeature(),
|
|
88
|
+
InlineCodeFeature(),
|
|
89
|
+
BlockquoteFeature(),
|
|
90
|
+
UnorderedListFeature(),
|
|
91
|
+
OrderedListFeature(),
|
|
92
|
+
ChecklistFeature(),
|
|
93
|
+
AlignFeature(),
|
|
94
|
+
IndentFeature(),
|
|
95
|
+
RelationshipFeature(),
|
|
96
|
+
UploadFeature(),
|
|
97
|
+
EXPERIMENTAL_TableFeature(),
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
}),
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
labels: {
|
|
106
|
+
plural: "Feature Grids",
|
|
107
|
+
singular: "Feature Grid",
|
|
108
|
+
},
|
|
109
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { CheckCircle2 } from "lucide-react"
|
|
2
|
+
import type React from "react"
|
|
3
|
+
|
|
4
|
+
import type { FeatureShowcaseBlock as FeatureShowcaseBlockProps } from "@/payload-types"
|
|
5
|
+
|
|
6
|
+
import { CMSLink } from "@/components/Link"
|
|
7
|
+
import { Media } from "@/components/Media"
|
|
8
|
+
import RichText from "@/components/RichText"
|
|
9
|
+
import { cn } from "@/utilities/ui"
|
|
10
|
+
|
|
11
|
+
export const FeatureShowcaseBlock: React.FC<FeatureShowcaseBlockProps> = ({
|
|
12
|
+
label,
|
|
13
|
+
headline,
|
|
14
|
+
description,
|
|
15
|
+
link,
|
|
16
|
+
media,
|
|
17
|
+
imagePosition = "right",
|
|
18
|
+
features,
|
|
19
|
+
}) => {
|
|
20
|
+
const isImageLeft = imagePosition === "left"
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<section className="py-16 md:py-24">
|
|
24
|
+
<div className="container">
|
|
25
|
+
<div
|
|
26
|
+
className={cn(
|
|
27
|
+
"grid gap-12 lg:gap-16 items-center",
|
|
28
|
+
"lg:grid-cols-2",
|
|
29
|
+
isImageLeft && "lg:[direction:rtl]",
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
{/* Content Side */}
|
|
33
|
+
<div className={cn("lg:[direction:ltr]", "max-w-xl")}>
|
|
34
|
+
{label && (
|
|
35
|
+
<span className="inline-block text-sm font-medium text-secondary mb-4 tracking-wide">
|
|
36
|
+
{label}
|
|
37
|
+
</span>
|
|
38
|
+
)}
|
|
39
|
+
|
|
40
|
+
{headline && (
|
|
41
|
+
<h2 className="text-3xl md:text-4xl lg:text-5xl font-bold mb-6 leading-tight">
|
|
42
|
+
{headline}
|
|
43
|
+
</h2>
|
|
44
|
+
)}
|
|
45
|
+
|
|
46
|
+
{description && (
|
|
47
|
+
<div className="text-lg text-muted-foreground mb-6">
|
|
48
|
+
<RichText data={description} enableGutter={false} />
|
|
49
|
+
</div>
|
|
50
|
+
)}
|
|
51
|
+
|
|
52
|
+
{/* Feature Bullets */}
|
|
53
|
+
{Array.isArray(features) && features.length > 0 && (
|
|
54
|
+
<ul className="space-y-3 mb-8">
|
|
55
|
+
{features.map((feature, index) => (
|
|
56
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: CMS items don't have stable IDs
|
|
57
|
+
<li key={index} className="flex items-start gap-3">
|
|
58
|
+
<CheckCircle2 className="w-5 h-5 text-secondary mt-0.5 flex-shrink-0" />
|
|
59
|
+
<span className="text-muted-foreground">{feature.text}</span>
|
|
60
|
+
</li>
|
|
61
|
+
))}
|
|
62
|
+
</ul>
|
|
63
|
+
)}
|
|
64
|
+
|
|
65
|
+
{link?.label && <CMSLink {...link} size="lg" />}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
{/* Image Side */}
|
|
69
|
+
<div className={cn("lg:[direction:ltr]", "relative")}>
|
|
70
|
+
{media && typeof media === "object" ? (
|
|
71
|
+
<div className="relative rounded-xl overflow-hidden bg-muted">
|
|
72
|
+
<Media
|
|
73
|
+
resource={media}
|
|
74
|
+
imgClassName="w-full h-auto object-cover"
|
|
75
|
+
size="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 600px"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
) : (
|
|
79
|
+
/* Placeholder when no image */
|
|
80
|
+
<div className="relative rounded-xl overflow-hidden bg-gradient-to-br from-muted to-accent aspect-[4/3] flex items-center justify-center">
|
|
81
|
+
<div className="text-center p-8">
|
|
82
|
+
<div className="w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4">
|
|
83
|
+
<svg
|
|
84
|
+
className="w-8 h-8 text-primary"
|
|
85
|
+
fill="none"
|
|
86
|
+
viewBox="0 0 24 24"
|
|
87
|
+
stroke="currentColor"
|
|
88
|
+
aria-hidden="true"
|
|
89
|
+
>
|
|
90
|
+
<path
|
|
91
|
+
strokeLinecap="round"
|
|
92
|
+
strokeLinejoin="round"
|
|
93
|
+
strokeWidth={1.5}
|
|
94
|
+
d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
95
|
+
/>
|
|
96
|
+
</svg>
|
|
97
|
+
</div>
|
|
98
|
+
<p className="text-sm text-muted-foreground">Feature image placeholder</p>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</section>
|
|
106
|
+
)
|
|
107
|
+
}
|