Skip to content

Commit

Permalink
fix: Navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
HACO8888 committed Jun 11, 2024
1 parent f7b24c4 commit 43564b8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
2 changes: 0 additions & 2 deletions components/ApplicationInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import StartRegister from "./nav/StartRegister";

export default function ApplicationInfo() {
return (
<>
Expand Down
31 changes: 20 additions & 11 deletions components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from "react";
import StartRegister from "./nav/StartRegister";
import Link from "next/link";
function NavItem({
href,
Expand All @@ -13,7 +12,7 @@ function NavItem({
return (
<Link
href={href}
className="text-white hover:text-[#F9A8D4] font-medium text-xl border-b-[1px] border-blue-50 py-4 lg:border-0"
className="text-white hover:opacity-80 font-medium text-lg border-b-[1px] border-blue-50 py-4 lg:border-0"
onClick={() => setIsNavOpen(false)}
scroll={!href.startsWith("/#")}
>
Expand All @@ -30,19 +29,29 @@ export default function Nav() {
return (
<>
<div className="fixed top-0 left-0 right-0 z-[999999999999999]" >
<nav className="bg-opacity-80 bg-gradient-to-b from-[#060A11] to-[#0C142020] py-3 px-6 lg:py-3 lg:px-10 flex items-center justify-between shadow-2xl transition-all h-[4rem]">
<nav className="bg-opacity-80 bg-gradient-to-b from-[#060A11] to-[#0C142020] py-3 px-6 lg:py-2 lg:px-10 flex items-center justify-between shadow-2xl transition-all h-[4rem] lg:h-auto lg:bg-[linear-gradient(90deg,rgba(12,20,32,1)_0%,rgba(50,84,134,1)_60%,rgba(12,20,32,1)_100%)]">
<Link href="/" className="font-bold">
<img src="/2024/icon/logo.svg" className="h-10" alt="Logo" />
</Link>
<div className="hidden space-x-4 lg:flex">
{navItems.map((item, index) => (
<NavItem href={item.href} key={index} setIsNavOpen={setIsNavOpen}>
{item.text}
</NavItem>
))}
</div>
<div className="flex flex-row gap-4">
<StartRegister></StartRegister>
<div className="hidden mr-3 space-x-4 text-right lg:flex">
{navItems.map((item, index) => (
<NavItem href={item.href} key={index} setIsNavOpen={setIsNavOpen}>
{item.text}
</NavItem>
))}
</div>
<div className="flex-1 my-auto">
<div className="flex mx-auto my-auto">
<a
className="bg-gradient-to-b from-[#78C2FF] to-[#9C7DFF] rounded-full p-1 opacity-60 cursor-not-allowed"
// href="https://sitcon.kktix.cc/events/sitcon-camp2024"
target="_blank"
>
<p className="bg-white text-lg font-medium text-[#1E3D6C] px-4 py-1 rounded-full h-full">報名截止</p>
</a>
</div>
</div>
<button
onClick={() => setIsNavOpen(!isNavOpen)}
className="text-white font-['Anicons_Regular'] text-xl transition-all lg:hidden"
Expand Down
11 changes: 0 additions & 11 deletions components/nav/StartRegister.tsx

This file was deleted.

0 comments on commit 43564b8

Please sign in to comment.