|
| 1 | +import { ArrowRight, MessagesSquare, Sparkles } from 'lucide-react'; |
| 2 | +import { AnimatedGradient } from '@/components/animated-gradient'; |
| 3 | +import { CommunityLogo } from '@/components/community-logo'; |
| 4 | +import { Button } from '@/components/ui/button'; |
| 5 | +import { DISCORD_INVITE_URL, DISCORD_WIDGET_SRC } from '@/lib/community'; |
| 6 | + |
| 7 | +const highlights = [ |
| 8 | + { icon: MessagesSquare, label: 'Chat across Node, Python, and V' }, |
| 9 | + { icon: Sparkles, label: 'Good first issues and contributor help' }, |
| 10 | +]; |
| 11 | + |
| 12 | +export function DiscordCommunitySection() { |
| 13 | + return ( |
| 14 | + <section className="w-full py-12 md:py-20 lg:py-28 relative overflow-hidden bg-gradient-to-br from-slate-950 via-slate-900 to-indigo-950/70"> |
| 15 | + <div className="absolute inset-0 z-0 opacity-35"> |
| 16 | + <AnimatedGradient /> |
| 17 | + </div> |
| 18 | + <div className="absolute inset-0 bg-grid-white/5 bg-[size:30px_30px] [mask-image:radial-gradient(white,transparent_80%)] z-0" /> |
| 19 | + |
| 20 | + <div className="container px-4 md:px-6 relative z-10"> |
| 21 | + <div className="grid gap-10 lg:grid-cols-2 lg:gap-16 items-center"> |
| 22 | + <div className="space-y-6"> |
| 23 | + <CommunityLogo size={88} className="rounded-2xl border border-white/10 shadow-lg shadow-teal-900/30" /> |
| 24 | + |
| 25 | + <div className="inline-flex items-center gap-2 rounded-full border border-teal-400/30 bg-teal-500/10 px-4 py-1.5 text-sm font-medium text-teal-100 backdrop-blur-sm"> |
| 26 | + <span>Community</span> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div className="space-y-3"> |
| 30 | + <h2 className="text-3xl font-bold tracking-tight sm:text-4xl md:text-5xl bg-clip-text text-transparent bg-gradient-to-r from-teal-300 to-amber-300 leading-tight"> |
| 31 | + Hang out on Discord |
| 32 | + </h2> |
| 33 | + <p className="text-lg text-slate-300 max-w-lg"> |
| 34 | + Join Create Awesome for live chat, good first issues, and collaboration across the Node, Python, and V |
| 35 | + ecosystems. |
| 36 | + </p> |
| 37 | + </div> |
| 38 | + |
| 39 | + <ul className="space-y-2"> |
| 40 | + {highlights.map(({ icon: Icon, label }) => ( |
| 41 | + <li key={label} className="flex items-center gap-2 text-sm text-slate-200"> |
| 42 | + <Icon className="h-4 w-4 shrink-0 text-amber-400" aria-hidden /> |
| 43 | + <span>{label}</span> |
| 44 | + </li> |
| 45 | + ))} |
| 46 | + </ul> |
| 47 | + |
| 48 | + <div className="pt-2"> |
| 49 | + <Button |
| 50 | + size="lg" |
| 51 | + className="bg-gradient-to-r from-teal-500 to-amber-500 hover:from-teal-400 hover:to-amber-400 text-slate-950 font-semibold shadow-lg shadow-teal-900/40 transition-all duration-300" |
| 52 | + asChild |
| 53 | + > |
| 54 | + <a href={DISCORD_INVITE_URL} target="_blank" rel="noreferrer"> |
| 55 | + Join Discord |
| 56 | + <ArrowRight className="ml-2 h-4 w-4" /> |
| 57 | + </a> |
| 58 | + </Button> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + |
| 62 | + <div className="flex items-center justify-center lg:justify-end"> |
| 63 | + <div className="rounded-xl border border-white/10 bg-slate-950/60 p-2 shadow-2xl shadow-indigo-950/40 backdrop-blur-sm"> |
| 64 | + <iframe |
| 65 | + src={DISCORD_WIDGET_SRC} |
| 66 | + width={350} |
| 67 | + height={500} |
| 68 | + allowTransparency |
| 69 | + frameBorder={0} |
| 70 | + sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" |
| 71 | + title="Create Awesome Discord server widget" |
| 72 | + className="max-w-full rounded-lg bg-slate-950" |
| 73 | + /> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | + </section> |
| 79 | + ); |
| 80 | +} |
0 commit comments