Footer.tsx 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. "use client";
  2. import Link from "next/link";
  3. import { Github, Mail, MessageSquare, Users } from "lucide-react";
  4. import { websiteConfig } from "@/lib/website-config";
  5. import { useI18n } from "@/lib/i18n/provider";
  6. /**
  7. * 官网底部页脚
  8. */
  9. export function Footer() {
  10. const { t } = useI18n();
  11. return (
  12. <footer className="border-t bg-muted/30">
  13. <div className="container mx-auto px-4 py-12">
  14. <div className="grid grid-cols-1 gap-8 md:grid-cols-4">
  15. <div>
  16. <div className="mb-4 flex items-center space-x-2">
  17. <div className="flex h-8 w-8 items-center justify-center rounded-lg bg-primary">
  18. <span className="text-lg font-bold text-primary-foreground">AI</span>
  19. </div>
  20. <span className="text-lg font-bold">AI-CS</span>
  21. </div>
  22. <p className="mb-4 text-sm text-muted-foreground">{t("footer.blurb")}</p>
  23. <div className="flex items-center space-x-4">
  24. <a
  25. href={websiteConfig.github.repo}
  26. target="_blank"
  27. rel="noopener noreferrer"
  28. className="text-muted-foreground transition-colors hover:text-foreground"
  29. aria-label="GitHub"
  30. >
  31. <Github className="h-5 w-5" />
  32. </a>
  33. </div>
  34. </div>
  35. <div>
  36. <h3 className="mb-4 font-semibold">{t("footer.column.product")}</h3>
  37. <ul className="space-y-2 text-sm">
  38. <li>
  39. <Link
  40. href="#features"
  41. className="text-muted-foreground transition-colors hover:text-foreground"
  42. >
  43. {t("nav.features")}
  44. </Link>
  45. </li>
  46. <li>
  47. <Link
  48. href="#screenshots"
  49. className="text-muted-foreground transition-colors hover:text-foreground"
  50. >
  51. {t("nav.screenshots")}
  52. </Link>
  53. </li>
  54. <li>
  55. <Link
  56. href="#quick-start"
  57. className="text-muted-foreground transition-colors hover:text-foreground"
  58. >
  59. {t("nav.quickStart")}
  60. </Link>
  61. </li>
  62. <li>
  63. <Link
  64. href="/agent/login"
  65. target="_blank"
  66. rel="noopener noreferrer"
  67. className="text-muted-foreground transition-colors hover:text-foreground"
  68. >
  69. {t("nav.agentLogin")}
  70. </Link>
  71. </li>
  72. </ul>
  73. </div>
  74. <div>
  75. <h3 className="mb-4 font-semibold">{t("footer.column.friendLinks")}</h3>
  76. <ul className="space-y-2 text-sm">
  77. {websiteConfig.friendLinks.length > 0 ? (
  78. websiteConfig.friendLinks.map((link, index) => (
  79. <li key={index}>
  80. <a
  81. href={link.url}
  82. target="_blank"
  83. rel="noopener noreferrer"
  84. className="text-muted-foreground transition-colors hover:text-foreground"
  85. >
  86. {link.name}
  87. </a>
  88. </li>
  89. ))
  90. ) : (
  91. <li className="text-xs text-muted-foreground">{t("footer.noFriendLinks")}</li>
  92. )}
  93. </ul>
  94. </div>
  95. <div>
  96. <h3 className="mb-4 font-semibold">{t("footer.column.contact")}</h3>
  97. <ul className="space-y-3 text-sm">
  98. {websiteConfig.contact.email ? (
  99. <li className="flex items-center space-x-2 text-muted-foreground">
  100. <Mail className="h-4 w-4 shrink-0" />
  101. <a
  102. href={`mailto:${websiteConfig.contact.email}`}
  103. aria-label={t("footer.emailLabel")}
  104. className="break-all transition-colors hover:text-foreground"
  105. >
  106. {websiteConfig.contact.email}
  107. </a>
  108. </li>
  109. ) : null}
  110. {websiteConfig.contact.qqGroupNumber ? (
  111. <li className="flex items-center space-x-2 text-muted-foreground">
  112. <Users className="h-4 w-4 shrink-0" />
  113. {websiteConfig.contact.qqGroupJoinUrl ? (
  114. <a
  115. href={websiteConfig.contact.qqGroupJoinUrl}
  116. target="_blank"
  117. rel="noopener noreferrer"
  118. aria-label={t("footer.qqGroupAria")}
  119. className="transition-colors hover:text-foreground"
  120. >
  121. {t("footer.qqGroup")}: {websiteConfig.contact.qqGroupNumber}
  122. </a>
  123. ) : (
  124. <span>
  125. {t("footer.qqGroup")}: {websiteConfig.contact.qqGroupNumber}
  126. </span>
  127. )}
  128. </li>
  129. ) : null}
  130. <li className="flex items-center space-x-2 text-muted-foreground">
  131. <Github className="h-4 w-4" />
  132. <a
  133. href={websiteConfig.github.repo}
  134. target="_blank"
  135. rel="noopener noreferrer"
  136. className="transition-colors hover:text-foreground"
  137. >
  138. GitHub
  139. </a>
  140. </li>
  141. <li className="flex items-center space-x-2 text-muted-foreground">
  142. <MessageSquare className="h-4 w-4" />
  143. <Link href="/chat" className="transition-colors hover:text-foreground">
  144. {t("footer.onlineChat")}
  145. </Link>
  146. </li>
  147. </ul>
  148. </div>
  149. </div>
  150. <div className="mt-8 border-t pt-8 text-center text-sm text-muted-foreground">
  151. <p className="mb-2">
  152. © {websiteConfig.copyright.year} {websiteConfig.copyright.company}.{" "}
  153. {t("footer.allRightsReserved")}
  154. </p>
  155. <p>
  156. {t("footer.poweredBy")}{" "}
  157. <a
  158. href={websiteConfig.github.repo}
  159. target="_blank"
  160. rel="noopener noreferrer"
  161. className="hover:text-foreground transition-colors"
  162. >
  163. {t("footer.openSourceLicense")}
  164. </a>
  165. </p>
  166. </div>
  167. </div>
  168. </footer>
  169. );
  170. }