|
| 1 | +import { type Locale, locales } from "@/lib/i18n/config" |
| 2 | +import { getTranslation } from "@/lib/i18n/translations" |
| 3 | +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" |
| 4 | +import { Button } from "@/components/ui/button" |
| 5 | +import { ExternalLink, Github, MessageSquare, GitPullRequest, FileCode } from "lucide-react" |
| 6 | + |
| 7 | +export function generateStaticParams() { |
| 8 | + return locales.map((lang) => ({ lang })) |
| 9 | +} |
| 10 | + |
| 11 | +export default function ContributePage({ params }: { params: { lang: Locale } }) { |
| 12 | + const t = (key: Parameters<typeof getTranslation>[1]) => getTranslation(params.lang, key) |
| 13 | + |
| 14 | + return ( |
| 15 | + <div className="py-12 md:py-16"> |
| 16 | + <div className="container px-4 md:px-6"> |
| 17 | + <div className="flex flex-col items-center text-center space-y-4 mb-8 md:mb-12"> |
| 18 | + <h1 className="text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl">{t("contribute.title")}</h1> |
| 19 | + <p className="mx-auto max-w-[700px] text-muted-foreground md:text-xl">{t("contribute.subtitle")}</p> |
| 20 | + </div> |
| 21 | + |
| 22 | + <div className="grid gap-6 md:grid-cols-2 lg:gap-8"> |
| 23 | + <Card> |
| 24 | + <CardHeader> |
| 25 | + <CardTitle className="flex items-center gap-2"> |
| 26 | + <FileCode className="h-5 w-5" /> |
| 27 | + {t("contribute.guide")} |
| 28 | + </CardTitle> |
| 29 | + <CardDescription>了解如何为 BayOSS 项目做出贡献</CardDescription> |
| 30 | + </CardHeader> |
| 31 | + <CardContent> |
| 32 | + <p className="mb-4 text-muted-foreground"> |
| 33 | + 我们欢迎所有形式的贡献,无论是代码、文档、设计还是想法。请查看我们的贡献指南,了解如何开始。 |
| 34 | + </p> |
| 35 | + <Button asChild> |
| 36 | + <a |
| 37 | + href="https://github.com/bayoss/community/blob/main/CONTRIBUTING.md" |
| 38 | + target="_blank" |
| 39 | + rel="noopener noreferrer" |
| 40 | + className="flex items-center gap-2" |
| 41 | + > |
| 42 | + <span>查看贡献指南</span> |
| 43 | + <ExternalLink className="h-4 w-4" /> |
| 44 | + </a> |
| 45 | + </Button> |
| 46 | + </CardContent> |
| 47 | + </Card> |
| 48 | + |
| 49 | + <Card> |
| 50 | + <CardHeader> |
| 51 | + <CardTitle className="flex items-center gap-2"> |
| 52 | + <Github className="h-5 w-5" /> |
| 53 | + {t("contribute.codeOfConduct")} |
| 54 | + </CardTitle> |
| 55 | + <CardDescription>了解我们的社区行为准则</CardDescription> |
| 56 | + </CardHeader> |
| 57 | + <CardContent> |
| 58 | + <p className="mb-4 text-muted-foreground"> |
| 59 | + 我们致力于为所有人提供一个友好、安全和包容的环境。请阅读我们的行为准则,了解我们的期望和价值观。 |
| 60 | + </p> |
| 61 | + <Button asChild> |
| 62 | + <a |
| 63 | + href="https://github.com/bayoss/community/blob/main/CODE_OF_CONDUCT.md" |
| 64 | + target="_blank" |
| 65 | + rel="noopener noreferrer" |
| 66 | + className="flex items-center gap-2" |
| 67 | + > |
| 68 | + <span>查看行为准则</span> |
| 69 | + <ExternalLink className="h-4 w-4" /> |
| 70 | + </a> |
| 71 | + </Button> |
| 72 | + </CardContent> |
| 73 | + </Card> |
| 74 | + |
| 75 | + <Card> |
| 76 | + <CardHeader> |
| 77 | + <CardTitle className="flex items-center gap-2"> |
| 78 | + <GitPullRequest className="h-5 w-5" /> |
| 79 | + {t("contribute.pullRequests")} |
| 80 | + </CardTitle> |
| 81 | + <CardDescription>提交代码贡献</CardDescription> |
| 82 | + </CardHeader> |
| 83 | + <CardContent> |
| 84 | + <p className="mb-4 text-muted-foreground"> |
| 85 | + 如果你想为我们的项目贡献代码,可以通过提交 Pull Request |
| 86 | + 来实现。请确保你的代码符合我们的代码规范和贡献指南。 |
| 87 | + </p> |
| 88 | + <Button asChild> |
| 89 | + <a |
| 90 | + href="https://github.com/bayoss" |
| 91 | + target="_blank" |
| 92 | + rel="noopener noreferrer" |
| 93 | + className="flex items-center gap-2" |
| 94 | + > |
| 95 | + <span>浏览项目</span> |
| 96 | + <ExternalLink className="h-4 w-4" /> |
| 97 | + </a> |
| 98 | + </Button> |
| 99 | + </CardContent> |
| 100 | + </Card> |
| 101 | + |
| 102 | + <Card> |
| 103 | + <CardHeader> |
| 104 | + <CardTitle className="flex items-center gap-2"> |
| 105 | + <MessageSquare className="h-5 w-5" /> |
| 106 | + {t("contribute.discussions")} |
| 107 | + </CardTitle> |
| 108 | + <CardDescription>参与社区讨论</CardDescription> |
| 109 | + </CardHeader> |
| 110 | + <CardContent> |
| 111 | + <p className="mb-4 text-muted-foreground"> |
| 112 | + 加入我们的社区讨论,分享你的想法,提出问题,或者与其他社区成员交流。我们欢迎所有形式的参与和反馈。 |
| 113 | + </p> |
| 114 | + <Button asChild> |
| 115 | + <a |
| 116 | + href="https://github.com/bayoss/community/discussions" |
| 117 | + target="_blank" |
| 118 | + rel="noopener noreferrer" |
| 119 | + className="flex items-center gap-2" |
| 120 | + > |
| 121 | + <span>参与讨论</span> |
| 122 | + <ExternalLink className="h-4 w-4" /> |
| 123 | + </a> |
| 124 | + </Button> |
| 125 | + </CardContent> |
| 126 | + </Card> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + ) |
| 131 | +} |
| 132 | + |
0 commit comments