diff --git a/apps/landing/public/fonts/BaiJamjuree-Bold.ttf b/apps/landing/public/fonts/BaiJamjuree-Bold.ttf deleted file mode 100644 index bc7a5bf..0000000 Binary files a/apps/landing/public/fonts/BaiJamjuree-Bold.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/BaiJamjuree-Light.ttf b/apps/landing/public/fonts/BaiJamjuree-Light.ttf deleted file mode 100644 index 54717df..0000000 Binary files a/apps/landing/public/fonts/BaiJamjuree-Light.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/BaiJamjuree-Medium.ttf b/apps/landing/public/fonts/BaiJamjuree-Medium.ttf deleted file mode 100644 index c0d3529..0000000 Binary files a/apps/landing/public/fonts/BaiJamjuree-Medium.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/BaiJamjuree-Regular.ttf b/apps/landing/public/fonts/BaiJamjuree-Regular.ttf deleted file mode 100644 index 2b344ae..0000000 Binary files a/apps/landing/public/fonts/BaiJamjuree-Regular.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/BaiJamjuree-SemiBold.ttf b/apps/landing/public/fonts/BaiJamjuree-SemiBold.ttf deleted file mode 100644 index 4a71d10..0000000 Binary files a/apps/landing/public/fonts/BaiJamjuree-SemiBold.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/Poppins-Bold.ttf b/apps/landing/public/fonts/Poppins-Bold.ttf deleted file mode 100644 index 89b46e7..0000000 Binary files a/apps/landing/public/fonts/Poppins-Bold.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/Poppins-Light.ttf b/apps/landing/public/fonts/Poppins-Light.ttf deleted file mode 100644 index b8f5b06..0000000 Binary files a/apps/landing/public/fonts/Poppins-Light.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/Poppins-Medium.ttf b/apps/landing/public/fonts/Poppins-Medium.ttf deleted file mode 100644 index 937b1e9..0000000 Binary files a/apps/landing/public/fonts/Poppins-Medium.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/Poppins-Regular.ttf b/apps/landing/public/fonts/Poppins-Regular.ttf deleted file mode 100644 index e48144e..0000000 Binary files a/apps/landing/public/fonts/Poppins-Regular.ttf and /dev/null differ diff --git a/apps/landing/public/fonts/Poppins-SemiBold.ttf b/apps/landing/public/fonts/Poppins-SemiBold.ttf deleted file mode 100644 index 8421552..0000000 Binary files a/apps/landing/public/fonts/Poppins-SemiBold.ttf and /dev/null differ diff --git a/apps/landing/src/app/(public)/(home)/_components/community-section.tsx b/apps/landing/src/app/(public)/(home)/_components/community-section.tsx index 48552d4..bf8b808 100644 --- a/apps/landing/src/app/(public)/(home)/_components/community-section.tsx +++ b/apps/landing/src/app/(public)/(home)/_components/community-section.tsx @@ -1,8 +1,4 @@ -'use client'; - import SOCIALS from '@/data/socials.json'; -import { motion, useInView } from 'framer-motion'; -import { useRef } from 'react'; import { FaArrowRight, FaDiscord, @@ -13,137 +9,53 @@ import { FaTiktok, } from 'react-icons/fa'; +const ICON_MAP: Record = { + FaFacebook, FaDiscord, FaGithub, FaInstagram, FaTiktok, FaLinkedin, +}; + +const COLOR_MAP: Record = { + FaFacebook: 'text-[#1877F2]', + FaDiscord: 'text-[#5865F2]', + FaGithub: 'text-[#000000]', + FaInstagram: 'text-[#E4405F]', + FaTiktok: 'text-[#000000]', + FaLinkedin: 'text-[#0A66C2]', +}; + export function CommunitySection() { - const ref = useRef(null); - const isInView = useInView(ref, { once: true, amount: 0.2 }); - - const containerVariants = { - hidden: { opacity: 0 }, - visible: { - opacity: 1, - transition: { - staggerChildren: 0.1, - delayChildren: 0.2, - }, - }, - }; - - const itemVariants = { - hidden: { y: 20, opacity: 0 }, - visible: { - y: 0, - opacity: 1, - transition: { - duration: 0.4, - ease: [0.25, 0.46, 0.45, 0.94] as any, - }, - }, - }; - - const getIconComponent = (iconName: string) => { - switch (iconName) { - case 'FaFacebook': - return FaFacebook; - case 'FaDiscord': - return FaDiscord; - case 'FaGithub': - return FaGithub; - case 'FaInstagram': - return FaInstagram; - case 'FaTiktok': - return FaTiktok; - case 'FaLinkedin': - return FaLinkedin; - default: - return FaArrowRight; - } - }; - - const getPlatformColors = (iconName: string) => { - switch (iconName) { - case 'FaFacebook': - return { - iconColor: 'text-[#1877F2]', - }; - case 'FaDiscord': - return { - iconColor: 'text-[#5865F2]', - }; - case 'FaGithub': - return { - iconColor: 'text-[#000000]', - }; - case 'FaInstagram': - return { - iconColor: 'text-[#E4405F]', - }; - case 'FaTiktok': - return { - iconColor: 'text-[#000000]', - }; - case 'FaLinkedin': - return { - iconColor: 'text-[#0A66C2]', - }; - default: - return { - iconColor: 'text-primary-500', - }; - } - }; - return (
-
+
- -

- Bergabung dengan Komunitas Kami di - - Berbagai Platform - -

-

- Terhubung dengan sesama developer di komunitas kami -

-
+

+ Bergabung dengan Komunitas Kami di + Berbagai Platform +

+

+ Terhubung dengan sesama developer di komunitas kami +

- +
{SOCIALS.map((community, index) => { - const IconComponent = getIconComponent(community.icon); - const colors = getPlatformColors(community.icon); + const IconComponent = ICON_MAP[community.icon] || FaArrowRight; + const iconColor = COLOR_MAP[community.icon] || 'text-primary-500'; return ( -
- -

- {community.name} -

+ +

{community.name}

-

- {community.description} -

+

{community.description}

@@ -151,10 +63,10 @@ export function CommunitySection() {
-
+
); })} -
+
); diff --git a/apps/landing/src/app/(public)/(home)/_components/hero-section.tsx b/apps/landing/src/app/(public)/(home)/_components/hero-section.tsx index 516cf38..0c4f8f7 100644 --- a/apps/landing/src/app/(public)/(home)/_components/hero-section.tsx +++ b/apps/landing/src/app/(public)/(home)/_components/hero-section.tsx @@ -3,57 +3,27 @@ import HERO_CONTENT from '@/data/hero-content.json'; import HERO_STATS from '@/data/hero-stats.json'; import { Button } from '@components'; -import { motion } from 'framer-motion'; import Image from 'next/image'; import { useRouter } from 'next/navigation'; -import { Fragment, useEffect, useState } from 'react'; +import { Fragment } from 'react'; export function HeroSection() { const router = useRouter(); const { communityLabel, headingLine1, headingLine2, description, buttons } = HERO_CONTENT; - const [scrollY, setScrollY] = useState(0); - - useEffect(() => { - const handleScroll = () => { - setScrollY(window.scrollY); - }; - - window.addEventListener('scroll', handleScroll); - return () => window.removeEventListener('scroll', handleScroll); - }, []); - return (
-
-
-
+
+
- +
{communityLabel} @@ -87,11 +57,10 @@ export function HeroSection() {
@@ -110,24 +79,31 @@ export function HeroSection() { ))}
-
+
- +
logo - +
+ +
); } diff --git a/apps/landing/src/app/(public)/(home)/_components/testimonial-section.tsx b/apps/landing/src/app/(public)/(home)/_components/testimonial-section.tsx index 824e0ad..4973d87 100644 --- a/apps/landing/src/app/(public)/(home)/_components/testimonial-section.tsx +++ b/apps/landing/src/app/(public)/(home)/_components/testimonial-section.tsx @@ -1,9 +1,8 @@ 'use client'; import { buttonVariants } from '@components'; -import { motion, useInView } from 'framer-motion'; import Link from 'next/link'; -import { useEffect, useRef, useState } from 'react'; +import { useEffect, useState } from 'react'; import { FaQuoteLeft } from 'react-icons/fa'; interface ApiTestimonial { @@ -41,97 +40,46 @@ function getInitial(name: string) { } export function TestimonialSection() { - const ref = useRef(null); - const isInView = useInView(ref, { once: true, amount: 0.1 }); const [testimonials, setTestimonials] = useState([]); useEffect(() => { fetch('https://api.imphnen.dev/v1/landing/cms/testimonials') - .then((res) => { - if (!res.ok) throw new Error('Failed to fetch'); - return res.json(); - }) + .then((res) => res.ok ? res.json() : Promise.reject()) .then((json) => { - const items: Testimonial[] = (json.data as ApiTestimonial[]) - .filter((t) => !t.is_deleted) - .slice(0, 6) - .map((t) => ({ - id: t.id, - name: t.user_fullname, - role: t.role, - text: t.content, - })); - setTestimonials(items); + setTestimonials( + (json.data as ApiTestimonial[]) + .filter((t) => !t.is_deleted) + .slice(0, 6) + .map((t) => ({ id: t.id, name: t.user_fullname, role: t.role, text: t.content })) + ); }) - .catch(() => { - setTestimonials([]); - }); + .catch(() => setTestimonials([])); }, []); - const containerVariants = { - hidden: { opacity: 0 }, - visible: { - opacity: 1, - transition: { - staggerChildren: 0.1, - delayChildren: 0.2, - }, - }, - }; - - const itemVariants = { - hidden: { y: 20, opacity: 0 }, - visible: { - y: 0, - opacity: 1, - transition: { - duration: 0.4, - ease: [0.25, 0.46, 0.45, 0.94] as any, - }, - }, - }; - return (
-
+
- -

- Apa Kata Mereka Tentang - - Komunitas Kami? - -

-
+

+ Apa Kata Mereka Tentang + Komunitas Kami? +

- +
{testimonials.map((testimonial, index) => ( -
-
+
{getInitial(testimonial.name)}
-

- {testimonial.name} -

+

{testimonial.name}

{testimonial.role}

@@ -140,9 +88,9 @@ export function TestimonialSection() {

{testimonial.text}

-
+
))} -
+
diff --git a/apps/landing/src/lib/fonts.ts b/apps/landing/src/lib/fonts.ts index f176df1..9833793 100644 --- a/apps/landing/src/lib/fonts.ts +++ b/apps/landing/src/lib/fonts.ts @@ -1,23 +1,13 @@ -import localFont from 'next/font/local'; +import { Poppins, Bai_Jamjuree } from 'next/font/google'; -export const baiJamjureeFont = localFont({ - src: [ - { path: '../../public/fonts/BaiJamjuree-Light.ttf', weight: '300', style: 'normal' }, - { path: '../../public/fonts/BaiJamjuree-Regular.ttf', weight: '400', style: 'normal' }, - { path: '../../public/fonts/BaiJamjuree-Medium.ttf', weight: '500', style: 'normal' }, - { path: '../../public/fonts/BaiJamjuree-SemiBold.ttf', weight: '600', style: 'normal' }, - { path: '../../public/fonts/BaiJamjuree-Bold.ttf', weight: '700', style: 'normal' }, - ], +export const poppinsFont = Poppins({ + subsets: ['latin'], + weight: ['400', '500', '600', '700'], display: 'swap', }); -export const poppinsFont = localFont({ - src: [ - { path: '../../public/fonts/Poppins-Light.ttf', weight: '300', style: 'normal' }, - { path: '../../public/fonts/Poppins-Regular.ttf', weight: '400', style: 'normal' }, - { path: '../../public/fonts/Poppins-Medium.ttf', weight: '500', style: 'normal' }, - { path: '../../public/fonts/Poppins-SemiBold.ttf', weight: '600', style: 'normal' }, - { path: '../../public/fonts/Poppins-Bold.ttf', weight: '700', style: 'normal' }, - ], +export const baiJamjureeFont = Bai_Jamjuree({ + subsets: ['latin'], + weight: ['400', '500', '600', '700'], display: 'swap', });