Header.tsx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. target="_blank"
  44. rel="noopener noreferrer"
  45. className="text-[15px] text-muted-foreground hover:text-foreground transition-colors"
  46. >
  47. 客服登录
  48. </Link>
  49. </nav>
  50. <Button variant="ghost" size="sm" asChild className="hidden sm:flex text-muted-foreground hover:text-foreground">
  51. <a
  52. href={websiteConfig.github.repo}
  53. target="_blank"
  54. rel="noopener noreferrer"
  55. className="flex items-center gap-2"
  56. >
  57. <Github className="w-4 h-4" />
  58. <span>GitHub</span>
  59. </a>
  60. </Button>
  61. <Button variant="ghost" size="icon" asChild className="sm:hidden text-muted-foreground hover:text-foreground">
  62. <a
  63. href={websiteConfig.github.repo}
  64. target="_blank"
  65. rel="noopener noreferrer"
  66. aria-label="GitHub"
  67. >
  68. <Github className="w-5 h-5" />
  69. </a>
  70. </Button>
  71. </div>
  72. </div>
  73. </div>
  74. </header>
  75. );
  76. }