* feat: setup openapi libs for landing * feat: seperate landing layouts * feat: movee landing providers * feat: add auth layout * feat: implement cookie management for access and refresh tokens * feat: replace Inter font with Bai Jamjuree in layout and add font utility * feat: add signin * feat: add Poppins font to the font utility * feat: expand theme colors in index.css for improved styling options * feat: update dependencies and enhance button and form components with new variants and context * feat: move old components to __old__ dir * feat: add react query support * feat: hide the footer * fix: header style * feat: replace Image component with LogoSimple in Header and update Logo component to accept props * fix: update label for tutorial stat in hero-stats.json * feat: implement EventsPage component with event listing and details * feat: add signup button and page * feat: add HERO_CONTENT data and integrate into Hero component * fix: update navigations import to uppercase and add missing Testimoni entry * feat: implement testimonials display and add submission page * fix: correct link path for testimonial submission * feat: add communites component and integrate social links from JSON data * fix: adjust grid gap in Communities component for better layout * fix: update font imports in layout components for consistency * fix: replace text logo with LogoSimple component in Footer and restore Footer in Layout * feat: add TestimonialSection component and update testimonials data * fix: update section ID from 'komunitas' to 'community' for consistency * feat: add CTASection component with interactive elements and background pattern * fix: update join URL in hero content for consistency * fix: update text in CTASection for improved emphasis and consistency * feat: add CommunitySection component and integrate it into the main page * feat: update Footer component to use dynamic navigation and social links * feat: implement HeroSection component with dynamic content and animations * refactor: replace hardcoded testimonials with dynamic data from JSON * feat: add signup page * feat: integrate Turnstile captcha verification in signup process * feat: implement verification page * feat: add signin link to the signup page * feat: add "Forgot Password?" link to the signin form * refactor: clean up unused ThemeProvider code and CSS variables * feat: add base styles for borders and background to improve UI consistency * feat: implement forgot password functionality with validation and UI components * fix: update password validation rules for clarity and consistency * feat: enable rich colors for Toaster component in layout * feat: implement reset password functionality with validation and UI components * feat: implement Turnstile captcha verification for forgot password and signup actions * refactor: remove console log and enhance error handling in signin and resend OTP actions * feat: add navigation entries for Roadmap and Artikel sections * feat: create initial Page component for articles section * feat: update footer component with additional social media links and icons * feat: remove all unused components in landing * chore: add @radix-ui/react-label deps * feat: wrap VerificationTabs in Suspense * feat: update .env.example to include TURNSTILE_SECRET_KEY and correct NEXT_PUBLIC_TURNSTILE_SITEKEY
155 lines
4.4 KiB
TypeScript
155 lines
4.4 KiB
TypeScript
'use client';
|
|
|
|
import SOCIALS from '@/data/socials.json';
|
|
import { motion, useInView } from 'framer-motion';
|
|
import { useRef } from 'react';
|
|
import {
|
|
FaArrowRight,
|
|
FaDiscord,
|
|
FaFacebook,
|
|
FaInstagram,
|
|
FaLinkedin,
|
|
FaTiktok,
|
|
} from 'react-icons/fa';
|
|
|
|
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],
|
|
},
|
|
},
|
|
};
|
|
|
|
const getIconComponent = (iconName: string) => {
|
|
switch (iconName) {
|
|
case 'FaFacebook':
|
|
return FaFacebook;
|
|
case 'FaDiscord':
|
|
return FaDiscord;
|
|
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 'FaInstagram':
|
|
return {
|
|
iconColor: 'text-[#E4405F]',
|
|
};
|
|
case 'FaTiktok':
|
|
return {
|
|
iconColor: 'text-[#000000]',
|
|
};
|
|
case 'FaLinkedin':
|
|
return {
|
|
iconColor: 'text-[#0A66C2]',
|
|
};
|
|
default:
|
|
return {
|
|
iconColor: 'text-primary-500',
|
|
};
|
|
}
|
|
};
|
|
|
|
return (
|
|
<section id="community" className="w-full py-20 md:py-28">
|
|
<div className="container" ref={ref}>
|
|
<div className="flex flex-col items-center justify-center space-y-4 text-center mb-16">
|
|
<motion.div
|
|
initial={{ opacity: 0, y: 20 }}
|
|
animate={isInView ? { opacity: 1, y: 0 } : {}}
|
|
transition={{ duration: 0.4 }}
|
|
>
|
|
<h2 className="text-3xl font-semibold tracking-tight md:text-4xl">
|
|
Bergabung dengan Komunitas Kami di
|
|
<span className="block mt-2 text-primary-500">
|
|
Berbagai Platform
|
|
</span>
|
|
</h2>
|
|
<p className="max-w-[600px] mx-auto text-gray-600 md:text-lg/relaxed mt-4">
|
|
Terhubung dengan sesama developer di komunitas kami
|
|
</p>
|
|
</motion.div>
|
|
</div>
|
|
|
|
<motion.div
|
|
className="grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
variants={containerVariants}
|
|
initial="hidden"
|
|
animate={isInView ? 'visible' : 'hidden'}
|
|
>
|
|
{SOCIALS.map((community, index) => {
|
|
const IconComponent = getIconComponent(community.icon);
|
|
const colors = getPlatformColors(community.icon);
|
|
|
|
return (
|
|
<motion.div
|
|
key={index}
|
|
variants={itemVariants}
|
|
className="group relative p-8 bg-white border border-gray-200 rounded-xl hover:border-gray-300 transition-all duration-300"
|
|
>
|
|
<div className="flex flex-col items-start gap-5">
|
|
<div className="flex items-center gap-4">
|
|
<IconComponent
|
|
className={`w-8 h-8 ${colors.iconColor} transition-colors`}
|
|
/>
|
|
<h3 className="text-xl font-semibold text-gray-900">
|
|
{community.name}
|
|
</h3>
|
|
</div>
|
|
<p className="text-gray-600 text-sm/relaxed">
|
|
{community.description}
|
|
</p>
|
|
<a
|
|
href={community.link}
|
|
className={`inline-flex items-center gap-2 mt-2 text-sm font-medium transition-colors`}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
<span>Jelajahi Komunitas</span>
|
|
<FaArrowRight className="w-4 h-4 transition-transform duration-300 group-hover:translate-x-1" />
|
|
</a>
|
|
</div>
|
|
</motion.div>
|
|
);
|
|
})}
|
|
</motion.div>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|