Compare commits
64
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a84e2fc31a | ||
|
|
6e1c561387 | ||
|
|
b39e918b3c | ||
|
|
0a217341a5 | ||
|
|
f1f72402b2 | ||
|
|
3f1b2a2bd7 | ||
|
|
57b27c6784 | ||
|
|
f191ffc4b1 | ||
|
|
31e4ffae92 | ||
|
|
c9f7ce24ed | ||
|
|
d21adebf73 | ||
|
|
744d39ea75 | ||
|
|
da11ba5894 | ||
|
|
6d29c81dad | ||
|
|
4a7135dd17 | ||
|
|
33d750b221 | ||
|
|
1f9aa2e6b3 | ||
|
|
7722c98c84 | ||
|
|
0914361635 | ||
|
|
74aabd1eba | ||
|
|
d1fc7a8fd5 | ||
|
|
009cabfc1c | ||
|
|
a7f7521761 | ||
|
|
54b7a2f0eb | ||
|
|
ef042f2f40 | ||
|
|
fd35cb9525 | ||
|
|
18d11fd1c3 | ||
|
|
c82d9bcc70 | ||
|
|
a4dd793bb7 | ||
|
|
bba3c89b23 | ||
|
|
8b6aa21f82 | ||
|
|
0fffe2d403 | ||
|
|
919fac811d | ||
|
|
4316dcf8b3 | ||
|
|
b9b71c4c25 | ||
|
|
121faf89c3 | ||
|
|
07913efb16 | ||
|
|
4b2733511c | ||
|
|
9f3d00a0db | ||
|
|
7ac571c019 | ||
|
|
a8c958400d | ||
|
|
760ab67ae0 | ||
|
|
c4cf9e4e6c | ||
|
|
a800b1e293 | ||
|
|
da0e599b9a | ||
|
|
a02a259f4e | ||
|
|
ff99564b05 | ||
|
|
13ab089afc | ||
|
|
378e258520 | ||
|
|
88468081b6 | ||
|
|
aba462e462 | ||
|
|
55fd1fa443 | ||
|
|
07a1eb8dbc | ||
|
|
aad04b6f94 | ||
|
|
d4a91abb63 | ||
|
|
7fd5528c0d | ||
|
|
39a57b4fed | ||
|
|
7b490702b9 | ||
|
|
f31aad8570 | ||
|
|
acb7f4aef9 | ||
|
|
c69614531b | ||
|
|
c82426282c | ||
|
|
45295953aa | ||
|
|
0561555276 |
+12
-2
@@ -1,4 +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
|
||||||
|
|
||||||
|
# PostgreSQL Connection String
|
||||||
|
CMS_POSTGRES_URL=postgres://user:password@host:port/database
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
@@ -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);
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 87 KiB |
@@ -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>
|
||||||
|
|||||||
@@ -1,54 +1,16 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import {
|
import { Icon } from '@iconify/react';
|
||||||
Button,
|
import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms';
|
||||||
FacebookIcon,
|
import { CommunitiesSection } from 'apps/landing/src/payload-types';
|
||||||
InstagramIcon,
|
|
||||||
MessageCircleIcon,
|
|
||||||
} from '@imphnen-frontend-service/shadcn-ui/atoms';
|
|
||||||
import { motion, useInView } from 'framer-motion';
|
import { motion, useInView } from 'framer-motion';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
export function Community() {
|
export function Community(props: CommunitiesSection) {
|
||||||
|
const { items, stats } = 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 });
|
||||||
|
|
||||||
const communities = [
|
|
||||||
{
|
|
||||||
icon: (
|
|
||||||
<FacebookIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
||||||
),
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Facebook Group',
|
|
||||||
description:
|
|
||||||
'Bergabunglah dengan grup Facebook kami untuk diskusi santai dan berbagi artikel menarik.',
|
|
||||||
buttonText: 'Gabung Sekarang',
|
|
||||||
buttonLink: '#',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: (
|
|
||||||
<InstagramIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
||||||
),
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Instagram',
|
|
||||||
description:
|
|
||||||
'Ikuti kami di Instagram untuk tips programming, konten inspiratif, dan info event terbaru.',
|
|
||||||
buttonText: 'Follow Kami',
|
|
||||||
buttonLink: '#',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: (
|
|
||||||
<MessageCircleIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
||||||
),
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Discord Server',
|
|
||||||
description:
|
|
||||||
'Diskusikan langsung dengan sesama programmer dan dapatkan bantuan langsung dari para ahli.',
|
|
||||||
buttonText: 'Join Server',
|
|
||||||
buttonLink: '#',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const containerVariants = {
|
const containerVariants = {
|
||||||
hidden: { opacity: 0 },
|
hidden: { opacity: 0 },
|
||||||
visible: {
|
visible: {
|
||||||
@@ -73,105 +35,74 @@ export function Community() {
|
|||||||
id="komunitas"
|
id="komunitas"
|
||||||
className="w-full py-20 md:py-32 bg-muted relative overflow-hidden"
|
className="w-full py-20 md:py-32 bg-muted relative overflow-hidden"
|
||||||
>
|
>
|
||||||
{/* Background Elements */}
|
|
||||||
<div className="absolute inset-0 -z-10">
|
<div className="absolute inset-0 -z-10">
|
||||||
<div className="absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(59,130,246,0.1),transparent_70%)]" />
|
<div className="absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(59,130,246,0.1),transparent_70%)]" />
|
||||||
<div className="absolute inset-0 bg-[linear-gradient(to_right,rgba(59,130,246,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(59,130,246,0.01)_1px,transparent_1px)] bg-[size:14px_14px]" />
|
<div className="absolute inset-0 bg-[linear-gradient(to_right,rgba(59,130,246,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(59,130,246,0.01)_1px,transparent_1px)] bg-[size:14px_14px]" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="container px-4 md:px-6" ref={ref}>
|
<div className="container px-4 md:px-6" ref={ref}>
|
||||||
<div className="flex flex-col items-center justify-center space-y-4 text-center mb-16">
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="space-y-2"
|
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
||||||
transition={{ duration: 0.5 }}
|
|
||||||
>
|
>
|
||||||
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl">
|
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl text-center mb-4">
|
||||||
Komunitas{' '}
|
Komunitas{' '}
|
||||||
<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">
|
||||||
Kami
|
Kami
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
<p className="max-w-[800px] mx-auto text-muted-foreground text-center md:text-lg">
|
||||||
Bergabunglah dengan ribuan programmer Indonesia yang saling
|
Bergabunglah dengan ribuan programmer Indonesia yang saling membantu
|
||||||
membantu dan berbagi pengalaman.
|
dan berbagi pengalaman.
|
||||||
</p>
|
</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="grid gap-8 md:grid-cols-3"
|
className="grid gap-8 md:grid-cols-3 mt-12"
|
||||||
variants={containerVariants}
|
variants={containerVariants}
|
||||||
initial="hidden"
|
initial="hidden"
|
||||||
animate={isInView ? 'visible' : 'hidden'}
|
animate={isInView ? 'visible' : 'hidden'}
|
||||||
>
|
>
|
||||||
{communities.map((community, index) => (
|
{items?.map((c, i) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={index}
|
key={i}
|
||||||
className="group relative overflow-hidden rounded-xl border bg-background p-6 transition-all hover:shadow-xl"
|
className="group relative overflow-hidden rounded-xl border bg-background p-6 transition-all hover:shadow-xl"
|
||||||
variants={itemVariants}
|
variants={itemVariants}
|
||||||
>
|
>
|
||||||
<div className="absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-blue-400/5 opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
|
<div className="absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-blue-400/5 opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
|
||||||
|
|
||||||
<div className="relative z-10">
|
<div className="relative z-10">
|
||||||
<div
|
<div className="mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900">
|
||||||
className={`mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full ${community.iconBg}`}
|
<Icon
|
||||||
>
|
icon={c.iconName}
|
||||||
{community.icon}
|
className="h-6 w-6 text-blue-600 dark:text-blue-400"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="mb-2 text-xl font-bold">{community.title}</h3>
|
<h3 className="mb-2 text-xl font-bold">{c.title}</h3>
|
||||||
<p className="mb-6 text-muted-foreground">
|
<p className="mb-6 text-muted-foreground">{c.description}</p>
|
||||||
{community.description}
|
|
||||||
</p>
|
|
||||||
<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')}
|
||||||
>
|
>
|
||||||
{community.buttonText}
|
{c.buttonText}
|
||||||
</Button>
|
</Button>
|
||||||
</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>
|
||||||
))}
|
))}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
{/* Community Stats */}
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="mt-20 grid grid-cols-2 md:grid-cols-4 gap-8 text-center"
|
className="mt-20 grid grid-cols-2 md:grid-cols-4 gap-8 text-center"
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
||||||
transition={{ duration: 0.5, delay: 0.3 }}
|
transition={{ duration: 0.5, delay: 0.3 }}
|
||||||
>
|
>
|
||||||
<div className="space-y-2">
|
{stats?.map((s, i) => (
|
||||||
|
<div key={i} className="space-y-2">
|
||||||
<div className="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
<div className="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
||||||
10K+
|
{s.value}
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">Member Aktif</div>
|
|
||||||
</div>
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
50+
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">Event Bulanan</div>
|
|
||||||
</div>
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
100+
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">
|
|
||||||
Mentor Profesional
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
5K+
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">
|
|
||||||
Diskusi Mingguan
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className="text-sm text-muted-foreground">{s.label}</div>
|
||||||
</div>
|
</div>
|
||||||
|
))}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,45 +1,16 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import {
|
import { Icon } from '@iconify/react';
|
||||||
BookOpenIcon,
|
import { FeaturesSection } from 'apps/landing/src/payload-types';
|
||||||
CodeIcon,
|
|
||||||
LaptopIcon,
|
|
||||||
UsersIcon,
|
|
||||||
} from '@imphnen-frontend-service/shadcn-ui/atoms';
|
|
||||||
import { motion, useInView } from 'framer-motion';
|
import { motion, useInView } from 'framer-motion';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
export function Features() {
|
export function Features(props: FeaturesSection) {
|
||||||
|
const { heading, subheading, features } = 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 });
|
||||||
|
|
||||||
const features = [
|
|
||||||
{
|
|
||||||
icon: <LaptopIcon className="h-6 w-6 text-primary" />,
|
|
||||||
title: 'Belajar Tanpa Koding',
|
|
||||||
description:
|
|
||||||
'Pelajari konsep programming dengan cara yang mudah dipahami tanpa harus menulis kode yang rumit.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: <UsersIcon className="h-6 w-6 text-primary" />,
|
|
||||||
title: 'Komunitas Supportif',
|
|
||||||
description:
|
|
||||||
'Bergabunglah dengan komunitas programmer Indonesia yang siap membantu dan berbagi pengalaman.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: <BookOpenIcon className="h-6 w-6 text-primary" />,
|
|
||||||
title: 'Tutorial Interaktif',
|
|
||||||
description:
|
|
||||||
'Akses tutorial interaktif yang membuat konsep programming lebih mudah untuk dipahami.',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: <CodeIcon className="h-6 w-6 text-primary" />,
|
|
||||||
title: 'Proyek Praktis',
|
|
||||||
description:
|
|
||||||
'Terapkan pengetahuan Anda dalam proyek nyata dengan panduan langkah demi langkah.',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const containerVariants = {
|
const containerVariants = {
|
||||||
hidden: { opacity: 0 },
|
hidden: { opacity: 0 },
|
||||||
visible: {
|
visible: {
|
||||||
@@ -64,7 +35,6 @@ export function Features() {
|
|||||||
id="fitur"
|
id="fitur"
|
||||||
className="w-full py-20 md:py-32 relative overflow-hidden"
|
className="w-full py-20 md:py-32 relative overflow-hidden"
|
||||||
>
|
>
|
||||||
{/* Background Elements */}
|
|
||||||
<div className="absolute inset-0 -z-10">
|
<div className="absolute inset-0 -z-10">
|
||||||
<div className="absolute inset-0 bg-gradient-to-b from-background via-background to-muted/50" />
|
<div className="absolute inset-0 bg-gradient-to-b from-background via-background to-muted/50" />
|
||||||
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] rounded-full bg-gradient-to-tr from-primary/5 to-blue-400/5 blur-3xl" />
|
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] rounded-full bg-gradient-to-tr from-primary/5 to-blue-400/5 blur-3xl" />
|
||||||
@@ -82,14 +52,10 @@ export function Features() {
|
|||||||
Fitur Unggulan
|
Fitur Unggulan
|
||||||
</div>
|
</div>
|
||||||
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl">
|
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl">
|
||||||
Belajar programming dengan{' '}
|
{heading}
|
||||||
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
cara yang lebih baik
|
|
||||||
</span>
|
|
||||||
</h2>
|
</h2>
|
||||||
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
||||||
IMPHNEN hadir dengan berbagai fitur untuk membantu kamu menjadi
|
{subheading}
|
||||||
programmer handal tanpa harus pusing dengan coding.
|
|
||||||
</p>
|
</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +66,7 @@ export function Features() {
|
|||||||
initial="hidden"
|
initial="hidden"
|
||||||
animate={isInView ? 'visible' : 'hidden'}
|
animate={isInView ? 'visible' : 'hidden'}
|
||||||
>
|
>
|
||||||
{features.map((feature, index) => (
|
{features?.map((feature, index) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={index}
|
key={index}
|
||||||
className="group relative overflow-hidden rounded-xl border bg-background/50 backdrop-blur-sm p-6 transition-all hover:shadow-md hover:shadow-primary/5 hover:border-primary/50"
|
className="group relative overflow-hidden rounded-xl border bg-background/50 backdrop-blur-sm p-6 transition-all hover:shadow-md hover:shadow-primary/5 hover:border-primary/50"
|
||||||
@@ -110,7 +76,10 @@ export function Features() {
|
|||||||
|
|
||||||
<div className="relative z-10">
|
<div className="relative z-10">
|
||||||
<div className="mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 group-hover:bg-primary/20 transition-colors">
|
<div className="mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 group-hover:bg-primary/20 transition-colors">
|
||||||
{feature.icon}
|
<Icon
|
||||||
|
icon={feature.iconName}
|
||||||
|
className="h-6 w-6 text-primary"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="mb-2 text-xl font-bold">{feature.title}</h3>
|
<h3 className="mb-2 text-xl font-bold">{feature.title}</h3>
|
||||||
<p className="text-muted-foreground">{feature.description}</p>
|
<p className="text-muted-foreground">{feature.description}</p>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
@@ -134,9 +142,15 @@ export function Header() {
|
|||||||
>
|
>
|
||||||
Testimoni
|
Testimoni
|
||||||
</Link>
|
</Link>
|
||||||
|
<a
|
||||||
|
href="https://discord.com/invite/imphnen"
|
||||||
|
target="_blank"
|
||||||
|
className="mt-4"
|
||||||
|
>
|
||||||
<Button className="mt-4 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">
|
<Button className="mt-4 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">
|
||||||
Gabung Discord
|
Gabung Discord
|
||||||
</Button>
|
</Button>
|
||||||
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -6,11 +6,23 @@ import {
|
|||||||
SparklesIcon,
|
SparklesIcon,
|
||||||
UsersIcon,
|
UsersIcon,
|
||||||
} from '@imphnen-frontend-service/shadcn-ui/atoms';
|
} from '@imphnen-frontend-service/shadcn-ui/atoms';
|
||||||
|
import { formatCMSImageDataToMedia } from 'apps/landing/src/lib/format';
|
||||||
|
import { HeroSection } from 'apps/landing/src/payload-types';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { useEffect, useState } from 'react';
|
import { Fragment, useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
export function Hero(props: HeroSection) {
|
||||||
|
const {
|
||||||
|
badgeText,
|
||||||
|
buttons,
|
||||||
|
description,
|
||||||
|
highlight,
|
||||||
|
title,
|
||||||
|
stats,
|
||||||
|
heroImage,
|
||||||
|
} = props;
|
||||||
|
|
||||||
export function Hero() {
|
|
||||||
const [scrollY, setScrollY] = useState(0);
|
const [scrollY, setScrollY] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -24,11 +36,8 @@ export function Hero() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="relative w-full py-20 md:py-32 lg:py-40 overflow-hidden">
|
<section className="relative w-full py-20 md:py-32 lg:py-40 overflow-hidden">
|
||||||
{/* Background Elements */}
|
|
||||||
<div className="absolute inset-0 -z-10 overflow-hidden">
|
<div className="absolute inset-0 -z-10 overflow-hidden">
|
||||||
<div className="absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background to-background/50" />
|
<div className="absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background to-background/50" />
|
||||||
|
|
||||||
{/* Animated Gradient Orbs */}
|
|
||||||
<div
|
<div
|
||||||
className="absolute top-1/4 -left-20 w-80 h-80 rounded-full bg-gradient-to-r from-primary/20 to-blue-400/20 blur-3xl"
|
className="absolute top-1/4 -left-20 w-80 h-80 rounded-full bg-gradient-to-r from-primary/20 to-blue-400/20 blur-3xl"
|
||||||
style={{
|
style={{
|
||||||
@@ -43,8 +52,6 @@ export function Hero() {
|
|||||||
opacity: Math.max(0.2, 1 - scrollY * 0.001),
|
opacity: Math.max(0.2, 1 - scrollY * 0.001),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Grid Pattern */}
|
|
||||||
<div className="absolute inset-0 bg-[linear-gradient(rgba(59,130,246,0.05)_1px,transparent_1px),linear-gradient(to_right,rgba(59,130,246,0.05)_1px,transparent_1px)] bg-[size:40px_40px]" />
|
<div className="absolute inset-0 bg-[linear-gradient(rgba(59,130,246,0.05)_1px,transparent_1px),linear-gradient(to_right,rgba(59,130,246,0.05)_1px,transparent_1px)] bg-[size:40px_40px]" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -56,66 +63,56 @@ export function Hero() {
|
|||||||
animate={{ opacity: 1, y: 0 }}
|
animate={{ opacity: 1, y: 0 }}
|
||||||
transition={{ duration: 0.5 }}
|
transition={{ duration: 0.5 }}
|
||||||
>
|
>
|
||||||
<div className="inline-flex items-center rounded-full border px-3 py-1 text-sm">
|
<div className="inline-flex items-center rounded-full border px-3 py-1 text-sm w-fit">
|
||||||
<SparklesIcon className="mr-1 h-3.5 w-3.5 text-primary" />
|
<SparklesIcon className="mr-1 h-3.5 w-3.5 text-primary" />
|
||||||
<span>Komunitas Programmer Indonesia</span>
|
<span>{badgeText}</span>
|
||||||
</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 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">
|
||||||
Programmer Handal, <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">
|
||||||
Tanpa Ribet
|
{highlight}
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p className="max-w-[600px] text-muted-foreground md:text-xl">
|
<p className="max-w-[600px] text-muted-foreground md:text-xl">
|
||||||
Temukan potensi programming Anda bersama komunitas yang
|
{description}
|
||||||
mendukung, tutorial interaktif, dan sumber daya berkualitas
|
|
||||||
tinggi.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col sm:flex-row gap-4">
|
<div className="flex flex-col sm:flex-row gap-4">
|
||||||
<a href="https://facebook.com">
|
|
||||||
<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="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')}
|
||||||
>
|
>
|
||||||
Mulai Belajar
|
{buttons.primaryLabel}
|
||||||
</Button>
|
</Button>
|
||||||
</a>
|
|
||||||
<Button
|
<Button
|
||||||
size="lg"
|
size="lg"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className="group relative overflow-hidden border-primary"
|
className="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>
|
<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">Gabung Discord</span>
|
<span className="relative">{buttons.secondaryLabel}</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-8">
|
<div className="flex items-center gap-8">
|
||||||
|
{stats?.map(({ value, label }, i) => (
|
||||||
|
<Fragment key={i}>
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<div className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
<div className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
||||||
100K+
|
{value}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-muted-foreground">Member</div>
|
<div className="text-xs text-muted-foreground">{label}</div>
|
||||||
</div>
|
|
||||||
<div className="h-10 border-r border-border"></div>
|
|
||||||
<div className="flex flex-col items-center">
|
|
||||||
<div className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
500+
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-muted-foreground">Tutorial</div>
|
|
||||||
</div>
|
|
||||||
<div className="h-10 border-r border-border"></div>
|
|
||||||
<div className="flex flex-col items-center">
|
|
||||||
<div className="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
24/7
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-muted-foreground">Yapping</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{i < stats.length - 1 && (
|
||||||
|
<div className="h-10 border-r border-border mx-4" />
|
||||||
|
)}
|
||||||
|
</Fragment>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
@@ -126,24 +123,27 @@ font-bold text-black hover:text-white cursor-pointer"
|
|||||||
transition={{ duration: 0.5, delay: 0.2 }}
|
transition={{ duration: 0.5, delay: 0.2 }}
|
||||||
>
|
>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
{/* Decorative Elements */}
|
|
||||||
<div className="absolute -top-6 -left-6 w-12 h-12 rounded-lg border border-primary/30 bg-background/50 backdrop-blur-sm flex items-center justify-center">
|
<div className="absolute -top-6 -left-6 w-12 h-12 rounded-lg border border-primary/30 bg-background/50 backdrop-blur-sm flex items-center justify-center">
|
||||||
<CodeIcon className="h-6 w-6 text-primary" />
|
<CodeIcon className="h-6 w-6 text-primary" />
|
||||||
</div>
|
</div>
|
||||||
<div className="absolute -bottom-6 -right-6 w-12 h-12 rounded-lg border border-blue-400/30 bg-background/50 backdrop-blur-sm flex items-center justify-center">
|
<div className="absolute -bottom-6 -right-6 w-12 h-12 rounded-lg border border-blue-400/30 bg-background/50 backdrop-blur-sm flex items-center justify-center">
|
||||||
<UsersIcon className="h-6 w-6 text-blue-400" />
|
<UsersIcon className="h-6 w-6 text-blue-400" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Main Image */}
|
|
||||||
<div className="relative z-10 rounded-2xl overflow-hidden border shadow-2xl">
|
<div className="relative z-10 rounded-2xl overflow-hidden border shadow-2xl">
|
||||||
<div className="absolute inset-0 bg-gradient-to-tr from-primary/10 to-blue-400/10" />
|
<div className="absolute inset-0 bg-gradient-to-tr from-primary/10 to-blue-400/10" />
|
||||||
|
{(() => {
|
||||||
|
const media = formatCMSImageDataToMedia(heroImage);
|
||||||
|
if (!media) return null;
|
||||||
|
return (
|
||||||
<Image
|
<Image
|
||||||
src="/hero.jpeg"
|
src={media.url!}
|
||||||
|
alt={media.alt}
|
||||||
width={600}
|
width={600}
|
||||||
height={500}
|
height={500}
|
||||||
alt="IMPHNEN Programming Community"
|
|
||||||
className="w-full h-auto object-cover"
|
className="w-full h-auto object-cover"
|
||||||
/>
|
/>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -1,65 +1,17 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import {
|
import { Icon } from '@iconify/react';
|
||||||
BookOpenIcon,
|
import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms';
|
||||||
Button,
|
import { LearningResourcesSection } from 'apps/landing/src/payload-types';
|
||||||
CodeIcon,
|
|
||||||
Share2Icon,
|
|
||||||
VideoIcon,
|
|
||||||
} from '@imphnen-frontend-service/shadcn-ui/atoms';
|
|
||||||
import { motion, useInView } from 'framer-motion';
|
import { motion, useInView } from 'framer-motion';
|
||||||
|
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
export function LearningResources() {
|
export function LearningResources(props: LearningResourcesSection) {
|
||||||
|
const { resources, featured, title, description } = 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 });
|
||||||
|
|
||||||
const resources = [
|
|
||||||
{
|
|
||||||
icon: <VideoIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />,
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Video Tutorial',
|
|
||||||
description:
|
|
||||||
'Belajar melalui tutorial video dari langkah awal hingga mahir.',
|
|
||||||
buttonText: 'Lihat Semua Video',
|
|
||||||
buttonLink: '#',
|
|
||||||
color: 'from-blue-500 to-blue-700',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: (
|
|
||||||
<BookOpenIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
||||||
),
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Artikel & Tutorial',
|
|
||||||
description:
|
|
||||||
'Pelajari konsep programming melalui artikel yang disusun secara terstruktur.',
|
|
||||||
buttonText: 'Baca Artikel',
|
|
||||||
buttonLink: '#',
|
|
||||||
color: 'from-blue-500 to-blue-700',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: <CodeIcon className="h-6 w-6 text-blue-600 dark:text-blue-400" />,
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Tantangan Koding',
|
|
||||||
description:
|
|
||||||
'Uji kemampuan koding kamu dengan tantangan yang menyenangkan dan menantang.',
|
|
||||||
buttonText: 'Mulai Tantangan',
|
|
||||||
buttonLink: '#',
|
|
||||||
color: 'from-blue-500 to-blue-700',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: <Share2Icon className="h-6 w-6 text-blue-600 dark:text-blue-400" />,
|
|
||||||
iconBg: 'bg-blue-100 dark:bg-blue-900',
|
|
||||||
title: 'Sharing Session',
|
|
||||||
description:
|
|
||||||
'Ikuti sesi berbagi pengalaman dari programmer berpengalaman dan belajar dari pengalaman mereka.',
|
|
||||||
buttonText: 'Jadwal Session',
|
|
||||||
buttonLink: '#',
|
|
||||||
color: 'from-blue-500 to-blue-700',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const containerVariants = {
|
const containerVariants = {
|
||||||
hidden: { opacity: 0 },
|
hidden: { opacity: 0 },
|
||||||
visible: {
|
visible: {
|
||||||
@@ -84,97 +36,96 @@ export function LearningResources() {
|
|||||||
id="sumber-belajar"
|
id="sumber-belajar"
|
||||||
className="w-full py-20 md:py-32 relative overflow-hidden"
|
className="w-full py-20 md:py-32 relative overflow-hidden"
|
||||||
>
|
>
|
||||||
{/* Background Elements */}
|
|
||||||
<div className="absolute inset-0 -z-10">
|
<div className="absolute inset-0 -z-10">
|
||||||
<div className="absolute inset-0 bg-gradient-to-b from-background via-background to-background" />
|
<div className="absolute inset-0 bg-gradient-to-b from-background via-background to-background" />
|
||||||
<div className="absolute top-0 right-0 w-1/2 h-1/2 bg-gradient-to-bl from-primary/5 to-transparent blur-3xl" />
|
<div className="absolute top-0 right-0 w-1/2 h-1/2 bg-gradient-to-bl from-primary/5 to-transparent blur-3xl" />
|
||||||
<div className="absolute bottom-0 left-0 w-1/2 h-1/2 bg-gradient-to-tr from-blue-400/5 to-transparent blur-3xl" />
|
<div className="absolute bottom-0 left-0 w-1/2 h-1/2 bg-gradient-to-tr from-blue-400/5 to-transparent blur-3xl" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="container px-4 md:px-6" ref={ref}>
|
<div className="container px-4 md:px-6" ref={ref}>
|
||||||
<div className="flex flex-col items-center justify-center space-y-4 text-center mb-16">
|
<div className="flex flex-col items-center justify-center space-y-4 text-center mb-16">
|
||||||
<motion.div
|
<motion.div
|
||||||
className="space-y-2"
|
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
||||||
transition={{ duration: 0.5 }}
|
transition={{ duration: 0.5 }}
|
||||||
>
|
>
|
||||||
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl">
|
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl">
|
||||||
Sumber{' '}
|
{title}
|
||||||
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
Belajar
|
|
||||||
</span>
|
|
||||||
</h2>
|
</h2>
|
||||||
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
||||||
Akses berbagai materi belajar yang akan membantu kamu menguasai
|
{description}
|
||||||
konsep programming dengan cara yang menyenangkan.
|
|
||||||
</p>
|
</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="grid gap-8 md:grid-cols-2 lg:grid-cols-4"
|
className="grid gap-8 md:grid-cols-2 lg:grid-cols-4"
|
||||||
variants={containerVariants}
|
variants={containerVariants}
|
||||||
initial="hidden"
|
initial="hidden"
|
||||||
animate={isInView ? 'visible' : 'hidden'}
|
animate={isInView ? 'visible' : 'hidden'}
|
||||||
>
|
>
|
||||||
{resources.map((resource, index) => (
|
{resources.map((r, i) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={index}
|
key={i}
|
||||||
className="group relative overflow-hidden rounded-xl border bg-background p-6 transition-all hover:shadow-lg"
|
className="group relative overflow-hidden rounded-xl border bg-background p-6 hover:shadow-lg"
|
||||||
variants={itemVariants}
|
variants={itemVariants}
|
||||||
>
|
>
|
||||||
<div className="absolute top-0 left-0 h-1 w-full bg-gradient-to-r from-primary/50 to-blue-400/50 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
|
<div className="absolute top-0 left-0 h-1 w-full bg-gradient-to-r from-primary/50 to-blue-400/50 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
|
||||||
|
|
||||||
<div className="relative z-10">
|
<div className="relative z-10">
|
||||||
<div
|
<div className="mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900">
|
||||||
className={`mb-4 inline-flex h-12 w-12 items-center justify-center rounded-full ${resource.iconBg}`}
|
<Icon
|
||||||
>
|
icon={r.icon}
|
||||||
{resource.icon}
|
className="h-6 w-6 text-blue-600 dark:text-blue-400"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="mb-2 text-xl font-bold">{resource.title}</h3>
|
<h3 className="mb-2 text-xl font-bold">{r.title}</h3>
|
||||||
<p className="mb-6 text-muted-foreground">
|
<p className="mb-6 text-muted-foreground">{r.description}</p>
|
||||||
{resource.description}
|
|
||||||
</p>
|
|
||||||
<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')}
|
||||||
>
|
>
|
||||||
{resource.buttonText} →
|
{r.buttonText}
|
||||||
|
<Icon icon="tabler:arrow-right" className="h-6 w-6" />
|
||||||
</Button>
|
</Button>
|
||||||
</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>
|
||||||
))}
|
))}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
{/* Featured Resource */}
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="mt-20 rounded-xl overflow-hidden border bg-background/50 backdrop-blur-sm"
|
className="mt-20 rounded-xl overflow-hidden border bg-background/50 backdrop-blur-sm"
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
||||||
transition={{ duration: 0.5, delay: 0.3 }}
|
transition={{ duration: 0.5, delay: 0.3 }}
|
||||||
>
|
>
|
||||||
<div className="grid md:grid-cols-2 gap-0">
|
<div className="grid md:grid-cols-2 gap-0">
|
||||||
<div className="p-8 md:p-12 flex flex-col justify-center">
|
<div className="p-8 md:p-12 flex flex-col justify-center">
|
||||||
<div className="inline-block rounded-full bg-primary/10 px-4 py-1.5 text-sm font-medium text-primary mb-4">
|
<div className="inline-block rounded-full bg-primary/10 px-4 py-1.5 text-sm font-medium text-primary mb-4 w-fit">
|
||||||
Rekomendasi Terbaik
|
{featured.label}
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-2xl md:text-3xl font-bold mb-4">
|
<h3 className="text-2xl md:text-3xl font-bold mb-4">
|
||||||
Kursus Lengkap Web Development
|
{featured.title}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-muted-foreground mb-6">
|
<p className="text-muted-foreground mb-6">
|
||||||
Pelajari HTML, CSS, JavaScript, React, dan Node.js dalam satu
|
{featured.description}
|
||||||
kursus komprehensif yang dirancang untuk pemula hingga tingkat
|
|
||||||
menengah.
|
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-wrap gap-4">
|
<div className="flex flex-wrap gap-4">
|
||||||
<Button className="bg-gradient-to-r from-primary to-blue-400 hover:from-primary/90 hover:to-blue-400/90
|
<Button
|
||||||
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"
|
||||||
Mulai Kursus
|
onClick={() =>
|
||||||
|
window.open(featured.primaryButtonLink, '_blank')
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{featured.primaryButtonText}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
onClick={() =>
|
||||||
|
window.open(featured.secondaryButtonLink, '_blank')
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{featured.secondaryButtonText}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline">Lihat Silabus</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="relative h-64 md:h-auto">
|
<div className="relative h-64 md:h-auto">
|
||||||
|
|||||||
@@ -1,87 +1,64 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { QuoteIcon } from '@imphnen-frontend-service/shadcn-ui/atoms';
|
import { QuoteIcon } from '@imphnen-frontend-service/shadcn-ui/atoms';
|
||||||
|
import { formatCMSImageDataToMedia } from 'apps/landing/src/lib/format';
|
||||||
|
import { TestimonialsSection } from 'apps/landing/src/payload-types';
|
||||||
import { motion, useInView } from 'framer-motion';
|
import { motion, useInView } from 'framer-motion';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
export function Testimonials() {
|
export function Testimonials(props: TestimonialsSection) {
|
||||||
const ref = useRef(null);
|
const { title, subtitle, items, stats, joinTitle, joinText } = props;
|
||||||
const isInView = useInView(ref, { once: true, amount: 0.2 });
|
|
||||||
|
|
||||||
const testimonials = [
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
{
|
const isInView = useInView(ref, { once: true, amount: 0.2 });
|
||||||
quote:
|
|
||||||
'Saya yang tadinya tidak mengerti apa-apa tentang programming, sekarang bisa membuat website sendiri dengan mudah. Terima kasih IMPHNEN!',
|
|
||||||
name: 'Budi Santoso',
|
|
||||||
role: 'Web Developer Pemula',
|
|
||||||
avatar: '/Budi Santoso.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
quote:
|
|
||||||
'Komunitas yang sangat supportif! Setiap pertanyaan selalu dijawab dengan cepat dan jelas. Diskusi programnya mudah dipahami.',
|
|
||||||
name: 'Anita Ratna',
|
|
||||||
role: 'Mobile App Developer',
|
|
||||||
avatar: '/Anita Ratna.jpg',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
quote:
|
|
||||||
'Server Discord IMPHNEN adalah tempat belajar terbaik untuk programmer pemula seperti saya. Materinya lengkap dan komunitasnya sangat membantu!',
|
|
||||||
name: 'Dedi Permana',
|
|
||||||
role: 'Data Scientist',
|
|
||||||
avatar: '/Dedi Permana.jpg',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const containerVariants = {
|
const containerVariants = {
|
||||||
hidden: { opacity: 0 },
|
hidden: { opacity: 0 },
|
||||||
visible: {
|
visible: { opacity: 1, transition: { staggerChildren: 0.1 } },
|
||||||
opacity: 1,
|
|
||||||
transition: {
|
|
||||||
staggerChildren: 0.1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const itemVariants = {
|
const itemVariants = {
|
||||||
hidden: { y: 20, opacity: 0 },
|
hidden: { y: 20, opacity: 0 },
|
||||||
visible: {
|
visible: { y: 0, opacity: 1, transition: { duration: 0.5 } },
|
||||||
y: 0,
|
|
||||||
opacity: 1,
|
|
||||||
transition: { duration: 0.5 },
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
id="testimoni"
|
id="testimoni"
|
||||||
className="w-full py-20 md:py-32 bg-muted relative overflow-hidden"
|
className="w-full py-20 md:py-32 bg-muted relative overflow-hidden"
|
||||||
|
ref={ref}
|
||||||
>
|
>
|
||||||
{/* Background Elements */}
|
|
||||||
<div className="absolute inset-0 -z-10">
|
<div className="absolute inset-0 -z-10">
|
||||||
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,rgba(59,130,246,0.1),transparent_50%)]" />
|
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,rgba(59,130,246,0.1),transparent_50%)]" />
|
||||||
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom,rgba(96,165,250,0.1),transparent_50%)]" />
|
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom,rgba(96,165,250,0.1),transparent_50%)]" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="container px-4 md:px-6" ref={ref}>
|
<div className="container px-4 md:px-6">
|
||||||
<div className="flex flex-col items-center justify-center space-y-4 text-center mb-16">
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="space-y-2"
|
className="flex flex-col items-center justify-center space-y-4 text-center mb-16"
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
||||||
transition={{ duration: 0.5 }}
|
transition={{ duration: 0.5 }}
|
||||||
>
|
>
|
||||||
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl/tight lg:text-5xl">
|
<h2 className="text-3xl font-bold tracking-tighter md:text-4xl lg:text-5xl">
|
||||||
Testimoni{' '}
|
{title.split(' ').map((word, i) =>
|
||||||
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
i === title.split(' ').length - 1 ? (
|
||||||
Member
|
<span
|
||||||
|
key={i}
|
||||||
|
className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400"
|
||||||
|
>
|
||||||
|
{word}
|
||||||
</span>
|
</span>
|
||||||
|
) : (
|
||||||
|
<span key={i}>{word} </span>
|
||||||
|
)
|
||||||
|
)}
|
||||||
</h2>
|
</h2>
|
||||||
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
<p className="max-w-[800px] mx-auto text-muted-foreground md:text-lg">
|
||||||
Apa kata mereka yang telah bergabung dengan komunitas IMPHNEN?
|
{subtitle}
|
||||||
</p>
|
</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="grid gap-8 md:grid-cols-3"
|
className="grid gap-8 md:grid-cols-3"
|
||||||
@@ -89,98 +66,68 @@ export function Testimonials() {
|
|||||||
initial="hidden"
|
initial="hidden"
|
||||||
animate={isInView ? 'visible' : 'hidden'}
|
animate={isInView ? 'visible' : 'hidden'}
|
||||||
>
|
>
|
||||||
{testimonials.map((testimonial, index) => (
|
{items?.map((t, idx) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={index}
|
key={idx}
|
||||||
className="group relative overflow-hidden rounded-xl border bg-background p-6 transition-all hover:shadow-lg"
|
className="group relative overflow-hidden rounded-xl border bg-background p-6 transition-all hover:shadow-lg"
|
||||||
variants={itemVariants}
|
variants={itemVariants}
|
||||||
>
|
>
|
||||||
<div className="absolute top-6 right-6 text-primary/20 group-hover:text-primary/40 transition-colors">
|
<div className="absolute top-6 right-6 text-primary/20 group-hover:text-primary/40 transition-colors">
|
||||||
<QuoteIcon className="h-8 w-8" />
|
<QuoteIcon className="h-8 w-8" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative z-10">
|
<div className="relative z-10">
|
||||||
<p className="mb-6 text-muted-foreground italic">
|
<p className="mb-6 text-muted-foreground italic">
|
||||||
“{testimonial.quote}”
|
“{t.quote}”
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className="relative h-12 w-12 overflow-hidden rounded-full border-2 border-primary/20">
|
<div className="relative h-12 w-12 overflow-hidden rounded-full border-2 border-primary/20">
|
||||||
|
{(() => {
|
||||||
|
const media = formatCMSImageDataToMedia(t.avatar);
|
||||||
|
if (!media) return null;
|
||||||
|
return (
|
||||||
<Image
|
<Image
|
||||||
src={testimonial.avatar || '/placeholder.svg'}
|
src={media.url!}
|
||||||
alt={testimonial.name}
|
alt={media.alt}
|
||||||
width={48}
|
width={600}
|
||||||
height={48}
|
height={500}
|
||||||
className="object-cover"
|
className="object-cover"
|
||||||
/>
|
/>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h4 className="font-bold">{testimonial.name}</h4>
|
<h4 className="font-bold">{t.name}</h4>
|
||||||
<p className="text-sm text-muted-foreground">
|
<p className="text-sm text-muted-foreground">{t.role}</p>
|
||||||
{testimonial.role}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="absolute -bottom-1 -left-1 w-20 h-20 bg-gradient-to-tr from-primary/10 to-transparent rounded-tr-full opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
|
<div className="absolute -bottom-1 -left-1 w-20 h-20 bg-gradient-to-tr from-primary/10 to-transparent rounded-tr-full opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
|
||||||
</motion.div>
|
</motion.div>
|
||||||
))}
|
))}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
{/* Testimonial Stats */}
|
|
||||||
<motion.div
|
<motion.div
|
||||||
className="mt-20 rounded-xl overflow-hidden border bg-background/50 backdrop-blur-sm p-8 md:p-12"
|
className="mt-20 rounded-xl overflow-hidden border bg-background/50 backdrop-blur-sm p-8 md:p-12"
|
||||||
initial={{ opacity: 0, y: 20 }}
|
initial={{ opacity: 0, y: 20 }}
|
||||||
animate={isInView ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
||||||
transition={{ duration: 0.5, delay: 0.3 }}
|
transition={{ duration: 0.5, delay: 0.3 }}
|
||||||
>
|
>
|
||||||
<div className="grid md:grid-cols-2 gap-8 items-center">
|
<div className="grid md:grid-cols-2 gap-8 items-center">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-2xl md:text-3xl font-bold mb-4">
|
<h3 className="text-2xl md:text-3xl font-bold mb-4">
|
||||||
Bergabunglah dengan{' '}
|
{joinTitle}
|
||||||
<span className="bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
10,000+
|
|
||||||
</span>{' '}
|
|
||||||
programmer Indonesia lainnya
|
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-muted-foreground">
|
<p className="text-muted-foreground">{joinText}</p>
|
||||||
Komunitas kami terus berkembang dengan programmer dari berbagai
|
|
||||||
latar belakang dan tingkat keahlian. Bersama-sama, kita belajar,
|
|
||||||
berbagi, dan tumbuh sebagai profesional.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<div className="rounded-lg border p-4 text-center">
|
{stats?.map((s, idx) => (
|
||||||
|
<div key={idx} className="rounded-lg border p-4 text-center">
|
||||||
<div className="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
<div className="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
||||||
98%
|
{s.value}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm text-muted-foreground">
|
<div className="text-sm text-muted-foreground">{s.label}</div>
|
||||||
Tingkat Kemalasan
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="rounded-lg border p-4 text-center">
|
|
||||||
<div className="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
4.9/5
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">
|
|
||||||
Rating Drama
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="rounded-lg border p-4 text-center">
|
|
||||||
<div className="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
85%
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">
|
|
||||||
Mendapat Pekerjaan
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="rounded-lg border p-4 text-center">
|
|
||||||
<div className="text-3xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-primary to-blue-400">
|
|
||||||
24/7
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-muted-foreground">Yapping</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { type Metadata } from 'next';
|
import { type Metadata } from 'next';
|
||||||
import { Inter } from 'next/font/google';
|
import { Inter } from 'next/font/google';
|
||||||
import '../../styles/globals.css';
|
import '../../styles/globals.css';
|
||||||
|
import Footer from './_components/footer';
|
||||||
|
import { Header } from './_components/header';
|
||||||
import { ThemeProvider } from './_components/theme-provider';
|
import { ThemeProvider } from './_components/theme-provider';
|
||||||
|
|
||||||
const inter = Inter({ subsets: ['latin'] });
|
const inter = Inter({ subsets: ['latin'] });
|
||||||
@@ -24,7 +26,11 @@ export default function RootLayout({
|
|||||||
enableSystem
|
enableSystem
|
||||||
disableTransitionOnChange
|
disableTransitionOnChange
|
||||||
>
|
>
|
||||||
{children}
|
<div className="flex min-h-screen flex-col">
|
||||||
|
<Header />
|
||||||
|
<main className="flex-1">{children}</main>
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,25 +1,43 @@
|
|||||||
|
import { getGlobalsCallToActionSection } from '../../services/get-globals-call-to-action-section';
|
||||||
|
import { getGlobalsCommunitiesSection } from '../../services/get-globals-communitues-section';
|
||||||
|
import { getGlobalsFeaturesSection } from '../../services/get-globals-features-section';
|
||||||
|
import { getGlobalsHeroSection } from '../../services/get-globals-hero-section';
|
||||||
|
import { getGlobalsLearningResourcesSection } from '../../services/get-globals-learning-resources-section';
|
||||||
|
import { getGlobalsTestimonialsSection } from '../../services/get-globals-testimonials-section';
|
||||||
import { CallToAction } from './_components/call-to-action';
|
import { CallToAction } from './_components/call-to-action';
|
||||||
import { Community } from './_components/community';
|
import { Community } from './_components/community';
|
||||||
import { Features } from './_components/features';
|
import { Features } from './_components/features';
|
||||||
import Footer from './_components/footer';
|
|
||||||
import { Header } from './_components/header';
|
|
||||||
import { Hero } from './_components/hero';
|
import { Hero } from './_components/hero';
|
||||||
import { LearningResources } from './_components/learning-resources';
|
import { LearningResources } from './_components/learning-resources';
|
||||||
import { Testimonials } from './_components/testimonials';
|
import { Testimonials } from './_components/testimonials';
|
||||||
|
|
||||||
export default function Page() {
|
export const revalidate = 10; // Seconds
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
const [
|
||||||
|
heroData,
|
||||||
|
featuresData,
|
||||||
|
communitiesData,
|
||||||
|
learningResourcesData,
|
||||||
|
testimonialsData,
|
||||||
|
callToActionData,
|
||||||
|
] = await Promise.all([
|
||||||
|
getGlobalsHeroSection(),
|
||||||
|
getGlobalsFeaturesSection(),
|
||||||
|
getGlobalsCommunitiesSection(),
|
||||||
|
getGlobalsLearningResourcesSection(),
|
||||||
|
getGlobalsTestimonialsSection(),
|
||||||
|
getGlobalsCallToActionSection(),
|
||||||
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen flex-col">
|
<>
|
||||||
<Header />
|
<Hero {...heroData} />
|
||||||
<main className="flex-1">
|
<Features {...featuresData} />
|
||||||
<Hero />
|
<Community {...communitiesData} />
|
||||||
<Features />
|
<LearningResources {...learningResourcesData} />
|
||||||
<Community />
|
<Testimonials {...testimonialsData} />
|
||||||
<LearningResources />
|
<CallToAction {...callToActionData} />
|
||||||
<Testimonials />
|
</>
|
||||||
<CallToAction />
|
|
||||||
</main>
|
|
||||||
<Footer />
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
export const importMap = {};
|
import { S3ClientUploadHandler as S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24 } from '@payloadcms/storage-s3/client'
|
||||||
|
|
||||||
|
export const importMap = {
|
||||||
|
"@payloadcms/storage-s3/client#S3ClientUploadHandler": S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24
|
||||||
|
}
|
||||||
|
|||||||
@@ -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',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
import { GlobalConfig } from 'payload';
|
||||||
|
|
||||||
|
export const CommunitiesSection: GlobalConfig = {
|
||||||
|
slug: 'communities-section',
|
||||||
|
label: 'Communities Section',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'items',
|
||||||
|
type: 'array',
|
||||||
|
required: true,
|
||||||
|
defaultValue: [
|
||||||
|
{
|
||||||
|
iconName: 'tabler:brand-facebook',
|
||||||
|
title: 'Facebook Group',
|
||||||
|
description:
|
||||||
|
'Bergabunglah dengan grup Facebook kami untuk diskusi santai dan berbagi artikel menarik.',
|
||||||
|
buttonText: 'Gabung Sekarang',
|
||||||
|
buttonLink: 'https://facebook.com/groups/programmerhandal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconName: 'tabler:brand-instagram',
|
||||||
|
title: 'Instagram',
|
||||||
|
description:
|
||||||
|
'Ikuti kami di Instagram untuk tips programming, konten inspiratif, dan info event terbaru.',
|
||||||
|
buttonText: 'Follow Kami',
|
||||||
|
buttonLink: 'https://www.instagram.com/imphnen.dev',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconName: 'tabler:brand-discord-filled',
|
||||||
|
title: 'Discord Server',
|
||||||
|
description:
|
||||||
|
'Diskusikan langsung dengan sesama programmer dan dapatkan bantuan langsung dari para ahli.',
|
||||||
|
buttonText: 'Join Server',
|
||||||
|
buttonLink: 'https://discord.com/invite/imphnen',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'iconName',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{ name: 'title', type: 'text', required: true },
|
||||||
|
{ name: 'description', type: 'textarea', required: true },
|
||||||
|
{ name: 'buttonText', type: 'text', required: true },
|
||||||
|
{ name: 'buttonLink', type: 'text', required: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'stats',
|
||||||
|
type: 'array',
|
||||||
|
required: true,
|
||||||
|
defaultValue: [
|
||||||
|
{ value: '100K+', label: 'Member Aktif' },
|
||||||
|
{ value: '50+', label: 'Event Bulanan' },
|
||||||
|
{ value: '100+', label: 'Mentor Profesional' },
|
||||||
|
{ value: '5K+', label: 'Diskusi Mingguan' },
|
||||||
|
],
|
||||||
|
fields: [
|
||||||
|
{ name: 'value', type: 'text', required: true },
|
||||||
|
{ name: 'label', type: 'text', required: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
import { GlobalConfig } from 'payload';
|
||||||
|
|
||||||
|
export const FeaturesSection: GlobalConfig = {
|
||||||
|
slug: 'features-section',
|
||||||
|
label: 'Features Section',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'heading',
|
||||||
|
type: 'text',
|
||||||
|
defaultValue: 'Belajar programming dengan cara yang lebih baik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'subheading',
|
||||||
|
type: 'text',
|
||||||
|
defaultValue:
|
||||||
|
'IMPHNEN hadir dengan berbagai fitur untuk membantu kamu menjadi programmer handal tanpa harus pusing dengan coding.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'features',
|
||||||
|
type: 'array',
|
||||||
|
defaultValue: [
|
||||||
|
{
|
||||||
|
iconName: 'tabler:device-laptop',
|
||||||
|
title: 'Belajar Tanpa Koding',
|
||||||
|
description:
|
||||||
|
'Pelajari konsep programming dengan cara yang mudah dipahami tanpa harus menulis kode yang rumit.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconName: 'tabler:users',
|
||||||
|
title: 'Komunitas Supportif',
|
||||||
|
description:
|
||||||
|
'Bergabunglah dengan komunitas programmer Indonesia yang siap membantu dan berbagi pengalaman.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconName: 'tabler:book',
|
||||||
|
title: 'Tutorial Interaktif',
|
||||||
|
description:
|
||||||
|
'Akses tutorial interaktif yang membuat konsep programming lebih mudah untuk dipahami.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
iconName: 'tabler:code',
|
||||||
|
title: 'Proyek Praktis',
|
||||||
|
description:
|
||||||
|
'Terapkan pengetahuan Anda dalam proyek nyata dengan panduan langkah demi langkah.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'iconName',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'title',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'description',
|
||||||
|
type: 'textarea',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
import type { GlobalConfig } from 'payload';
|
||||||
|
|
||||||
|
export const HeroSection: GlobalConfig = {
|
||||||
|
slug: 'hero-section',
|
||||||
|
label: 'Hero Section',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'heroImage',
|
||||||
|
label: 'Hero Image',
|
||||||
|
type: 'upload',
|
||||||
|
relationTo: 'media',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'badgeText',
|
||||||
|
label: 'Badge Text',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Komunitas Programmer Indonesia',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'title',
|
||||||
|
label: 'Main Title',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Programmer Handal,',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'highlight',
|
||||||
|
label: 'Highlight Text',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Tanpa Ribet',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'description',
|
||||||
|
label: 'Description',
|
||||||
|
type: 'textarea',
|
||||||
|
required: true,
|
||||||
|
defaultValue:
|
||||||
|
'Temukan potensi programming Anda bersama komunitas yang mendukung, tutorial interaktif, dan sumber daya berkualitas tinggi.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'group',
|
||||||
|
name: 'buttons',
|
||||||
|
label: 'Buttons',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'primaryLabel',
|
||||||
|
label: 'Primary Button Label',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Mulai Belajar',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'primaryUrl',
|
||||||
|
label: 'Primary Button URL',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'https://facebook.com/groups/programmerhandal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'secondaryLabel',
|
||||||
|
label: 'Secondary Button Label',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Gabung Discord',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'secondaryUrl',
|
||||||
|
label: 'Secondary Button URL',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'https://discord.com/invite/imphnen',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'stats',
|
||||||
|
label: 'Statistics',
|
||||||
|
type: 'array',
|
||||||
|
minRows: 1,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'value',
|
||||||
|
label: 'Value',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'label',
|
||||||
|
label: 'Label',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
defaultValue: [
|
||||||
|
{ value: '180K+', label: 'Member' },
|
||||||
|
{ value: '500+', label: 'Tutorial' },
|
||||||
|
{ value: '24/7', label: 'Yapping' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
// payload config
|
||||||
|
import { GlobalConfig } from 'payload';
|
||||||
|
|
||||||
|
export const LearningResourcesSection: GlobalConfig = {
|
||||||
|
slug: 'learning-resources-section',
|
||||||
|
label: 'Learning Resources Section',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'title',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Sumber Belajar',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'description',
|
||||||
|
type: 'textarea',
|
||||||
|
required: true,
|
||||||
|
defaultValue:
|
||||||
|
'Akses berbagai materi belajar yang akan membantu kamu menguasai konsep programming dengan cara yang menyenangkan.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'resources',
|
||||||
|
type: 'array',
|
||||||
|
required: true,
|
||||||
|
fields: [
|
||||||
|
{ name: 'icon', type: 'text', required: true },
|
||||||
|
{ name: 'title', type: 'text', required: true },
|
||||||
|
{ name: 'description', type: 'textarea', required: true },
|
||||||
|
{ name: 'buttonText', type: 'text', required: true },
|
||||||
|
{ name: 'buttonLink', type: 'text', required: true },
|
||||||
|
],
|
||||||
|
defaultValue: [
|
||||||
|
{
|
||||||
|
icon: 'tabler:video',
|
||||||
|
title: 'Video Tutorial',
|
||||||
|
description:
|
||||||
|
'Belajar melalui tutorial video dari langkah awal hingga mahir.',
|
||||||
|
buttonText: 'Lihat Semua Video',
|
||||||
|
buttonLink: '#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'tabler:article',
|
||||||
|
title: 'Artikel & Tutorial',
|
||||||
|
description:
|
||||||
|
'Pelajari konsep programming melalui artikel yang disusun secara terstruktur.',
|
||||||
|
buttonText: 'Baca Artikel',
|
||||||
|
buttonLink: '#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'tabler:brand-vscode',
|
||||||
|
title: 'Tantangan Koding',
|
||||||
|
description:
|
||||||
|
'Uji kemampuan koding kamu dengan tantangan yang menyenangkan dan menantang.',
|
||||||
|
buttonText: 'Mulai Tantangan',
|
||||||
|
buttonLink: '#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'tabler:device-desktop-share',
|
||||||
|
title: 'Sharing Session',
|
||||||
|
description:
|
||||||
|
'Ikuti sesi berbagi pengalaman dari programmer berpengalaman dan belajar dari pengalaman mereka.',
|
||||||
|
buttonText: 'Jadwal Session',
|
||||||
|
buttonLink: '#',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'featured',
|
||||||
|
type: 'group',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'label',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Rekomendasi Terbaik',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'title',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Kursus Lengkap Web Development',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'description',
|
||||||
|
type: 'textarea',
|
||||||
|
required: true,
|
||||||
|
defaultValue:
|
||||||
|
'Pelajari HTML, CSS, JavaScript, React, dan Node.js dalam satu kursus komprehensif yang dirancang untuk pemula hingga tingkat menengah.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'primaryButtonText',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Mulai Kursus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'primaryButtonLink',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: '#',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'secondaryButtonText',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: 'Lihat Silabus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'secondaryButtonLink',
|
||||||
|
type: 'text',
|
||||||
|
required: true,
|
||||||
|
defaultValue: '#',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
import { GlobalConfig } from 'payload';
|
||||||
|
|
||||||
|
export const TestimonialsSection: GlobalConfig = {
|
||||||
|
slug: 'testimonials-section',
|
||||||
|
label: 'Testimonials Section',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'title',
|
||||||
|
label: 'Section Title',
|
||||||
|
type: 'text',
|
||||||
|
defaultValue: 'Testimoni Member',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'subtitle',
|
||||||
|
label: 'Section Subtitle',
|
||||||
|
type: 'textarea',
|
||||||
|
defaultValue:
|
||||||
|
'Apa kata mereka yang telah bergabung dengan komunitas IMPHNEN?',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'items',
|
||||||
|
label: 'Testimonials Items',
|
||||||
|
type: 'array',
|
||||||
|
fields: [
|
||||||
|
{ name: 'quote', type: 'textarea', label: 'Quote', required: true },
|
||||||
|
{ name: 'name', type: 'text', label: 'Name', required: true },
|
||||||
|
{ name: 'role', type: 'text', label: 'Role', required: true },
|
||||||
|
{
|
||||||
|
name: 'avatar',
|
||||||
|
type: 'upload',
|
||||||
|
label: 'Avatar',
|
||||||
|
relationTo: 'media',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
defaultValue: [
|
||||||
|
{
|
||||||
|
quote:
|
||||||
|
'Saya yang tadinya tidak mengerti apa-apa tentang programming, sekarang bisa membuat website sendiri dengan mudah. Terima kasih IMPHNEN!',
|
||||||
|
name: 'Budi Santoso',
|
||||||
|
role: 'Web Developer Pemula',
|
||||||
|
avatar: { id: '', relationTo: 'media' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
quote:
|
||||||
|
'Komunitas yang sangat supportif! Setiap pertanyaan selalu dijawab dengan cepat dan jelas. Diskusi programnya mudah dipahami.',
|
||||||
|
name: 'Anita Ratna',
|
||||||
|
role: 'Mobile App Developer',
|
||||||
|
avatar: { id: '', relationTo: 'media' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
quote:
|
||||||
|
'Server Discord IMPHNEN adalah tempat belajar terbaik untuk programmer pemula seperti saya. Materinya lengkap dan komunitasnya sangat membantu!',
|
||||||
|
name: 'Dedi Permana',
|
||||||
|
role: 'Data Scientist',
|
||||||
|
avatar: { id: '', relationTo: 'media' },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'stats',
|
||||||
|
label: 'Statistics',
|
||||||
|
type: 'array',
|
||||||
|
fields: [
|
||||||
|
{ name: 'value', type: 'text', label: 'Value', required: true },
|
||||||
|
{ name: 'label', type: 'text', label: 'Label', required: true },
|
||||||
|
],
|
||||||
|
defaultValue: [
|
||||||
|
{ value: '98%', label: 'Tingkat Kemalasan' },
|
||||||
|
{ value: '4.9/5', label: 'Rating Drama' },
|
||||||
|
{ value: '85%', label: 'Mendapat Pekerjaan' },
|
||||||
|
{ value: '24/7', label: 'Yapping' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'joinTitle',
|
||||||
|
label: 'Join Section Title',
|
||||||
|
type: 'text',
|
||||||
|
defaultValue: 'Bergabunglah dengan 10,000+ programmer Indonesia lainnya',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'joinText',
|
||||||
|
label: 'Join Section Text',
|
||||||
|
type: 'textarea',
|
||||||
|
defaultValue:
|
||||||
|
'Komunitas kami terus berkembang dengan programmer dari berbagai latar belakang dan tingkat keahlian. Bersama-sama, kita belajar, berbagi, dan tumbuh sebagai profesional.',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { Media } from '../payload-types';
|
||||||
|
|
||||||
|
export function formatCMSImageDataToMedia(
|
||||||
|
image: number | Media | null | undefined
|
||||||
|
): Media | null {
|
||||||
|
if (image && typeof image === 'object' && 'url' in image) {
|
||||||
|
return image as Media;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
@@ -84,8 +84,22 @@ export interface Config {
|
|||||||
db: {
|
db: {
|
||||||
defaultIDType: number;
|
defaultIDType: number;
|
||||||
};
|
};
|
||||||
globals: {};
|
globals: {
|
||||||
globalsSelect: {};
|
'hero-section': HeroSection;
|
||||||
|
'features-section': FeaturesSection;
|
||||||
|
'communities-section': CommunitiesSection;
|
||||||
|
'learning-resources-section': LearningResourcesSection;
|
||||||
|
'testimonials-section': TestimonialsSection;
|
||||||
|
'call-to-action-section': CallToActionSection;
|
||||||
|
};
|
||||||
|
globalsSelect: {
|
||||||
|
'hero-section': HeroSectionSelect<false> | HeroSectionSelect<true>;
|
||||||
|
'features-section': FeaturesSectionSelect<false> | FeaturesSectionSelect<true>;
|
||||||
|
'communities-section': CommunitiesSectionSelect<false> | CommunitiesSectionSelect<true>;
|
||||||
|
'learning-resources-section': LearningResourcesSectionSelect<false> | LearningResourcesSectionSelect<true>;
|
||||||
|
'testimonials-section': TestimonialsSectionSelect<false> | TestimonialsSectionSelect<true>;
|
||||||
|
'call-to-action-section': CallToActionSectionSelect<false> | CallToActionSectionSelect<true>;
|
||||||
|
};
|
||||||
locale: null;
|
locale: null;
|
||||||
user: User & {
|
user: User & {
|
||||||
collection: 'users';
|
collection: 'users';
|
||||||
@@ -271,6 +285,298 @@ export interface PayloadMigrationsSelect<T extends boolean = true> {
|
|||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "hero-section".
|
||||||
|
*/
|
||||||
|
export interface HeroSection {
|
||||||
|
id: number;
|
||||||
|
heroImage: number | Media;
|
||||||
|
badgeText: string;
|
||||||
|
title: string;
|
||||||
|
highlight: string;
|
||||||
|
description: string;
|
||||||
|
buttons: {
|
||||||
|
primaryLabel: string;
|
||||||
|
primaryUrl: string;
|
||||||
|
secondaryLabel: string;
|
||||||
|
secondaryUrl: string;
|
||||||
|
};
|
||||||
|
stats?:
|
||||||
|
| {
|
||||||
|
value: string;
|
||||||
|
label: string;
|
||||||
|
id?: string | null;
|
||||||
|
}[]
|
||||||
|
| null;
|
||||||
|
updatedAt?: string | null;
|
||||||
|
createdAt?: string | null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "features-section".
|
||||||
|
*/
|
||||||
|
export interface FeaturesSection {
|
||||||
|
id: number;
|
||||||
|
heading?: string | null;
|
||||||
|
subheading?: string | null;
|
||||||
|
features?:
|
||||||
|
| {
|
||||||
|
iconName: string;
|
||||||
|
title: string;
|
||||||
|
description?: string | null;
|
||||||
|
id?: string | null;
|
||||||
|
}[]
|
||||||
|
| null;
|
||||||
|
updatedAt?: string | null;
|
||||||
|
createdAt?: string | null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "communities-section".
|
||||||
|
*/
|
||||||
|
export interface CommunitiesSection {
|
||||||
|
id: number;
|
||||||
|
items: {
|
||||||
|
iconName: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
buttonText: string;
|
||||||
|
buttonLink: string;
|
||||||
|
id?: string | null;
|
||||||
|
}[];
|
||||||
|
stats: {
|
||||||
|
value: string;
|
||||||
|
label: string;
|
||||||
|
id?: string | null;
|
||||||
|
}[];
|
||||||
|
updatedAt?: string | null;
|
||||||
|
createdAt?: string | null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "learning-resources-section".
|
||||||
|
*/
|
||||||
|
export interface LearningResourcesSection {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
resources: {
|
||||||
|
icon: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
buttonText: string;
|
||||||
|
buttonLink: string;
|
||||||
|
id?: string | null;
|
||||||
|
}[];
|
||||||
|
featured: {
|
||||||
|
label: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
primaryButtonText: string;
|
||||||
|
primaryButtonLink: string;
|
||||||
|
secondaryButtonText: string;
|
||||||
|
secondaryButtonLink: string;
|
||||||
|
};
|
||||||
|
updatedAt?: string | null;
|
||||||
|
createdAt?: string | null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "testimonials-section".
|
||||||
|
*/
|
||||||
|
export interface TestimonialsSection {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
subtitle: string;
|
||||||
|
items?:
|
||||||
|
| {
|
||||||
|
quote: string;
|
||||||
|
name: string;
|
||||||
|
role: string;
|
||||||
|
avatar: number | Media;
|
||||||
|
id?: string | null;
|
||||||
|
}[]
|
||||||
|
| null;
|
||||||
|
stats?:
|
||||||
|
| {
|
||||||
|
value: string;
|
||||||
|
label: string;
|
||||||
|
id?: string | null;
|
||||||
|
}[]
|
||||||
|
| null;
|
||||||
|
joinTitle: string;
|
||||||
|
joinText: string;
|
||||||
|
updatedAt?: 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
|
||||||
|
* via the `definition` "hero-section_select".
|
||||||
|
*/
|
||||||
|
export interface HeroSectionSelect<T extends boolean = true> {
|
||||||
|
heroImage?: T;
|
||||||
|
badgeText?: T;
|
||||||
|
title?: T;
|
||||||
|
highlight?: T;
|
||||||
|
description?: T;
|
||||||
|
buttons?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
primaryLabel?: T;
|
||||||
|
primaryUrl?: T;
|
||||||
|
secondaryLabel?: T;
|
||||||
|
secondaryUrl?: T;
|
||||||
|
};
|
||||||
|
stats?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
value?: T;
|
||||||
|
label?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
globalType?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "features-section_select".
|
||||||
|
*/
|
||||||
|
export interface FeaturesSectionSelect<T extends boolean = true> {
|
||||||
|
heading?: T;
|
||||||
|
subheading?: T;
|
||||||
|
features?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
iconName?: T;
|
||||||
|
title?: T;
|
||||||
|
description?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
globalType?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "communities-section_select".
|
||||||
|
*/
|
||||||
|
export interface CommunitiesSectionSelect<T extends boolean = true> {
|
||||||
|
items?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
iconName?: T;
|
||||||
|
title?: T;
|
||||||
|
description?: T;
|
||||||
|
buttonText?: T;
|
||||||
|
buttonLink?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
stats?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
value?: T;
|
||||||
|
label?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
globalType?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "learning-resources-section_select".
|
||||||
|
*/
|
||||||
|
export interface LearningResourcesSectionSelect<T extends boolean = true> {
|
||||||
|
title?: T;
|
||||||
|
description?: T;
|
||||||
|
resources?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
icon?: T;
|
||||||
|
title?: T;
|
||||||
|
description?: T;
|
||||||
|
buttonText?: T;
|
||||||
|
buttonLink?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
featured?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
label?: T;
|
||||||
|
title?: T;
|
||||||
|
description?: T;
|
||||||
|
primaryButtonText?: T;
|
||||||
|
primaryButtonLink?: T;
|
||||||
|
secondaryButtonText?: T;
|
||||||
|
secondaryButtonLink?: T;
|
||||||
|
};
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: T;
|
||||||
|
globalType?: T;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
|
* via the `definition` "testimonials-section_select".
|
||||||
|
*/
|
||||||
|
export interface TestimonialsSectionSelect<T extends boolean = true> {
|
||||||
|
title?: T;
|
||||||
|
subtitle?: T;
|
||||||
|
items?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
quote?: T;
|
||||||
|
name?: T;
|
||||||
|
role?: T;
|
||||||
|
avatar?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
stats?:
|
||||||
|
| T
|
||||||
|
| {
|
||||||
|
value?: T;
|
||||||
|
label?: T;
|
||||||
|
id?: T;
|
||||||
|
};
|
||||||
|
joinTitle?: T;
|
||||||
|
joinText?: T;
|
||||||
|
updatedAt?: T;
|
||||||
|
createdAt?: 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".
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
import { postgresAdapter } from '@payloadcms/db-postgres';
|
import { postgresAdapter } from '@payloadcms/db-postgres';
|
||||||
import { lexicalEditor } from '@payloadcms/richtext-lexical';
|
import { lexicalEditor } from '@payloadcms/richtext-lexical';
|
||||||
|
import { s3Storage } from '@payloadcms/storage-s3';
|
||||||
|
import { NodeHttpHandler } from '@smithy/node-http-handler';
|
||||||
|
import https from 'https';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { buildConfig } from 'payload';
|
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 { FeaturesSection } from './collections/FeaturesSection';
|
||||||
|
import { HeroSection } from './collections/HeroSection';
|
||||||
|
import { LearningResourcesSection } from './collections/LearningResourcesSection';
|
||||||
import { Media } from './collections/Media';
|
import { Media } from './collections/Media';
|
||||||
|
import { TestimonialsSection } from './collections/TestimonialsSection';
|
||||||
import { Users } from './collections/Users';
|
import { Users } from './collections/Users';
|
||||||
|
|
||||||
const filename = fileURLToPath(import.meta.url);
|
const filename = fileURLToPath(import.meta.url);
|
||||||
@@ -25,6 +34,14 @@ export default buildConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
collections: [Users, Media],
|
collections: [Users, Media],
|
||||||
|
globals: [
|
||||||
|
HeroSection,
|
||||||
|
FeaturesSection,
|
||||||
|
CommunitiesSection,
|
||||||
|
LearningResourcesSection,
|
||||||
|
TestimonialsSection,
|
||||||
|
CallToActionSection,
|
||||||
|
],
|
||||||
editor: lexicalEditor(),
|
editor: lexicalEditor(),
|
||||||
secret: process.env.CMS_SECRET || '',
|
secret: process.env.CMS_SECRET || '',
|
||||||
typescript: {
|
typescript: {
|
||||||
@@ -36,5 +53,26 @@ export default buildConfig({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
sharp,
|
sharp,
|
||||||
plugins: [],
|
plugins: [
|
||||||
|
s3Storage({
|
||||||
|
collections: {
|
||||||
|
media: {
|
||||||
|
disableLocalStorage: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bucket: 'landing-cms',
|
||||||
|
config: {
|
||||||
|
endpoint: process.env.CMS_STORAGE_ENDPOINT,
|
||||||
|
credentials: {
|
||||||
|
accessKeyId: process.env.CMS_STORAGE_ACCESS_KEY_ID!,
|
||||||
|
secretAccessKey: process.env.CMS_STORAGE_SECRET_ACCESS_KEY!,
|
||||||
|
},
|
||||||
|
region: process.env.CMS_STORAGE_REGION!,
|
||||||
|
forcePathStyle: true,
|
||||||
|
requestHandler: new NodeHttpHandler({
|
||||||
|
httpsAgent: new https.Agent({ rejectUnauthorized: false }),
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { payload } from '../lib/payload';
|
||||||
|
|
||||||
|
export async function getGlobalsCallToActionSection() {
|
||||||
|
return await payload.findGlobal({
|
||||||
|
slug: 'call-to-action-section',
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { payload } from '../lib/payload';
|
||||||
|
|
||||||
|
export async function getGlobalsCommunitiesSection() {
|
||||||
|
return await payload.findGlobal({
|
||||||
|
slug: 'communities-section',
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { payload } from '../lib/payload';
|
||||||
|
|
||||||
|
export async function getGlobalsFeaturesSection() {
|
||||||
|
return await payload.findGlobal({
|
||||||
|
slug: 'features-section',
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { payload } from '../lib/payload';
|
||||||
|
|
||||||
|
export async function getGlobalsHeroSection() {
|
||||||
|
return await payload.findGlobal({
|
||||||
|
slug: 'hero-section',
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { payload } from '../lib/payload';
|
||||||
|
|
||||||
|
export async function getGlobalsLearningResourcesSection() {
|
||||||
|
return await payload.findGlobal({
|
||||||
|
slug: 'learning-resources-section',
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { payload } from '../lib/payload';
|
||||||
|
|
||||||
|
export async function getGlobalsTestimonialsSection() {
|
||||||
|
return await payload.findGlobal({
|
||||||
|
slug: 'testimonials-section',
|
||||||
|
});
|
||||||
|
}
|
||||||
Generated
+1780
-21
File diff suppressed because it is too large
Load Diff
@@ -28,10 +28,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons": "^6.0.0",
|
"@ant-design/icons": "^6.0.0",
|
||||||
"@hookform/resolvers": "^5.0.1",
|
"@hookform/resolvers": "^5.0.1",
|
||||||
|
"@iconify/react": "^6.0.0",
|
||||||
"@payloadcms/db-postgres": "^3.37.0",
|
"@payloadcms/db-postgres": "^3.37.0",
|
||||||
"@payloadcms/next": "^3.37.0",
|
"@payloadcms/next": "^3.37.0",
|
||||||
"@payloadcms/richtext-lexical": "^3.37.0",
|
"@payloadcms/richtext-lexical": "^3.37.0",
|
||||||
|
"@payloadcms/storage-s3": "^3.37.0",
|
||||||
"@radix-ui/react-slot": "^1.2.0",
|
"@radix-ui/react-slot": "^1.2.0",
|
||||||
|
"@smithy/node-http-handler": "^4.0.4",
|
||||||
"@tanstack/react-query": "^5.74.4",
|
"@tanstack/react-query": "^5.74.4",
|
||||||
"@tanstack/react-store": "^0.7.0",
|
"@tanstack/react-store": "^0.7.0",
|
||||||
"@tanstack/react-table": "^8.21.2",
|
"@tanstack/react-table": "^8.21.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user