Header.tsx 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. "use client";
  2. import Link from "next/link";
  3. import { Button } from "@/components/ui/button";
  4. import { Github } from "lucide-react";
  5. import { websiteConfig } from "@/lib/website-config";
  6. /**
  7. * 官网顶部导航栏
  8. * 包含 Logo、导航链接和 GitHub 链接
  9. */
  10. export function Header() {
  11. return (
  12. <header className="sticky top-0 z-50 w-full border-b border-border/50 bg-background/80 backdrop-blur-md">
  13. <div className="container mx-auto px-6">
  14. <div className="flex h-16 md:h-20 items-center justify-between">
  15. <Link href="/" className="flex items-center gap-2">
  16. <div className="w-9 h-9 rounded-lg bg-primary flex items-center justify-center">
  17. <span className="text-primary-foreground font-semibold text-sm">AI</span>
  18. </div>
  19. <span className="text-[19px] font-semibold text-foreground tracking-tight">AI-CS</span>
  20. </Link>
  21. <div className="flex items-center gap-6 md:gap-8">
  22. <nav className="hidden md:flex items-center gap-6">
  23. <Link
  24. href="#features"
  25. className="text-[15px] text-muted-foreground hover:text-foreground transition-colors"
  26. >
  27. 核心能力
  28. </Link>
  29. <Link
  30. href="#screenshots"
  31. className="text-[15px] text-muted-foreground hover:text-foreground transition-colors"
  32. >
  33. 界面展示
  34. </Link>
  35. <Link
  36. href="#quick-start"
  37. className="text-[15px] text-muted-foreground hover:text-foreground transition-colors"
  38. >
  39. 快速接入
  40. </Link>
  41. <Link
  42. href="/agent/login"
  43. className="text-[15px] text-muted-foreground hover:text-foreground transition-colors"
  44. >
  45. 客服登录
  46. </Link>
  47. </nav>
  48. <Button variant="ghost" size="sm" asChild className="hidden sm:flex text-muted-foreground hover:text-foreground">
  49. <a
  50. href={websiteConfig.github.repo}
  51. target="_blank"
  52. rel="noopener noreferrer"
  53. className="flex items-center gap-2"
  54. >
  55. <Github className="w-4 h-4" />
  56. <span>GitHub</span>
  57. </a>
  58. </Button>
  59. <Button variant="ghost" size="icon" asChild className="sm:hidden text-muted-foreground hover:text-foreground">
  60. <a
  61. href={websiteConfig.github.repo}
  62. target="_blank"
  63. rel="noopener noreferrer"
  64. aria-label="GitHub"
  65. >
  66. <Github className="w-5 h-5" />
  67. </a>
  68. </Button>
  69. </div>
  70. </div>
  71. </div>
  72. </header>
  73. );
  74. }