Footer.tsx 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. "use client";
  2. import Link from "next/link";
  3. import { Github, Mail, MessageSquare } 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. <li className="flex items-center space-x-2 text-muted-foreground">
  111. <Github className="h-4 w-4" />
  112. <a
  113. href={websiteConfig.github.repo}
  114. target="_blank"
  115. rel="noopener noreferrer"
  116. className="transition-colors hover:text-foreground"
  117. >
  118. GitHub
  119. </a>
  120. </li>
  121. <li className="flex items-center space-x-2 text-muted-foreground">
  122. <MessageSquare className="h-4 w-4" />
  123. <Link href="/chat" className="transition-colors hover:text-foreground">
  124. {t("footer.onlineChat")}
  125. </Link>
  126. </li>
  127. </ul>
  128. </div>
  129. </div>
  130. <div className="mt-8 border-t pt-8 text-center text-sm text-muted-foreground">
  131. <p className="mb-2">
  132. © {websiteConfig.copyright.year} {websiteConfig.copyright.company}.{" "}
  133. {t("footer.allRightsReserved")}
  134. </p>
  135. <p>
  136. {t("footer.poweredBy")}{" "}
  137. <a
  138. href={websiteConfig.github.repo}
  139. target="_blank"
  140. rel="noopener noreferrer"
  141. className="hover:text-foreground transition-colors"
  142. >
  143. {t("footer.openSourceLicense")}
  144. </a>
  145. </p>
  146. </div>
  147. </div>
  148. </footer>
  149. );
  150. }