kofi-stack-template-generator 2.1.36 → 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 +8059 -441
- package/package.json +1 -1
- package/src/templates.generated.ts +250 -95
- 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/package.json.hbs +4 -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/app/globals.css.hbs → packages/ui/src/styles.css.hbs} +39 -1
- 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/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 -32
- 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,73 @@
|
|
|
1
|
+
import type React from "react"
|
|
2
|
+
import { formatDateTime } from "src/utilities/formatDateTime"
|
|
3
|
+
|
|
4
|
+
import type { Post } from "@/payload-types"
|
|
5
|
+
|
|
6
|
+
import { formatAuthors } from "@/utilities/formatAuthors"
|
|
7
|
+
import Link from "next/link"
|
|
8
|
+
|
|
9
|
+
export const PostHero: React.FC<{
|
|
10
|
+
post: Post
|
|
11
|
+
}> = ({ post }) => {
|
|
12
|
+
const { categories, populatedAuthors, publishedAt, title } = post
|
|
13
|
+
|
|
14
|
+
const hasAuthors =
|
|
15
|
+
populatedAuthors && populatedAuthors.length > 0 && formatAuthors(populatedAuthors) !== ""
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div
|
|
19
|
+
className="relative"
|
|
20
|
+
style={{
|
|
21
|
+
background: "linear-gradient(180deg, #0F1F3D 0%, #101F3C 50%, #0F1F3D 100%)",
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
<div className="container py-16 md:py-20 lg:py-24">
|
|
25
|
+
<div className="max-w-3xl">
|
|
26
|
+
{/* Category Badge */}
|
|
27
|
+
{categories && categories.length > 0 && (
|
|
28
|
+
<div className="flex items-center gap-2 mb-6">
|
|
29
|
+
{categories.map((category) => {
|
|
30
|
+
if (typeof category === "object" && category !== null) {
|
|
31
|
+
const { title: categoryTitle, slug, id } = category
|
|
32
|
+
const titleToUse = categoryTitle || "Untitled category"
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Link
|
|
36
|
+
key={id || slug}
|
|
37
|
+
href={`/posts?category=${slug}`}
|
|
38
|
+
className="inline-flex items-center px-3 py-1 text-xs font-medium uppercase tracking-wider text-[#3DA9A3] bg-[#3DA9A3]/10 rounded-full hover:bg-[#3DA9A3]/20 transition-colors"
|
|
39
|
+
>
|
|
40
|
+
{titleToUse}
|
|
41
|
+
</Link>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
return null
|
|
45
|
+
})}
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
|
|
49
|
+
{/* Title */}
|
|
50
|
+
<h1 className="text-3xl md:text-4xl lg:text-5xl font-bold text-white leading-tight mb-8">
|
|
51
|
+
{title}
|
|
52
|
+
</h1>
|
|
53
|
+
|
|
54
|
+
{/* Meta Information */}
|
|
55
|
+
<div className="flex items-center gap-6 text-sm text-white/70">
|
|
56
|
+
{hasAuthors && (
|
|
57
|
+
<div className="flex items-center gap-2">
|
|
58
|
+
<span className="text-white/50">By</span>
|
|
59
|
+
<span className="text-white font-medium">{formatAuthors(populatedAuthors)}</span>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
{hasAuthors && publishedAt && <span className="text-white/30">•</span>}
|
|
63
|
+
{publishedAt && (
|
|
64
|
+
<time dateTime={publishedAt} className="text-white/70">
|
|
65
|
+
{formatDateTime(publishedAt)}
|
|
66
|
+
</time>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/utilities/ui"
|
|
4
|
+
import type React from "react"
|
|
5
|
+
import { useEffect, useState } from "react"
|
|
6
|
+
|
|
7
|
+
interface MockupState {
|
|
8
|
+
id: number
|
|
9
|
+
label: string
|
|
10
|
+
sidebarActive: string
|
|
11
|
+
previewTitle: string
|
|
12
|
+
previewDescription: string
|
|
13
|
+
previewCategory: string
|
|
14
|
+
previewStatus: "draft" | "published" | "featured"
|
|
15
|
+
previewUrl?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const mockupStates: MockupState[] = [
|
|
19
|
+
{
|
|
20
|
+
id: 1,
|
|
21
|
+
label: "Setup & styling",
|
|
22
|
+
sidebarActive: "templates",
|
|
23
|
+
previewTitle: "Atlas Directory",
|
|
24
|
+
previewDescription: "Apply your brand, typography, and layout in minutes.",
|
|
25
|
+
previewCategory: "Design systems",
|
|
26
|
+
previewStatus: "draft",
|
|
27
|
+
previewUrl: "atlas.directory/home",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 2,
|
|
31
|
+
label: "Plans & pricing",
|
|
32
|
+
sidebarActive: "billing",
|
|
33
|
+
previewTitle: "Pro Listing Plan",
|
|
34
|
+
previewDescription: "Recurring billing, featured placements, and add-ons configured.",
|
|
35
|
+
previewCategory: "Monetization",
|
|
36
|
+
previewStatus: "draft",
|
|
37
|
+
previewUrl: "atlas.directory/billing",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 3,
|
|
41
|
+
label: "SEO & publishing",
|
|
42
|
+
sidebarActive: "seo",
|
|
43
|
+
previewTitle: "Atlas Directory",
|
|
44
|
+
previewDescription: "Schema, sitemap, and custom domain are ready to publish.",
|
|
45
|
+
previewCategory: "SEO & domains",
|
|
46
|
+
previewStatus: "published",
|
|
47
|
+
previewUrl: "atlas.directory/launch",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 4,
|
|
51
|
+
label: "Payouts live",
|
|
52
|
+
sidebarActive: "overview",
|
|
53
|
+
previewTitle: "Atlas Directory",
|
|
54
|
+
previewDescription: "Subscribers active, payouts scheduled to Stripe, featured slots sold.",
|
|
55
|
+
previewCategory: "Revenue",
|
|
56
|
+
previewStatus: "featured",
|
|
57
|
+
previewUrl: "atlas.directory/analytics",
|
|
58
|
+
},
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
export const AnimatedMockup: React.FC = () => {
|
|
62
|
+
const [currentState, setCurrentState] = useState(0)
|
|
63
|
+
const [isPaused, setIsPaused] = useState(false)
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (isPaused) return
|
|
67
|
+
|
|
68
|
+
const interval = setInterval(() => {
|
|
69
|
+
setCurrentState((prev) => (prev + 1) % mockupStates.length)
|
|
70
|
+
}, 3000)
|
|
71
|
+
|
|
72
|
+
return () => clearInterval(interval)
|
|
73
|
+
}, [isPaused])
|
|
74
|
+
|
|
75
|
+
const state = mockupStates[currentState]
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<div
|
|
79
|
+
className="mockup-wrapper"
|
|
80
|
+
onMouseEnter={() => setIsPaused(true)}
|
|
81
|
+
onMouseLeave={() => setIsPaused(false)}
|
|
82
|
+
>
|
|
83
|
+
{/* Browser Chrome */}
|
|
84
|
+
<div className="mockup-chrome">
|
|
85
|
+
<div className="mockup-chrome-dots">
|
|
86
|
+
<span className="dot dot-red" />
|
|
87
|
+
<span className="dot dot-yellow" />
|
|
88
|
+
<span className="dot dot-green" />
|
|
89
|
+
</div>
|
|
90
|
+
<div className="mockup-chrome-title">DirectoryHub</div>
|
|
91
|
+
<div className="mockup-chrome-actions" />
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
{/* App Content */}
|
|
95
|
+
<div className="mockup-content">
|
|
96
|
+
{/* Sidebar */}
|
|
97
|
+
<div className="mockup-sidebar">
|
|
98
|
+
<div className="sidebar-header">
|
|
99
|
+
<div className="sidebar-logo">
|
|
100
|
+
<span className="logo-icon">D</span>
|
|
101
|
+
<span className="logo-text">My Directory</span>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<nav className="sidebar-nav">
|
|
105
|
+
<SidebarItem icon="📊" label="Overview" active={state.sidebarActive === "overview"} />
|
|
106
|
+
<SidebarItem icon="🖼️" label="Templates" active={state.sidebarActive === "templates"} />
|
|
107
|
+
<SidebarItem
|
|
108
|
+
icon="📋"
|
|
109
|
+
label="Listings"
|
|
110
|
+
active={state.sidebarActive === "listings"}
|
|
111
|
+
badge={24}
|
|
112
|
+
/>
|
|
113
|
+
<SidebarItem
|
|
114
|
+
icon="💳"
|
|
115
|
+
label="Plans & Billing"
|
|
116
|
+
active={state.sidebarActive === "billing"}
|
|
117
|
+
/>
|
|
118
|
+
<SidebarItem
|
|
119
|
+
icon="⚡"
|
|
120
|
+
label="Automations"
|
|
121
|
+
active={state.sidebarActive === "automations"}
|
|
122
|
+
/>
|
|
123
|
+
<SidebarItem icon="🔎" label="SEO" active={state.sidebarActive === "seo"} />
|
|
124
|
+
<SidebarItem icon="⚙️" label="Settings" active={state.sidebarActive === "settings"} />
|
|
125
|
+
</nav>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{/* Main Content Area */}
|
|
129
|
+
<div className="mockup-main">
|
|
130
|
+
{/* Header */}
|
|
131
|
+
<div className="main-header">
|
|
132
|
+
<div className="header-title">
|
|
133
|
+
<h2>{state.label}</h2>
|
|
134
|
+
<span className="header-breadcrumb">DirectoryHub / {state.previewTitle}</span>
|
|
135
|
+
</div>
|
|
136
|
+
<div className="header-actions">
|
|
137
|
+
<button
|
|
138
|
+
type="button"
|
|
139
|
+
className={cn(
|
|
140
|
+
"action-btn",
|
|
141
|
+
state.previewStatus === "published" && "action-btn--success",
|
|
142
|
+
state.previewStatus === "featured" && "action-btn--featured",
|
|
143
|
+
)}
|
|
144
|
+
>
|
|
145
|
+
{state.previewStatus === "draft" && "Save Draft"}
|
|
146
|
+
{state.previewStatus === "published" && "✓ Published"}
|
|
147
|
+
{state.previewStatus === "featured" && "⭐ Featured"}
|
|
148
|
+
</button>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
{/* Split View: Editor + Preview */}
|
|
153
|
+
<div className="main-split">
|
|
154
|
+
{/* Editor Panel */}
|
|
155
|
+
<div className="editor-panel">
|
|
156
|
+
<div className="editor-section">
|
|
157
|
+
<span className="editor-label">Listing Name</span>
|
|
158
|
+
<div className="editor-input">
|
|
159
|
+
<span className="input-text">{state.previewTitle}</span>
|
|
160
|
+
<span className="input-cursor" />
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div className="editor-section">
|
|
164
|
+
<span className="editor-label">Category</span>
|
|
165
|
+
<div className="editor-select">
|
|
166
|
+
<span>{state.previewCategory}</span>
|
|
167
|
+
<span className="select-arrow">▼</span>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div className="editor-section">
|
|
171
|
+
<span className="editor-label">Description</span>
|
|
172
|
+
<div className="editor-textarea">
|
|
173
|
+
<span className={cn("textarea-text", state.id >= 2 && "textarea-text--complete")}>
|
|
174
|
+
{state.previewDescription}
|
|
175
|
+
</span>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
{/* Preview Panel */}
|
|
181
|
+
<div className="preview-panel">
|
|
182
|
+
<div className="preview-header">
|
|
183
|
+
<span className="preview-label">Live Preview</span>
|
|
184
|
+
<span className="preview-url">{state.previewUrl ?? "directoryhub.app/live"}</span>
|
|
185
|
+
</div>
|
|
186
|
+
<div className="preview-card">
|
|
187
|
+
{state.previewStatus === "featured" && (
|
|
188
|
+
<div className="preview-badge">⭐ Featured</div>
|
|
189
|
+
)}
|
|
190
|
+
<div className="preview-image">
|
|
191
|
+
<div className="preview-image-placeholder">
|
|
192
|
+
<span>🏢</span>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
<div className="preview-content">
|
|
196
|
+
<span className="preview-category-tag">{state.previewCategory}</span>
|
|
197
|
+
<h3 className="preview-title">{state.previewTitle}</h3>
|
|
198
|
+
<p className="preview-description">{state.previewDescription}</p>
|
|
199
|
+
<div className="preview-meta">
|
|
200
|
+
<span className="meta-rating">★★★★★</span>
|
|
201
|
+
<span className="meta-reviews">24 reviews</span>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
{/* State Indicator */}
|
|
211
|
+
<div className="mockup-indicators">
|
|
212
|
+
{mockupStates.map((s, i) => (
|
|
213
|
+
<button
|
|
214
|
+
type="button"
|
|
215
|
+
key={s.id}
|
|
216
|
+
onClick={() => setCurrentState(i)}
|
|
217
|
+
className={cn("indicator", i === currentState && "indicator--active")}
|
|
218
|
+
>
|
|
219
|
+
<span className="indicator-dot" />
|
|
220
|
+
<span className="indicator-label">{s.label}</span>
|
|
221
|
+
</button>
|
|
222
|
+
))}
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
interface SidebarItemProps {
|
|
229
|
+
icon: string
|
|
230
|
+
label: string
|
|
231
|
+
active?: boolean
|
|
232
|
+
badge?: number
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const SidebarItem: React.FC<SidebarItemProps> = ({ icon, label, active, badge }) => (
|
|
236
|
+
<div className={cn("sidebar-item", active && "sidebar-item--active")}>
|
|
237
|
+
<span className="sidebar-icon">{icon}</span>
|
|
238
|
+
<span className="sidebar-label">{label}</span>
|
|
239
|
+
{badge && <span className="sidebar-badge">{badge}</span>}
|
|
240
|
+
</div>
|
|
241
|
+
)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useHeaderTheme } from "@/providers/HeaderTheme"
|
|
4
|
+
import Image from "next/image"
|
|
5
|
+
import type React from "react"
|
|
6
|
+
import { useEffect } from "react"
|
|
7
|
+
|
|
8
|
+
import type { Page } from "@/payload-types"
|
|
9
|
+
|
|
10
|
+
import { CTATracker } from "@/components/Analytics"
|
|
11
|
+
import { CMSLink } from "@/components/Link"
|
|
12
|
+
import { Media } from "@/components/Media"
|
|
13
|
+
import RichText from "@/components/RichText"
|
|
14
|
+
import { AnimatedMockup } from "./AnimatedMockup"
|
|
15
|
+
|
|
16
|
+
export const ProductShowcaseHero: React.FC<Page["hero"]> = ({
|
|
17
|
+
links,
|
|
18
|
+
richText,
|
|
19
|
+
media,
|
|
20
|
+
backgroundMedia,
|
|
21
|
+
}) => {
|
|
22
|
+
const { setHeaderTheme } = useHeaderTheme()
|
|
23
|
+
const hasMedia = media && typeof media === "object"
|
|
24
|
+
const hasBackgroundMedia = backgroundMedia && typeof backgroundMedia === "object"
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
setHeaderTheme("light")
|
|
28
|
+
}, [setHeaderTheme])
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className="relative overflow-hidden">
|
|
32
|
+
{/* Hero Content - Left Aligned */}
|
|
33
|
+
<div className="container mx-auto px-4 pt-8 pb-16 md:pt-16 md:pb-24">
|
|
34
|
+
<div className="max-w-2xl">
|
|
35
|
+
{richText && (
|
|
36
|
+
<RichText
|
|
37
|
+
className="mb-8 hero-content hero-content--left"
|
|
38
|
+
data={richText}
|
|
39
|
+
enableGutter={false}
|
|
40
|
+
enableProse={false}
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
{Array.isArray(links) && links.length > 0 && (
|
|
44
|
+
<ul className="flex flex-wrap gap-4">
|
|
45
|
+
{links.map(({ link }, i) => {
|
|
46
|
+
return (
|
|
47
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: Links are static and don't reorder
|
|
48
|
+
<li key={i}>
|
|
49
|
+
<CTATracker
|
|
50
|
+
location="hero_product_showcase"
|
|
51
|
+
variant={link?.label || `cta_${i}`}
|
|
52
|
+
>
|
|
53
|
+
<CMSLink {...link} size="lg" />
|
|
54
|
+
</CTATracker>
|
|
55
|
+
</li>
|
|
56
|
+
)
|
|
57
|
+
})}
|
|
58
|
+
</ul>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
{/* Product Mockup Section (Cursor-style) */}
|
|
64
|
+
<div className="container mx-auto px-4">
|
|
65
|
+
<div className="hero-showcase">
|
|
66
|
+
{/* Background Image - LCP element, needs fetchPriority="high" */}
|
|
67
|
+
<div className="hero-bg-image">
|
|
68
|
+
{hasBackgroundMedia ? (
|
|
69
|
+
<Media
|
|
70
|
+
resource={backgroundMedia}
|
|
71
|
+
fill
|
|
72
|
+
imgClassName="object-cover"
|
|
73
|
+
priority
|
|
74
|
+
size="100vw"
|
|
75
|
+
/>
|
|
76
|
+
) : (
|
|
77
|
+
<Image
|
|
78
|
+
src="/media/hero-bg.png"
|
|
79
|
+
alt=""
|
|
80
|
+
fill
|
|
81
|
+
sizes="(max-width: 1280px) 100vw, 1280px"
|
|
82
|
+
className="object-cover"
|
|
83
|
+
priority
|
|
84
|
+
fetchPriority="high"
|
|
85
|
+
quality={75}
|
|
86
|
+
/>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
{/* Mockup - centered within background */}
|
|
91
|
+
<div className="hero-mockup-centered">
|
|
92
|
+
{hasMedia ? (
|
|
93
|
+
<div className="mockup-wrapper">
|
|
94
|
+
<Media
|
|
95
|
+
resource={media}
|
|
96
|
+
imgClassName="w-full h-auto object-contain"
|
|
97
|
+
size="(max-width: 768px) 100vw, (max-width: 1024px) 80vw, 960px"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
) : (
|
|
101
|
+
<AnimatedMockup />
|
|
102
|
+
)}
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
@@ -8,20 +8,20 @@ import { MediumImpactHero } from "@/heros/MediumImpact"
|
|
|
8
8
|
import { ProductShowcaseHero } from "@/heros/ProductShowcase"
|
|
9
9
|
|
|
10
10
|
const heroes = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
highImpact: HighImpactHero,
|
|
12
|
+
lowImpact: LowImpactHero,
|
|
13
|
+
mediumImpact: MediumImpactHero,
|
|
14
|
+
productShowcase: ProductShowcaseHero,
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export const RenderHero: React.FC<Page["hero"]> = (props) => {
|
|
18
|
-
|
|
18
|
+
const { type } = props || {}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
if (!type || type === "none") return null
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const HeroToRender = heroes[type]
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
if (!HeroToRender) return null
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
return <HeroToRender {...props} />
|
|
27
27
|
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { 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 { linkGroup } from "@/fields/linkGroup"
|
|
24
|
+
|
|
25
|
+
export const hero: Field = {
|
|
26
|
+
name: "hero",
|
|
27
|
+
type: "group",
|
|
28
|
+
fields: [
|
|
29
|
+
{
|
|
30
|
+
name: "type",
|
|
31
|
+
type: "select",
|
|
32
|
+
defaultValue: "lowImpact",
|
|
33
|
+
label: "Type",
|
|
34
|
+
options: [
|
|
35
|
+
{
|
|
36
|
+
label: "None",
|
|
37
|
+
value: "none",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Product Showcase",
|
|
41
|
+
value: "productShowcase",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "High Impact",
|
|
45
|
+
value: "highImpact",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "Medium Impact",
|
|
49
|
+
value: "mediumImpact",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Low Impact",
|
|
53
|
+
value: "lowImpact",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "richText",
|
|
60
|
+
type: "richText",
|
|
61
|
+
editor: lexicalEditor({
|
|
62
|
+
features: ({ rootFeatures }) => {
|
|
63
|
+
return [
|
|
64
|
+
...rootFeatures,
|
|
65
|
+
HeadingFeature({ enabledHeadingSizes: ["h1", "h2", "h3", "h4"] }),
|
|
66
|
+
FixedToolbarFeature(),
|
|
67
|
+
InlineToolbarFeature(),
|
|
68
|
+
StrikethroughFeature(),
|
|
69
|
+
SubscriptFeature(),
|
|
70
|
+
SuperscriptFeature(),
|
|
71
|
+
InlineCodeFeature(),
|
|
72
|
+
BlockquoteFeature(),
|
|
73
|
+
UnorderedListFeature(),
|
|
74
|
+
OrderedListFeature(),
|
|
75
|
+
ChecklistFeature(),
|
|
76
|
+
AlignFeature(),
|
|
77
|
+
IndentFeature(),
|
|
78
|
+
RelationshipFeature(),
|
|
79
|
+
UploadFeature(),
|
|
80
|
+
EXPERIMENTAL_TableFeature(),
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
84
|
+
label: false,
|
|
85
|
+
},
|
|
86
|
+
linkGroup({
|
|
87
|
+
overrides: {
|
|
88
|
+
maxRows: 2,
|
|
89
|
+
},
|
|
90
|
+
}),
|
|
91
|
+
{
|
|
92
|
+
name: "media",
|
|
93
|
+
type: "upload",
|
|
94
|
+
admin: {
|
|
95
|
+
condition: (_, { type } = {}) =>
|
|
96
|
+
["highImpact", "mediumImpact", "productShowcase"].includes(type),
|
|
97
|
+
},
|
|
98
|
+
relationTo: "media",
|
|
99
|
+
required: false,
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101
|
+
validate: (value: any, { siblingData }: { siblingData?: { type?: string } }) => {
|
|
102
|
+
if (["highImpact", "mediumImpact"].includes(siblingData?.type ?? "") && !value) {
|
|
103
|
+
return "Media is required for high impact and medium impact hero types"
|
|
104
|
+
}
|
|
105
|
+
return true
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "backgroundMedia",
|
|
110
|
+
type: "upload",
|
|
111
|
+
admin: {
|
|
112
|
+
condition: (_, { type } = {}) => type === "productShowcase",
|
|
113
|
+
description: "Optional background illustration. Falls back to default if not set.",
|
|
114
|
+
},
|
|
115
|
+
relationTo: "media",
|
|
116
|
+
required: false,
|
|
117
|
+
label: "Background Image",
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
label: false,
|
|
121
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CollectionBeforeChangeHook } from "payload"
|
|
2
|
+
|
|
3
|
+
export const populatePublishedAt: CollectionBeforeChangeHook = ({ data, operation, req }) => {
|
|
4
|
+
if (operation === "create" || operation === "update") {
|
|
5
|
+
if (req.data && !req.data.publishedAt) {
|
|
6
|
+
const now = new Date()
|
|
7
|
+
return {
|
|
8
|
+
...data,
|
|
9
|
+
publishedAt: now,
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return data
|
|
15
|
+
}
|
package/templates/marketing/payload/src/hooks/{revalidateRedirects.ts.hbs → revalidateRedirects.ts}
RENAMED
|
@@ -3,9 +3,9 @@ import type { CollectionAfterChangeHook } from "payload"
|
|
|
3
3
|
import { revalidateTag } from "next/cache"
|
|
4
4
|
|
|
5
5
|
export const revalidateRedirects: CollectionAfterChangeHook = ({ doc, req: { payload } }) => {
|
|
6
|
-
|
|
6
|
+
payload.logger.info(`Revalidating redirects`)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
revalidateTag("redirects")
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
return doc
|
|
11
11
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConvexHttpClient } from "convex/browser"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Convex HTTP client for server-side data fetching in the marketing site.
|
|
5
|
+
* Used for fetching documentation content from Convex.
|
|
6
|
+
*/
|
|
7
|
+
const convexUrl = process.env.NEXT_PUBLIC_CONVEX_URL
|
|
8
|
+
|
|
9
|
+
if (!convexUrl) {
|
|
10
|
+
console.warn("[Convex] NEXT_PUBLIC_CONVEX_URL is not set. Documentation features will not work.")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const convex = new ConvexHttpClient(convexUrl || "")
|