diff options
| author | 2023-04-19 17:30:39 +0800 | |
|---|---|---|
| committer | 2023-04-19 17:30:39 +0800 | |
| commit | 3adc965dd09490b7efa1cce9f09b0a3b30970277 (patch) | |
| tree | f813abb07d7b003984aa74e3154752b6ffc3ccd5 /envshare/app/header.tsx | |
| parent | c7c9ca6f0c8eddf6d34cd40779f3b2d9463f3a46 (diff) | |
| download | HydroRoll-3adc965dd09490b7efa1cce9f09b0a3b30970277.tar.gz HydroRoll-3adc965dd09490b7efa1cce9f09b0a3b30970277.zip | |
✨优化文档
Diffstat (limited to 'envshare/app/header.tsx')
| -rw-r--r-- | envshare/app/header.tsx | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/envshare/app/header.tsx b/envshare/app/header.tsx deleted file mode 100644 index 9d6a3fe..0000000 --- a/envshare/app/header.tsx +++ /dev/null @@ -1,59 +0,0 @@ -"use client"; -import React from "react"; -import Link from "next/link"; -import { usePathname } from "next/navigation"; - -const navigation = [ - { - name: "Share", - href: "/share", - }, - { - name: "Unseal", - href: "/unseal", - }, - // { - // name: "Deploy", - // href: "/deploy", - // }, - { - name: "GitHub", - href: "https://github.com/retrofor/ChienDice", - external: true, - }, -] satisfies { name: string; href: string; external?: boolean }[]; - -export const Header: React.FC = () => { - const pathname = usePathname(); - return ( - <header className="top-0 z-30 w-full px-4 sm:fixed backdrop-blur bh-zinc-900/50"> - <div className="container mx-auto"> - <div className="flex flex-col items-center justify-between gap-2 pt-6 sm:h-20 sm:flex-row sm:pt-0"> - <Link href="/" className="text-2xl font-semibold duration-150 text-zinc-100 hover:text-white"> - EnvShare - </Link> - {/* Desktop navigation */} - <nav className="flex items-center grow"> - <ul className="flex flex-wrap items-center justify-end gap-4 grow"> - {navigation.map((item) => ( - <li className="" key={item.href}> - <Link - className={`flex items-center px-3 py-2 duration-150 text-sm sm:text-base hover:text-zinc-50 - ${pathname === item.href ? "text-zinc-200" : "text-zinc-400"}`} - href={item.href} - target={item.external ? "_blank" : undefined} - rel={item.external ? "noopener noreferrer" : undefined} - > - {item.name} - </Link> - </li> - ))} - </ul> - </nav> - </div> - </div> - - {/* Fancy fading bottom border */} - </header> - ); -}; |
