From 0478d12ffc03ca3aa866aa874e314b09c5885e54 Mon Sep 17 00:00:00 2001 From: ArraysID Date: Sun, 27 Apr 2025 05:44:11 +0700 Subject: [PATCH] feat: migrate community component --- .../landing/src/app/_components/community.tsx | 179 ++++++++++++++++++ apps/landing/src/app/page.tsx | 2 + libs/shadcn-ui/src/atoms/icons.tsx | 6 + 3 files changed, 187 insertions(+) create mode 100644 apps/landing/src/app/_components/community.tsx diff --git a/apps/landing/src/app/_components/community.tsx b/apps/landing/src/app/_components/community.tsx new file mode 100644 index 0000000..f1c415c --- /dev/null +++ b/apps/landing/src/app/_components/community.tsx @@ -0,0 +1,179 @@ +'use client'; + +import { + Button, + FacebookIcon, + InstagramIcon, + MessageCircleIcon, +} from '@imphnen-frontend-service/shadcn-ui/atoms'; +import { motion, useInView } from 'framer-motion'; +import { useRef } from 'react'; + +export function Community() { + const ref = useRef(null); + const isInView = useInView(ref, { once: true, amount: 0.2 }); + + const communities = [ + { + icon: ( + + ), + 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: ( + + ), + 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: ( + + ), + 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 = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1, + }, + }, + }; + + const itemVariants = { + hidden: { y: 20, opacity: 0 }, + visible: { + y: 0, + opacity: 1, + transition: { duration: 0.5 }, + }, + }; + + return ( +
+ {/* Background Elements */} +
+
+
+
+ +
+
+ +

+ Komunitas{' '} + + Kami + +

+

+ Bergabunglah dengan ribuan programmer Indonesia yang saling + membantu dan berbagi pengalaman. +

+
+
+ + + {communities.map((community, index) => ( + +
+ +
+
+ {community.icon} +
+

{community.title}

+

+ {community.description} +

+ +
+ +
+ + ))} + + + {/* Community Stats */} + +
+
+ 10K+ +
+
Member Aktif
+
+
+
+ 50+ +
+
Event Bulanan
+
+
+
+ 100+ +
+
+ Mentor Profesional +
+
+
+
+ 5K+ +
+
+ Diskusi Mingguan +
+
+
+
+
+ ); +} diff --git a/apps/landing/src/app/page.tsx b/apps/landing/src/app/page.tsx index 201ecc8..d0cd7cd 100644 --- a/apps/landing/src/app/page.tsx +++ b/apps/landing/src/app/page.tsx @@ -1,3 +1,4 @@ +import { Community } from './_components/community'; import { Features } from './_components/features'; import { Header } from './_components/header'; import { Hero } from './_components/hero'; @@ -9,6 +10,7 @@ export default function Page() {
+
); diff --git a/libs/shadcn-ui/src/atoms/icons.tsx b/libs/shadcn-ui/src/atoms/icons.tsx index 81f0e71..2021c2a 100644 --- a/libs/shadcn-ui/src/atoms/icons.tsx +++ b/libs/shadcn-ui/src/atoms/icons.tsx @@ -2,8 +2,11 @@ import { LuArrowDown as ArrowDownIcon, LuBookOpen as BookOpenIcon, LuCode as CodeIcon, + LuFacebook as FacebookIcon, + LuInstagram as InstagramIcon, LuLaptop as LaptopIcon, LuMenu as MenuIcon, + LuMessageCircle as MessageCircleIcon, LuSparkles as SparklesIcon, LuUsers as UsersIcon, LuX as XIcon, @@ -13,8 +16,11 @@ export { ArrowDownIcon, BookOpenIcon, CodeIcon, + FacebookIcon, + InstagramIcon, LaptopIcon, MenuIcon, + MessageCircleIcon, SparklesIcon, UsersIcon, XIcon,