Skip to content

Commit

Permalink
refactor: updated links
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed Nov 5, 2022
1 parent 1249016 commit be0da6d
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 106 deletions.
4 changes: 2 additions & 2 deletions src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ const Footer = () => {
</p>
<div className="mb-4 flex w-full items-center justify-center gap-4 text-text-third">
<Link href={"/impressum"}>
<a href={"/impressum"}>Impressum</a>
Impressum
</Link>

<span></span>

<Link href={"/datenschutz"}>
<a href={"/datenschutz"}>Datenschutz</a>
Datenschutz
</Link>
</div>
</div>
Expand Down
76 changes: 37 additions & 39 deletions src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,45 @@ const Header = ({
description: string;
noIndex?: boolean;
}) => {
return (
<>
<NextSeo
title={`${title} | Cubyx Network`}
description={description}
noindex={noIndex}
/>
<header className="fixed top-0 left-0 z-40 flex w-full items-center justify-between p-4">
<Link href={"/"}>
<a href={"/"}>
<div className="flex items-center gap-4 text-4xl hover:cursor-pointer">
<Image
src="/img/netzwerk.png"
alt="CubyxNetwork Logo"
width="70px"
height="70px"
/>
<h1 className="m-0 hidden font-bold md:block">Cubyx Network</h1>
</div>
</a>
</Link>
return <>
<NextSeo
title={`${title} | Cubyx Network`}
description={description}
noindex={noIndex}
/>
<header className="fixed top-0 left-0 z-40 flex w-full items-center justify-between p-4">
<Link href={"/"}>

{
//ToDo: Add Burger Menu for Mobile
}
<div className="hidden items-center gap-4 lg:flex">
<HeaderLink link={"/"}>Home</HeaderLink>
<HeaderLink link={"/projekte"}>Projekte</HeaderLink>
<HeaderLink link={"/team"}>Teamübersicht</HeaderLink>
<HeaderDropdown link={"Partner"}>
{[
{ href: "/partner/tts-craft", name: "TTS-Craft" },
{ href: "/partner/expansehost", name: "Expansehost" },
{ href: "/partner/greatnewsde", name: "GreatNewsDE" },
]}
</HeaderDropdown>
<LoginUser />
<div className="flex items-center gap-4 text-4xl hover:cursor-pointer">
<Image
src="/img/netzwerk.png"
alt="CubyxNetwork Logo"
width="70px"
height="70px"
/>
<h1 className="m-0 hidden font-bold md:block">Cubyx Network</h1>
</div>
</header>
</>
);

</Link>

{
//ToDo: Add Burger Menu for Mobile
}
<div className="hidden items-center gap-4 lg:flex">
<HeaderLink link={"/"}>Home</HeaderLink>
<HeaderLink link={"/projekte"}>Projekte</HeaderLink>
<HeaderLink link={"/team"}>Teamübersicht</HeaderLink>
<HeaderDropdown link={"Partner"}>
{[
{ href: "/partner/tts-craft", name: "TTS-Craft" },
{ href: "/partner/expansehost", name: "Expansehost" },
{ href: "/partner/greatnewsde", name: "GreatNewsDE" },
]}
</HeaderDropdown>
<LoginUser />
</div>
</header>
</>;
};

export default Header;
14 changes: 7 additions & 7 deletions src/components/header/HeaderLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const HeaderLink = ({ link, children }: { link: string; children: any }) => {
const isCurrentSite = useRouter().pathname === link;

return (
<Link href={link}>
<a href={link}>
<h1 className={`m-0 text-xl ${isCurrentSite && "text-text-secondary"}`}>
{children}
</h1>
</a>
</Link>
(<Link href={link}>

<h1 className={`m-0 text-xl ${isCurrentSite && "text-text-secondary"}`}>
{children}
</h1>

</Link>)
);
};

Expand Down
92 changes: 45 additions & 47 deletions src/components/intern/InternHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,55 +22,53 @@ const InternHeader = ({
description: string;
user?: TeamMember;
}) => {
return (
<>
<NextSeo
title={`${title} | Cubyx Network`}
description={description}
noindex={true}
/>
<div className="fixed top-0 left-0 z-40 flex w-full items-center justify-between p-4">
<Link href={"/intern"}>
<a href={"/intern"}>
<div className="flex items-center gap-4 text-4xl hover:cursor-pointer">
<Image
src="/img/netzwerk.png"
alt="CubyxNetwork Logo"
width="70px"
height="70px"
/>
<h1 className="m-0 hidden font-bold md:block">Cubyx Network</h1>
</div>
</a>
</Link>
{user && (
<div className="flex items-center justify-center gap-4">
{user.isAdmin && (
<Link href={"/intern/admin"}>
<a href={"/intern/admin"}>Admin</a>
</Link>
)}
<span className="text-text-third">
{user ? user.username : "Unbekannter"}
</span>
<button
type="button"
className="hover:cursor-pointer"
onClick={logout}
>
<Icon name={"logout-box-line"} className="ri-2x" />
</button>
return <>
<NextSeo
title={`${title} | Cubyx Network`}
description={description}
noindex={true}
/>
<div className="fixed top-0 left-0 z-40 flex w-full items-center justify-between p-4">
<Link href={"/intern"}>

<Link href={"/"}>
<a href={"/"}>
<Icon name={"home-2-line"} className="ri-2x" />
</a>
<div className="flex items-center gap-4 text-4xl hover:cursor-pointer">
<Image
src="/img/netzwerk.png"
alt="CubyxNetwork Logo"
width="70px"
height="70px"
/>
<h1 className="m-0 hidden font-bold md:block">Cubyx Network</h1>
</div>

</Link>
{user && (
<div className="flex items-center justify-center gap-4">
{user.isAdmin && (
<Link href={"/intern/admin"}>
Admin
</Link>
</div>
)}
</div>
</>
);
)}
<span className="text-text-third">
{user ? user.username : "Unbekannter"}
</span>
<button
type="button"
className="hover:cursor-pointer"
onClick={logout}
>
<Icon name={"logout-box-line"} className="ri-2x" />
</button>

<Link href={"/"}>

<Icon name={"home-2-line"} className="ri-2x" />

</Link>
</div>
)}
</div>
</>;
};

export default InternHeader;
22 changes: 11 additions & 11 deletions src/components/intern/LoginUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ const LoginUser = () => {

if (!user) {
return (
<Link href={"/intern"}>
<a href={"/intern"} className="flex items-center">
<Icon name={"login-box-line"} className={"ri-2x"} />
</a>
</Link>
(<Link href={"/intern"} className="flex items-center">

<Icon name={"login-box-line"} className={"ri-2x"} />

</Link>)
);
}

return (
<Link href={"/intern"}>
<a href={"/intern"} className={"flex items-center gap-2"}>
<span className="text-text-third">{user.username}</span>
<Icon name={"user-line"} className="ri-2x" />
</a>
</Link>
(<Link href={"/intern"} className={"flex items-center gap-2"}>

<span className="text-text-third">{user.username}</span>
<Icon name={"user-line"} className="ri-2x" />

</Link>)
);
};

Expand Down

0 comments on commit be0da6d

Please sign in to comment.