|
| 1 | +import { |
| 2 | + IconArrowUpRight, |
| 3 | + IconBrandApple, |
| 4 | + IconBrandAndroid, |
| 5 | + IconBrandWindows, |
| 6 | + IconDeviceMobile, |
| 7 | +} from "@tabler/icons-react"; |
| 8 | + |
| 9 | +const RELEASE_URL = "https://github.com/chaitin/MonkeyCode/releases"; |
| 10 | + |
| 11 | +const clients = [ |
| 12 | + { |
| 13 | + name: "Windows", |
| 14 | + description: "Windows 客户端", |
| 15 | + icon: IconBrandWindows, |
| 16 | + }, |
| 17 | + { |
| 18 | + name: "macOS", |
| 19 | + description: "macOS 客户端", |
| 20 | + icon: IconBrandApple, |
| 21 | + }, |
| 22 | + { |
| 23 | + name: "Android", |
| 24 | + description: "Android 客户端", |
| 25 | + icon: IconBrandAndroid, |
| 26 | + }, |
| 27 | + { |
| 28 | + name: "iOS", |
| 29 | + description: "iPhone / iPad 客户端", |
| 30 | + icon: IconDeviceMobile, |
| 31 | + }, |
| 32 | +]; |
| 33 | + |
| 34 | +const Downloads = () => { |
| 35 | + return ( |
| 36 | + <section className="w-full py-16 md:py-24 px-6 sm:px-10 bg-primary text-background" id="downloads"> |
| 37 | + <div className="w-full max-w-[1200px] mx-auto flex flex-col gap-6"> |
| 38 | + <div className="max-w-2xl mx-auto text-center"> |
| 39 | + <h1 className="text-balance text-2xl md:text-4xl font-bold text-center"> |
| 40 | + 全平台客户端 |
| 41 | + </h1> |
| 42 | + </div> |
| 43 | + <div className="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4 mt-6 md:mt-10"> |
| 44 | + {clients.map((client) => ( |
| 45 | + <a |
| 46 | + key={client.name} |
| 47 | + href={RELEASE_URL} |
| 48 | + target="_blank" |
| 49 | + rel="noreferrer" |
| 50 | + className="group flex h-full flex-col justify-between rounded-xl border border-background/20 bg-background/5 p-4 hover:border-background/40 hover:bg-background/10 hover:-translate-y-0.5 transition-all" |
| 51 | + > |
| 52 | + <div className="flex items-center gap-3"> |
| 53 | + <div className="size-12 rounded-lg bg-background/10 text-background flex items-center justify-center shrink-0"> |
| 54 | + <client.icon className="size-7" /> |
| 55 | + </div> |
| 56 | + <div className="min-w-0"> |
| 57 | + <h3 className="text-lg font-semibold leading-none">{client.name}</h3> |
| 58 | + <p className="text-sm text-background/70 mt-2 leading-relaxed"> |
| 59 | + {client.description} |
| 60 | + </p> |
| 61 | + </div> |
| 62 | + </div> |
| 63 | + <div className="mt-5 flex items-center justify-between border-t border-background/15 pt-3"> |
| 64 | + <p className="text-sm font-medium text-background"> |
| 65 | + 下载 |
| 66 | + </p> |
| 67 | + <IconArrowUpRight className="size-4 text-background/60 transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5" /> |
| 68 | + </div> |
| 69 | + </a> |
| 70 | + ))} |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + </section> |
| 74 | + ); |
| 75 | +}; |
| 76 | + |
| 77 | +export default Downloads; |
0 commit comments