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 all 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.webp
Binary file not shown.
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
3 changes: 2 additions & 1 deletion src/app/director/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Navigation from "@/components/global/navigation/side";
import { links } from "@/data/director/navigation";

type LayoutProps = {
children: React.ReactNode;
Expand All @@ -7,7 +8,7 @@ type LayoutProps = {
const Layout = ({ children }: LayoutProps) => {
return (
<div className="h-full">
<Navigation />
<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.webp";

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/director/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