Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sidenav without logo #32

Merged
merged 8 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/app/admin/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Navigation from "@/components/global/navigation/side";
import { links } from "@/data/admin/navigation";

type LayoutProps = {
children: React.ReactNode;
};

const Layout = ({ children }: LayoutProps) => {
return (
<div className="h-full">
<Navigation />
<div className="flex h-full">
<Navigation links={links} />
{children}
</div>
);
Expand Down
7 changes: 4 additions & 3 deletions src/app/user/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Navigation from "@/components/global/navigation";
import Navigation from "@/components/global/navigation/side";
import { links } from "@/data/user/navigation";

type LayoutProps = {
children: React.ReactNode;
};

const Layout = ({ children }: LayoutProps) => {
return (
<div className="h-full">
<Navigation />
<div className="flex h-full">
<Navigation links={links} />
{children}
</div>
);
Expand Down
9 changes: 1 addition & 8 deletions src/components/global/navigation/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import Link from "next/link";

const Navigation = () => {
return (
<div className="flex gap-4 bg-starlight-blue text-white">
<Link href="/user/applications">Applications</Link>
<Link href="/user/profile">Profile</Link>
</div>
);
return <div className="flex bg-starlight-blue"></div>;
};

export default Navigation;
33 changes: 31 additions & 2 deletions src/components/global/navigation/side.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
const SideNav = () => {
return <div>SideNav</div>;
import Image from "next/image";
import Link from "next/link";
import Logo from "@/public/logo.png";

interface link {
name: string;
link: string;
}

interface props {
links: link[];
}

const SideNav = ({ links }: props) => {
return (
<nav className="flex h-screen w-[10%] flex-col items-center bg-starlight-blue text-white">
<Image src={Logo} alt="Starlight Logo" />

<div className="w-full text-center">
{links.map(({ link, name }, index) => (
<Link
key={index}
href={link}
className="!w-full hover:bg-starlight-yellow"
>
{name}
</Link>
))}
</div>
</nav>
);
};

export default SideNav;
6 changes: 6 additions & 0 deletions src/data/admin/navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const links = [
{
name: "Interviews",
link: "/admin/interviews",
},
];
6 changes: 6 additions & 0 deletions src/data/user/navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const links = [
{
name: "Interviews",
link: "/admin/interviews",
},
];
1 change: 1 addition & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
colors: {
starlight: {
blue: "#173967",
yellow: "#FFE899",
},
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
Expand Down
Loading