Compare commits

..
4 Commits
Author SHA1 Message Date
arraysid 3930542182 fix: increase title font size in hero section 2025-05-12 06:44:43 +07:00
arraysid 6f45ca295b fix: adjust max-width for hero section on smaller screens 2025-05-12 06:34:40 +07:00
arraysid 9c4ce1cca9 fix: hero section responsiveness 2025-05-12 06:24:58 +07:00
598bd22b5a feat: make content data dynamic from cms and fix button and badge ui (#27)
* feat: integrate payload cms to landing page

* feat: add payload configuration and update TypeScript target

* fix: update TypeScript paths for payload configuration

* refactor: update config import paths to use local payload.config

* fix: update quotation marks for testimonials to use HTML entities

* fix: include withPayload in Next.js plugins for proper configuration

* feat: implement HeroSection global configuration and integrate with Hero component

* feat: add FeaturesSection global configuration and integrate with Features component

* feat: add revalidate constant to control page revalidation interval

* refactor: optimize data fetching by using Promise.all

* fix: update revalidation interval to 10 seconds

* feat: add CommunitiesSection configuration and integrate with Community component

* refactor: move global section functions to services directory

* feat: add support for s3 bucket for media

* feat: update Community component to use Iconify for icons and adjust CommunitiesSection configuration

* feat: replace Link component with Button for improved button styling in Community component

* feat: update FeaturesSection to use Iconify icons and adjust icon properties

* feat: add heroImage field to HeroSection and implement image formatting utility

* feat: add Learning Resources section with dynamic data fetching and UI integration

* feat: enhance LearningResourcesSection with primary and secondary button links

* refactor: reorganize layout structure by moving Header and Footer components to RootLayout

* feat: implement Testimonials section with dynamic data fetching and UI integration

* feat: simplify joinTitle rendering in Testimonials section

* feat: implement CallToAction section with dynamic data fetching and UI integration

* feat: update CallToActionSection label and wrap Discord button in link

* feat: update button components to use onClick for external links and improve styling

* feat: wrap logo image in a link to navigate to the homepage

* fix: supress scss deps warning

* fix: add placeholder to .env.example

* chore: add environment placeholder variables for CMS configuration in test build workflow

* fix: remove unused environment variables from test build workflow

* fix: text color (#26)

* chore: update action

* feat: integrate payload cms to landing page

* feat: add payload configuration and update TypeScript target

* fix: update TypeScript paths for payload configuration

* refactor: update config import paths to use local payload.config

* fix: include withPayload in Next.js plugins for proper configuration

* feat: implement HeroSection global configuration and integrate with Hero component

* feat: add FeaturesSection global configuration and integrate with Features component

* feat: add revalidate constant to control page revalidation interval

* refactor: optimize data fetching by using Promise.all

* fix: update revalidation interval to 10 seconds

* feat: add CommunitiesSection configuration and integrate with Community component

* refactor: move global section functions to services directory

* feat: add support for s3 bucket for media

* feat: update Community component to use Iconify for icons and adjust CommunitiesSection configuration

* feat: replace Link component with Button for improved button styling in Community component

* feat: update FeaturesSection to use Iconify icons and adjust icon properties

* feat: add heroImage field to HeroSection and implement image formatting utility

* feat: add Learning Resources section with dynamic data fetching and UI integration

* feat: enhance LearningResourcesSection with primary and secondary button links

* refactor: reorganize layout structure by moving Header and Footer components to RootLayout

* feat: implement Testimonials section with dynamic data fetching and UI integration

* feat: simplify joinTitle rendering in Testimonials section

* feat: implement CallToAction section with dynamic data fetching and UI integration

* feat: update CallToActionSection label and wrap Discord button in link

* feat: update button components to use onClick for external links and improve styling

* feat: wrap logo image in a link to navigate to the homepage

* fix: supress scss deps warning

* fix: add placeholder to .env.example

* chore: add environment placeholder variables for CMS configuration in test build workflow

* fix: remove unused environment variables from test build workflow

* fix: remove mistakenly added env from test-build workflow

---------

Co-authored-by: Fahim Ardani <fahimardani25@gmail.com>
Co-authored-by: Maulana Sodiqin <53475078+maulanasdqn@users.noreply.github.com>
2025-05-11 21:55:20 +07:00
14 changed files with 207 additions and 89 deletions
+10 -5
View File
@@ -1,9 +1,14 @@
# API Endpoint
VITE_API_URL= VITE_API_URL=
CMS_SECRET= # Payload CMS Secret Key (minimum 32 characters)
CMS_POSTGRES_URL= CMS_SECRET=your-very-long-secret-key
CMS_STORAGE_ENDPOINT= # PostgreSQL Connection String
CMS_STORAGE_ACCESS_KEY_ID= CMS_POSTGRES_URL=postgres://user:password@host:port/database
CMS_STORAGE_SECRET_ACCESS_KEY=
# S3 Storage Configuration
CMS_STORAGE_ENDPOINT=https://your-s3-endpoint.com
CMS_STORAGE_ACCESS_KEY_ID=your-access-key-id
CMS_STORAGE_SECRET_ACCESS_KEY=your-secret-access-key
CMS_STORAGE_REGION=ap-southeast-1 CMS_STORAGE_REGION=ap-southeast-1
+8 -13
View File
@@ -1,20 +1,15 @@
//@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next'); const { composePlugins, withNx } = require('@nx/next');
const { withPayload } = require('@payloadcms/next/withPayload'); const { withPayload } = require('@payloadcms/next/withPayload');
/** /** @type {import('@nx/next/plugins/with-nx').WithNxOptions} */
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = { const nextConfig = {
nx: { nx: { svgr: false },
// Set this to true if you would like to to use SVGR sassOptions: {
// See: https://github.com/gregberge/svgr quietDeps: true,
svgr: false, logger: {
warn: () => {},
},
}, },
}; };
const plugins = [withNx, withPayload]; module.exports = composePlugins(withNx, withPayload)(nextConfig);
module.exports = composePlugins(...plugins)(nextConfig);
@@ -1,10 +1,21 @@
'use client'; 'use client';
import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms'; import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms';
import { CallToActionSection } from 'apps/landing/src/payload-types';
import { motion, useInView } from 'framer-motion'; import { motion, useInView } from 'framer-motion';
import { useRef } from 'react'; import { useRef } from 'react';
export function CallToAction() { export function CallToAction(props: CallToActionSection) {
const {
title,
highlightedTitle,
subtitle,
primaryButtonLabel,
primaryButtonLink,
secondaryButtonLabel,
secondaryButtonLink,
} = props;
const ref = useRef(null); const ref = useRef(null);
const isInView = useInView(ref, { once: true, amount: 0.2 }); const isInView = useInView(ref, { once: true, amount: 0.2 });
@@ -28,30 +39,30 @@ export function CallToAction() {
<div className="relative z-10 text-center"> <div className="relative z-10 text-center">
<h2 className="text-3xl md:text-4xl lg:text-5xl font-bold mb-6"> <h2 className="text-3xl md:text-4xl lg:text-5xl font-bold mb-6">
Siap Menjadi{' '} {title}{' '}
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400"> <span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
Programmer Handal? {highlightedTitle}
</span> </span>
</h2> </h2>
<p className="text-lg text-muted-foreground mb-8 max-w-2xl mx-auto"> <p className="text-lg text-muted-foreground mb-8 max-w-2xl mx-auto">
Bergabunglah dengan komunitas IMPHNEN sekarang dan mulai {subtitle}
perjalanan programming mu dengan cara yang menyenangkan!
</p> </p>
<div className="flex flex-col sm:flex-row gap-4 justify-center"> <div className="flex flex-col sm:flex-row gap-4 justify-center">
<Button <Button
size="lg" size="lg"
className="bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 className="bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 font-bold text-black hover:text-white cursor-pointer"
font-bold text-black hover:text-white cursor-pointer" onClick={() => window.open(primaryButtonLink, '_blank')}
> >
Gabung Discord {primaryButtonLabel}
</Button> </Button>
<Button <Button
size="lg" size="lg"
variant="outline" variant="outline"
className="border-primary hover:bg-primary/10" className="border-primary hover:bg-primary/10"
onClick={() => window.open(secondaryButtonLink, '_blank')}
> >
Join Facebook Group {secondaryButtonLabel}
</Button> </Button>
</div> </div>
</div> </div>
@@ -77,14 +77,13 @@ export function Community(props: CommunitiesSection) {
</div> </div>
<h3 className="mb-2 text-xl font-bold">{c.title}</h3> <h3 className="mb-2 text-xl font-bold">{c.title}</h3>
<p className="mb-6 text-muted-foreground">{c.description}</p> <p className="mb-6 text-muted-foreground">{c.description}</p>
<a href={c.buttonLink} target="_blank">
<Button <Button
variant="outline" variant="outline"
className="w-full group-hover:bg-primary group-hover:text-primary-foreground transition-colors duration-300" className="w-full group-hover:bg-primary group-hover:text-primary-foreground transition-colors duration-300"
onClick={() => window.open(c.buttonLink, '_blank')}
> >
{c.buttonText} {c.buttonText}
</Button> </Button>
</a>
</div> </div>
<div className="absolute -bottom-1 -right-1 w-20 h-20 bg-gradient-to-tl from-primary/20 to-transparent rounded-tl-full opacity-0 group-hover:opacity-100 transition-opacity duration-500" /> <div className="absolute -bottom-1 -right-1 w-20 h-20 bg-gradient-to-tl from-primary/20 to-transparent rounded-tl-full opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
</motion.div> </motion.div>
@@ -35,13 +35,15 @@ export function Header() {
<div className="container flex h-16 items-center justify-between"> <div className="container flex h-16 items-center justify-between">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div className="relative overflow-hidden rounded"> <div className="relative overflow-hidden rounded">
<Link href="/">
<Image <Image
src="/logo.png" src="/logo.png"
alt="IMPHNEN Logo" alt="IMPHNEN"
width={64} width={64}
height={64} height={64}
className="object-cover cursor-pointer" className="object-cover"
/> />
</Link>
</div> </div>
</div> </div>
@@ -82,7 +84,13 @@ export function Header() {
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<SimpleThemeToggle /> <SimpleThemeToggle />
<Button className="hidden md:flex bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 transition-all duration-300 font-bold text-black hover:text-white cursor-pointer">
<Button
className="hidden md:flex bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 transition-all duration-300 font-bold text-black hover:text-white cursor-pointer"
onClick={() =>
window.open('https://discord.com/invite/imphnen', '_blank')
}
>
Gabung Discord Gabung Discord
</Button> </Button>
@@ -69,7 +69,7 @@ export function Hero(props: HeroSection) {
</div> </div>
<div className="space-y-4"> <div className="space-y-4">
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl md:text-6xl lg:text-7xl bg-clip-text text-transparent bg-gradient-to-r from-foreground via-foreground to-foreground/70"> <h1 className="text-4xl md:text-5xl lg:text-6xl xl:text-7xl font-bold tracking-tighter bg-clip-text text-transparent bg-gradient-to-r from-foreground via-foreground to-foreground/70">
{title} <br /> {title} <br />
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400"> <span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
{highlight} {highlight}
@@ -80,29 +80,26 @@ export function Hero(props: HeroSection) {
</p> </p>
</div> </div>
<div className="flex flex-col sm:flex-row gap-4"> <div className="flex flex-col sm:flex-row gap-4 w-full sm:w-auto">
<a href={buttons.primaryUrl} target="_blank">
<Button <Button
size="lg" size="lg"
className="bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 transition-all duration-300 className="w-full sm:w-auto bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 transition-all duration-300 font-bold text-black hover:text-white cursor-pointer"
font-bold text-black hover:text-white cursor-pointer" onClick={() => window.open(buttons.primaryUrl, '_blank')}
> >
{buttons.primaryLabel} {buttons.primaryLabel}
</Button> </Button>
</a>
<a href={buttons.secondaryUrl} target="_blank">
<Button <Button
size="lg" size="lg"
variant="outline" variant="outline"
className="group relative overflow-hidden border-primary" className="w-full sm:w-auto group relative overflow-hidden border-primary"
onClick={() => window.open(buttons.secondaryUrl, '_blank')}
> >
<span className="absolute inset-0 bg-gradient-to-r from-primary/10 to-blue-400/10 translate-y-full group-hover:translate-y-0 transition-transform duration-300" /> <span className="absolute inset-0 bg-gradient-to-r from-primary/10 to-blue-400/10 translate-y-full group-hover:translate-y-0 transition-transform duration-300" />
<span className="relative">{buttons.secondaryLabel}</span> <span className="relative">{buttons.secondaryLabel}</span>
</Button> </Button>
</a>
</div> </div>
<div className="flex items-center gap-8"> <div className="flex flex-wrap justify-center gap-6 sm:gap-8">
{stats?.map(({ value, label }, i) => ( {stats?.map(({ value, label }, i) => (
<Fragment key={i}> <Fragment key={i}>
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">
@@ -112,7 +109,7 @@ font-bold text-black hover:text-white cursor-pointer"
<div className="text-xs text-muted-foreground">{label}</div> <div className="text-xs text-muted-foreground">{label}</div>
</div> </div>
{i < stats.length - 1 && ( {i < stats.length - 1 && (
<div className="h-10 border-r border-border mx-4" /> <div className="hidden sm:block h-10 border-r border-border mx-4" />
)} )}
</Fragment> </Fragment>
))} ))}
@@ -120,7 +117,7 @@ font-bold text-black hover:text-white cursor-pointer"
</motion.div> </motion.div>
<motion.div <motion.div
className="relative mx-auto lg:ml-auto" className="relative w-full lg:w-auto mx-auto lg:ml-auto"
initial={{ opacity: 0, scale: 0.9 }} initial={{ opacity: 0, scale: 0.9 }}
animate={{ opacity: 1, scale: 1 }} animate={{ opacity: 1, scale: 1 }}
transition={{ duration: 0.5, delay: 0.2 }} transition={{ duration: 0.5, delay: 0.2 }}
@@ -78,15 +78,15 @@ export function LearningResources(props: LearningResourcesSection) {
</div> </div>
<h3 className="mb-2 text-xl font-bold">{r.title}</h3> <h3 className="mb-2 text-xl font-bold">{r.title}</h3>
<p className="mb-6 text-muted-foreground">{r.description}</p> <p className="mb-6 text-muted-foreground">{r.description}</p>
<a href={r.buttonLink} target="_blank">
<Button <Button
variant="link" variant="link"
className="p-0 h-auto font-medium text-primary hover:text-primary/80" className="p-0 h-auto font-medium text-primary hover:text-primary/80"
onClick={() => window.open(r.buttonLink, '_blank')}
> >
{r.buttonText} {r.buttonText}
<Icon icon="tabler:arrow-right" className="h-6 w-6" /> <Icon icon="tabler:arrow-right" className="h-6 w-6" />
</Button> </Button>
</a>
</div> </div>
<div className="absolute -bottom-32 -right-32 w-64 h-64 bg-gradient-to-tl from-primary/10 to-transparent rounded-full opacity-0 group-hover:opacity-100 transition-all duration-500 group-hover:-translate-y-10 group-hover:-translate-x-10" /> <div className="absolute -bottom-32 -right-32 w-64 h-64 bg-gradient-to-tl from-primary/10 to-transparent rounded-full opacity-0 group-hover:opacity-100 transition-all duration-500 group-hover:-translate-y-10 group-hover:-translate-x-10" />
</motion.div> </motion.div>
@@ -110,16 +110,22 @@ export function LearningResources(props: LearningResourcesSection) {
{featured.description} {featured.description}
</p> </p>
<div className="flex flex-wrap gap-4"> <div className="flex flex-wrap gap-4">
<a href={featured.primaryButtonLink} target="_blank"> <Button
<Button className="bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 font-bold text-black hover:text-white cursor-pointer"> className="bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90 font-bold text-black hover:text-white cursor-pointer"
onClick={() =>
window.open(featured.primaryButtonLink, '_blank')
}
>
{featured.primaryButtonText} {featured.primaryButtonText}
</Button> </Button>
</a> <Button
<a href={featured.secondaryButtonLink} target="_blank"> variant="outline"
<Button variant="outline"> onClick={() =>
window.open(featured.secondaryButtonLink, '_blank')
}
>
{featured.secondaryButtonText} {featured.secondaryButtonText}
</Button> </Button>
</a>
</div> </div>
</div> </div>
<div className="relative h-64 md:h-auto"> <div className="relative h-64 md:h-auto">
+4 -1
View File
@@ -1,3 +1,4 @@
import { getGlobalsCallToActionSection } from '../../services/get-globals-call-to-action-section';
import { getGlobalsCommunitiesSection } from '../../services/get-globals-communitues-section'; import { getGlobalsCommunitiesSection } from '../../services/get-globals-communitues-section';
import { getGlobalsFeaturesSection } from '../../services/get-globals-features-section'; import { getGlobalsFeaturesSection } from '../../services/get-globals-features-section';
import { getGlobalsHeroSection } from '../../services/get-globals-hero-section'; import { getGlobalsHeroSection } from '../../services/get-globals-hero-section';
@@ -19,12 +20,14 @@ export default async function Page() {
communitiesData, communitiesData,
learningResourcesData, learningResourcesData,
testimonialsData, testimonialsData,
callToActionData,
] = await Promise.all([ ] = await Promise.all([
getGlobalsHeroSection(), getGlobalsHeroSection(),
getGlobalsFeaturesSection(), getGlobalsFeaturesSection(),
getGlobalsCommunitiesSection(), getGlobalsCommunitiesSection(),
getGlobalsLearningResourcesSection(), getGlobalsLearningResourcesSection(),
getGlobalsTestimonialsSection(), getGlobalsTestimonialsSection(),
getGlobalsCallToActionSection(),
]); ]);
return ( return (
@@ -34,7 +37,7 @@ export default async function Page() {
<Community {...communitiesData} /> <Community {...communitiesData} />
<LearningResources {...learningResourcesData} /> <LearningResources {...learningResourcesData} />
<Testimonials {...testimonialsData} /> <Testimonials {...testimonialsData} />
<CallToAction /> <CallToAction {...callToActionData} />
</> </>
); );
} }
@@ -0,0 +1,51 @@
import { GlobalConfig } from 'payload';
export const CallToActionSection: GlobalConfig = {
slug: 'call-to-action-section',
label: 'Call To Action Section',
fields: [
{
name: 'title',
type: 'text',
required: true,
defaultValue: 'Siap Menjadi',
},
{
name: 'highlightedTitle',
type: 'text',
required: true,
defaultValue: 'Programmer Handal?',
},
{
name: 'subtitle',
type: 'textarea',
required: true,
defaultValue:
'Bergabunglah dengan komunitas IMPHNEN sekarang dan mulai perjalanan programming mu dengan cara yang menyenangkan!',
},
{
name: 'primaryButtonLabel',
type: 'text',
required: true,
defaultValue: 'Gabung Discord',
},
{
name: 'primaryButtonLink',
type: 'text',
required: true,
defaultValue: 'https://discord.gg/imphnen',
},
{
name: 'secondaryButtonLabel',
type: 'text',
required: true,
defaultValue: 'Join Facebook Group',
},
{
name: 'secondaryButtonLink',
type: 'text',
required: true,
defaultValue: 'https://facebook.com/groups/programmerhandal',
},
],
};
@@ -15,7 +15,7 @@ export const CommunitiesSection: GlobalConfig = {
description: description:
'Bergabunglah dengan grup Facebook kami untuk diskusi santai dan berbagi artikel menarik.', 'Bergabunglah dengan grup Facebook kami untuk diskusi santai dan berbagi artikel menarik.',
buttonText: 'Gabung Sekarang', buttonText: 'Gabung Sekarang',
buttonLink: 'https://facebook.com/groups/1032515944638255', buttonLink: 'https://facebook.com/groups/programmerhandal',
}, },
{ {
iconName: 'tabler:brand-instagram', iconName: 'tabler:brand-instagram',
+1 -1
View File
@@ -57,7 +57,7 @@ export const HeroSection: GlobalConfig = {
label: 'Primary Button URL', label: 'Primary Button URL',
type: 'text', type: 'text',
required: true, required: true,
defaultValue: 'https://web.facebook.com/groups/1032515944638255', defaultValue: 'https://facebook.com/groups/programmerhandal',
}, },
{ {
name: 'secondaryLabel', name: 'secondaryLabel',
+34
View File
@@ -90,6 +90,7 @@ export interface Config {
'communities-section': CommunitiesSection; 'communities-section': CommunitiesSection;
'learning-resources-section': LearningResourcesSection; 'learning-resources-section': LearningResourcesSection;
'testimonials-section': TestimonialsSection; 'testimonials-section': TestimonialsSection;
'call-to-action-section': CallToActionSection;
}; };
globalsSelect: { globalsSelect: {
'hero-section': HeroSectionSelect<false> | HeroSectionSelect<true>; 'hero-section': HeroSectionSelect<false> | HeroSectionSelect<true>;
@@ -97,6 +98,7 @@ export interface Config {
'communities-section': CommunitiesSectionSelect<false> | CommunitiesSectionSelect<true>; 'communities-section': CommunitiesSectionSelect<false> | CommunitiesSectionSelect<true>;
'learning-resources-section': LearningResourcesSectionSelect<false> | LearningResourcesSectionSelect<true>; 'learning-resources-section': LearningResourcesSectionSelect<false> | LearningResourcesSectionSelect<true>;
'testimonials-section': TestimonialsSectionSelect<false> | TestimonialsSectionSelect<true>; 'testimonials-section': TestimonialsSectionSelect<false> | TestimonialsSectionSelect<true>;
'call-to-action-section': CallToActionSectionSelect<false> | CallToActionSectionSelect<true>;
}; };
locale: null; locale: null;
user: User & { user: User & {
@@ -408,6 +410,22 @@ export interface TestimonialsSection {
updatedAt?: string | null; updatedAt?: string | null;
createdAt?: string | null; createdAt?: string | null;
} }
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "call-to-action-section".
*/
export interface CallToActionSection {
id: number;
title: string;
highlightedTitle: string;
subtitle: string;
primaryButtonLabel: string;
primaryButtonLink: string;
secondaryButtonLabel: string;
secondaryButtonLink: string;
updatedAt?: string | null;
createdAt?: string | null;
}
/** /**
* This interface was referenced by `Config`'s JSON-Schema * This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "hero-section_select". * via the `definition` "hero-section_select".
@@ -543,6 +561,22 @@ export interface TestimonialsSectionSelect<T extends boolean = true> {
createdAt?: T; createdAt?: T;
globalType?: T; globalType?: T;
} }
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "call-to-action-section_select".
*/
export interface CallToActionSectionSelect<T extends boolean = true> {
title?: T;
highlightedTitle?: T;
subtitle?: T;
primaryButtonLabel?: T;
primaryButtonLink?: T;
secondaryButtonLabel?: T;
secondaryButtonLink?: T;
updatedAt?: T;
createdAt?: T;
globalType?: T;
}
/** /**
* This interface was referenced by `Config`'s JSON-Schema * This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "auth". * via the `definition` "auth".
+2
View File
@@ -8,6 +8,7 @@ import { buildConfig } from 'payload';
import sharp from 'sharp'; import sharp from 'sharp';
import { fileURLToPath } from 'url'; import { fileURLToPath } from 'url';
import { CallToActionSection } from './collections/CallToActionSection';
import { CommunitiesSection } from './collections/CommunitiesSection'; import { CommunitiesSection } from './collections/CommunitiesSection';
import { FeaturesSection } from './collections/FeaturesSection'; import { FeaturesSection } from './collections/FeaturesSection';
import { HeroSection } from './collections/HeroSection'; import { HeroSection } from './collections/HeroSection';
@@ -39,6 +40,7 @@ export default buildConfig({
CommunitiesSection, CommunitiesSection,
LearningResourcesSection, LearningResourcesSection,
TestimonialsSection, TestimonialsSection,
CallToActionSection,
], ],
editor: lexicalEditor(), editor: lexicalEditor(),
secret: process.env.CMS_SECRET || '', secret: process.env.CMS_SECRET || '',
@@ -0,0 +1,7 @@
import { payload } from '../lib/payload';
export async function getGlobalsCallToActionSection() {
return await payload.findGlobal({
slug: 'call-to-action-section',
});
}