fixed header links, adjusted anchor tag
This commit is contained in:
		@@ -11,54 +11,47 @@ interface HeaderLink {
 | 
			
		||||
const headerLinks: Array<HeaderLink> = [
 | 
			
		||||
  {
 | 
			
		||||
    name: "Home",
 | 
			
		||||
    linkTo: "/",
 | 
			
		||||
    linkTo: `${Deno.env.get("BASE_URI_WEB")}/`,
 | 
			
		||||
    icon: <hi.HiOutlineHome />,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    name: "Blog",
 | 
			
		||||
    linkTo: "posts/",
 | 
			
		||||
    linkTo: `${Deno.env.get("BASE_URI_WEB")}/posts`,
 | 
			
		||||
    icon: <hi.HiOutlineBookmarkSquare />,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    name: "Projects",
 | 
			
		||||
    linkTo: "projects/",
 | 
			
		||||
    linkTo: `${Deno.env.get("BASE_URI_WEB")}/projects`,
 | 
			
		||||
    icon: <hi.HiOutlineWrenchScrewdriver />,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    name: "Contact",
 | 
			
		||||
    linkTo: "contact/",
 | 
			
		||||
    linkTo: `${Deno.env.get("BASE_URI_WEB")}/contact`,
 | 
			
		||||
    icon: <hi.HiOutlinePencilSquare />,
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export default function Header() {
 | 
			
		||||
  return (
 | 
			
		||||
    <nav>
 | 
			
		||||
      <div class="bg-[#313244] flex justify-center space-x-6 p-4">
 | 
			
		||||
        {headerLinks.map((l) => {
 | 
			
		||||
          const newTab = l.newTab ? "_blank" : "_self";
 | 
			
		||||
          return (
 | 
			
		||||
            <a
 | 
			
		||||
              href={l.linkTo}
 | 
			
		||||
              target={newTab}
 | 
			
		||||
              class="text-[#cdd6f4]
 | 
			
		||||
              text-lg 
 | 
			
		||||
              font-medium 
 | 
			
		||||
              transition-all 
 | 
			
		||||
              duration-300 
 | 
			
		||||
              ease-in-out
 | 
			
		||||
              hover:text-[#cba6f7]
 | 
			
		||||
              hover:drop-shadow-[0_0_20px_rgba(96,165,250,0.7)]
 | 
			
		||||
              hover:scale-110
 | 
			
		||||
              cursor-pointer"
 | 
			
		||||
            >
 | 
			
		||||
              <div class="flex items-center gap-2">
 | 
			
		||||
                {l.icon} {l.name}
 | 
			
		||||
              </div>
 | 
			
		||||
            </a>
 | 
			
		||||
          );
 | 
			
		||||
        })}
 | 
			
		||||
      </div>
 | 
			
		||||
    </nav>
 | 
			
		||||
    <header>
 | 
			
		||||
      <nav>
 | 
			
		||||
        <div class="bg-[#313244] flex justify-center space-x-6 p-4">
 | 
			
		||||
          {headerLinks.map((l) => {
 | 
			
		||||
            const newTab = l.newTab ? "_blank" : "_self";
 | 
			
		||||
            return (
 | 
			
		||||
              <a
 | 
			
		||||
                href={l.linkTo}
 | 
			
		||||
                target={newTab}
 | 
			
		||||
                class="text-[#cdd6f4] text-lg font-medium transition-all duration-300 ease-in-out hover:text-[#cba6f7] hover:drop-shadow-[0_0_20px_rgba(96,165,250,0.7)] hover:scale-110 cursor-pointer"
 | 
			
		||||
              >
 | 
			
		||||
                <div class="flex items-center gap-2">
 | 
			
		||||
                  {l.icon} {l.name}
 | 
			
		||||
                </div>
 | 
			
		||||
              </a>
 | 
			
		||||
            );
 | 
			
		||||
          })}
 | 
			
		||||
        </div>
 | 
			
		||||
      </nav>
 | 
			
		||||
    </header>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user