|
| 1 | +'use client'; |
| 2 | + |
| 3 | +import Image from 'next/image'; |
| 4 | +import Link from 'next/link'; |
| 5 | +import type { HonorableMention } from './sponsors-data'; |
| 6 | + |
| 7 | +interface HonorableMentionsProps { |
| 8 | + mentions: HonorableMention[]; |
| 9 | +} |
| 10 | + |
| 11 | +function MentionCard({ mention }: { mention: HonorableMention }) { |
| 12 | + const supportTypeColors = { |
| 13 | + 'Free Plan': 'bg-blue-500/10 text-blue-600 border-blue-500/20', |
| 14 | + 'Open Source': 'bg-green-500/10 text-green-600 border-green-500/20', |
| 15 | + 'Community Support': |
| 16 | + 'bg-purple-500/10 text-purple-600 border-purple-500/20', |
| 17 | + Educational: 'bg-orange-500/10 text-orange-600 border-orange-500/20', |
| 18 | + }; |
| 19 | + |
| 20 | + return ( |
| 21 | + <Link |
| 22 | + className="group block" |
| 23 | + href={mention.website} |
| 24 | + rel="noopener noreferrer" |
| 25 | + target="_blank" |
| 26 | + > |
| 27 | + <div className="relative h-full rounded border border-border bg-card/30 backdrop-blur-sm transition-all duration-300 hover:border-border/80 hover:bg-card/50 hover:shadow-lg"> |
| 28 | + <div className="flex flex-col items-center p-6"> |
| 29 | + {/* Support Type Badge */} |
| 30 | + <div |
| 31 | + className={`mb-4 rounded-full border px-3 py-1 font-medium text-xs ${supportTypeColors[mention.supportType]}`} |
| 32 | + > |
| 33 | + {mention.supportType} |
| 34 | + </div> |
| 35 | + |
| 36 | + {/* Logo */} |
| 37 | + <div className="mb-4 flex h-16 w-full items-center justify-center"> |
| 38 | + <Image |
| 39 | + alt={`${mention.name} logo`} |
| 40 | + className="max-h-full max-w-full object-contain transition-transform duration-300 group-hover:scale-105 dark:brightness-0 dark:invert" |
| 41 | + height={64} |
| 42 | + src={mention.logo} |
| 43 | + width={160} |
| 44 | + /> |
| 45 | + </div> |
| 46 | + |
| 47 | + {/* Name */} |
| 48 | + <h3 className="mb-2 text-center font-semibold text-foreground text-lg transition-colors group-hover:text-primary"> |
| 49 | + {mention.name} |
| 50 | + </h3> |
| 51 | + |
| 52 | + {/* Description */} |
| 53 | + <p className="text-center text-muted-foreground text-sm leading-relaxed"> |
| 54 | + {mention.description} |
| 55 | + </p> |
| 56 | + </div> |
| 57 | + |
| 58 | + {/* Sci-fi corners */} |
| 59 | + <div className="pointer-events-none absolute inset-0"> |
| 60 | + <div className="absolute top-0 left-0 h-2 w-2 group-hover:animate-[cornerGlitch_0.6s_ease-in-out]"> |
| 61 | + <div className="absolute top-0 left-0.5 h-0.5 w-1.5 origin-left bg-foreground opacity-50" /> |
| 62 | + <div className="absolute top-0 left-0 h-2 w-0.5 origin-top bg-foreground opacity-50" /> |
| 63 | + </div> |
| 64 | + <div className="-scale-x-[1] absolute top-0 right-0 h-2 w-2 group-hover:animate-[cornerGlitch_0.6s_ease-in-out]"> |
| 65 | + <div className="absolute top-0 left-0.5 h-0.5 w-1.5 origin-left bg-foreground opacity-50" /> |
| 66 | + <div className="absolute top-0 left-0 h-2 w-0.5 origin-top bg-foreground opacity-50" /> |
| 67 | + </div> |
| 68 | + <div className="-scale-y-[1] absolute bottom-0 left-0 h-2 w-2 group-hover:animate-[cornerGlitch_0.6s_ease-in-out]"> |
| 69 | + <div className="absolute top-0 left-0.5 h-0.5 w-1.5 origin-left bg-foreground opacity-50" /> |
| 70 | + <div className="absolute top-0 left-0 h-2 w-0.5 origin-top bg-foreground opacity-50" /> |
| 71 | + </div> |
| 72 | + <div className="-scale-[1] absolute right-0 bottom-0 h-2 w-2 group-hover:animate-[cornerGlitch_0.6s_ease-in-out]"> |
| 73 | + <div className="absolute top-0 left-0.5 h-0.5 w-1.5 origin-left bg-foreground opacity-50" /> |
| 74 | + <div className="absolute top-0 left-0 h-2 w-0.5 origin-top bg-foreground opacity-50" /> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | + </Link> |
| 79 | + ); |
| 80 | +} |
| 81 | + |
| 82 | +export default function HonorableMentions({ |
| 83 | + mentions, |
| 84 | +}: HonorableMentionsProps) { |
| 85 | + if (mentions.length === 0) { |
| 86 | + return null; |
| 87 | + } |
| 88 | + |
| 89 | + return ( |
| 90 | + <div> |
| 91 | + {/* Header */} |
| 92 | + <div className="mb-12 text-center"> |
| 93 | + <h2 className="mb-4 font-semibold text-2xl sm:text-3xl lg:text-4xl"> |
| 94 | + Honorable Mentions |
| 95 | + </h2> |
| 96 | + <p className="mx-auto max-w-2xl text-muted-foreground text-sm sm:text-base lg:text-lg"> |
| 97 | + Special thanks to these amazing companies and tools that support open |
| 98 | + source projects through free plans and community programs |
| 99 | + </p> |
| 100 | + </div> |
| 101 | + |
| 102 | + {/* Mentions Grid */} |
| 103 | + <div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3"> |
| 104 | + {mentions.map((mention) => ( |
| 105 | + <MentionCard key={mention.id} mention={mention} /> |
| 106 | + ))} |
| 107 | + </div> |
| 108 | + </div> |
| 109 | + ); |
| 110 | +} |
0 commit comments