mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 09:17:00 +00:00
sidebar nav + logo update
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user