sidebar nav + logo update

This commit is contained in:
2024-06-08 21:31:24 -04:00
parent e6fbc5403d
commit 1fff5d279c
6 changed files with 67 additions and 71 deletions
+2 -1
View File
@@ -36,7 +36,8 @@
--popover-foreground: 60 9.1% 97.8%;
--primary: 47.9 95.8% 53.1%;
--primary-foreground: 26 83.3% 14.1%;
--secondary: 12 6.5% 15.1%;
/* --secondary: 12 6.5% 15.1%; */
--secondary: 0 0% 15%;
--secondary-foreground: 60 9.1% 97.8%;
--muted: 12 6.5% 15.1%;
--muted-foreground: 24 5.4% 63.9%;
+61 -70
View File
@@ -20,6 +20,7 @@ import {
PersonStandingIcon,
RocketIcon,
Settings,
SettingsIcon,
} from "lucide-react";
import {
Command,
@@ -92,56 +93,33 @@ function Sidebar() {
"border-r border-neutral-700 min-h-screen"
)}
>
<div className="flex flex-col min-h-screen p-4">
<div
className={cn(
isCollapsed ? "items-center" : "",
"pb-4 px-2 flex flex-col min-h-screen"
)}
>
<div
className={cn(
isCollapsed ? "bg-background" : "bg-primary h-10 pt-1",
"flex justify-center rounded-full"
)}
className={cn(isCollapsed ? "" : "px-4", "h-16 flex items-center")}
>
{isCollapsed ? (
<Image
src={"/yellowbird-circle.svg"}
src={"/yellowbird-yellow-circle.svg"}
height={40}
width={40}
alt="yellowbird"
/>
) : (
<Image
src={"/yellowbird-black.svg"}
height={10}
width={120}
src={"/yellowbird-yellow-badge.svg"}
height={40}
width={152.5}
alt="yellowbird"
/>
)}
</div>
{/* <Command className="pt-4 rounded-lg bg-background flex-grow">
<CommandList className="max-h-full">
{menuList.map((menu: any, key: number) => (
<CommandGroup heading={!isCollapsed && menu.group} key={key}>
{menu.items.map((option: any, optionKey: number) => (
<CommandItem
key={optionKey}
className="flex gap-2 cursor-pointer p-2"
>
{option.icon}
{!isCollapsed && (
<span className="text-base">{option.text}</span>
)}
</CommandItem>
))}
</CommandGroup>
))}
</CommandList>
</Command> */}
<div
className={cn(
isCollapsed ? "pt-2" : "pt-6",
"rounded-lg bg-background flex-grow"
)}
>
<div className="flex-grow px-4">
<div className="max-h-full">
{menuList.map((menu: any, key: number) => (
<>
@@ -176,41 +154,54 @@ function Sidebar() {
))}
</div>
</div>
<Button
variant="ghost"
onClick={() => {
setIsCollapsed(!isCollapsed);
}}
>
{!isCollapsed ? (
<ArrowLeftToLineIcon height={20} />
) : (
<ArrowRightToLineIcon height={20} />
)}
</Button>
<div
className={cn(
!isCollapsed ? "p-2" : "p-0",
"border border-neutral-700 rounded-lg flex"
)}
>
<Button variant="default" className="w-10 h-10">
Me
</Button>
{!isCollapsed && (
<>
<div className="flex-grow pl-2">
<p className="text-sm">Dylan Benzi</p>
<p className="text-xs text-muted-foreground">
dylanbenzi@gmail.com
</p>
</div>
<Button variant="ghost" className="">
<LogOutIcon width={20} height={20} className="text-red-500" />
</Button>
</>
)}
<div className="flex flex-col gap-2">
<div className={cn(isCollapsed ? "flex flex-col" : "flex", "gap-2")}>
<Button
className="grow"
variant="secondary"
onClick={() => {
setIsCollapsed(!isCollapsed);
}}
>
{!isCollapsed ? (
<ArrowLeftToLineIcon height={20} />
) : (
<ArrowRightToLineIcon height={20} />
)}
</Button>
<Button
variant="secondary"
className="grow"
onClick={() => {
router.push("/settings");
}}
>
<SettingsIcon height={20} />
</Button>
</div>
<div
className={cn(
isCollapsed ? "justify-center" : "",
"p-2 bg-secondary rounded-lg flex items-center"
)}
>
<Button variant="default" className="w-8 h-8 rounded-full">
Me
</Button>
{!isCollapsed && (
<>
<div className="flex-grow pl-2">
<p className="text-sm">Dylan Benzi</p>
<p className="text-xs text-muted-foreground">
dylanbenzi@gmail.com
</p>
</div>
<Button variant="ghost" className="">
<LogOutIcon width={20} height={20} className="text-red-500" />
</Button>
</>
)}
</div>
</div>
</div>
</div>