added menu and icons

This commit is contained in:
2024-06-07 19:22:57 -04:00
parent 936993ddb5
commit a1647293db
6 changed files with 2645 additions and 3108 deletions
+2283 -2895
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 6483 1738" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g><path d="M1569.48,716.554l-0,-716.554l247.604,0l0,1304.17l-247.604,-0l-0,-465.446l8.959,-3.439c11.035,-4.236 17.596,-15.622 15.726,-27.294c-5.096,-31.81 -13.449,-62.394 -24.685,-91.434Z" style="fill:#1a1b20;"/><path d="M724.831,1027.33l-0,285.265l-0.678,-0c0,234.721 -190.279,425 -425,425c-62.286,0 -123.812,-13.691 -180.221,-40.104l104.897,-224.027c23.576,11.04 49.291,16.762 75.324,16.762c98.103,-0 177.631,-79.528 177.631,-177.631l0.443,-0l-0,-10.216c-17.116,2.097 -34.545,3.177 -52.227,3.177c-234.721,0 -425,-190.279 -425,-425l0,-426.386l247.604,-0l0,426.386l-0.235,0c0,98.103 79.528,177.631 177.631,177.631c18.176,-0 35.714,-2.73 52.227,-7.802l-0,-596.215l247.604,-0l-0,276.84c-16.196,46.404 -25,96.262 -25,148.16c-0,51.898 8.804,101.756 25,148.16Z" style="fill:#1a1b20;"/><path d="M2125.42,1024.35l0,279.822l-247.604,-0l-0,-1304.17l247.604,0l0,733.988c-15.539,45.556 -23.971,94.39 -23.971,145.179c0,50.788 8.432,99.622 23.971,145.178Z" style="fill:#1a1b20;"/><path d="M4908.12,733.988l-0,-279.821l247.604,-0l0,850l-247.604,-0l-0,-279.822c15.539,-45.556 23.971,-94.39 23.971,-145.178c0,-50.789 -8.432,-99.623 -23.971,-145.179Z" style="fill:#1a1b20;"/><path d="M5641.96,705.18c-11.693,-2.406 -23.682,-3.644 -35.799,-3.644c-98.103,-0 -177.631,79.528 -177.631,177.631c0.003,3.056 0.235,425 0.235,425l-247.604,-0l-0,-425c-0,-234.721 190.279,-425 425,-425c70.864,-0 139.904,17.698 201.21,50.647c-73.027,48.828 -130.996,118.448 -165.411,200.366Z" style="fill:#1a1b20;"/><path d="M2975.42,728.092l0,-273.925l247.605,-0c-0,-0 -0.232,444.04 -0.236,447.096c0,59.866 0.236,147.466 78.591,147.466c78.59,0 78.59,-87.6 78.59,-147.466c-0.003,-3.056 -0.235,-447.096 -0.235,-447.096l247.605,-0l-0,447.096c-0,5.706 -0.058,11.353 -0.171,16.942c0.625,58.139 7.299,130.524 78.526,130.524c78.59,0 78.59,-87.6 78.59,-147.466c-0.003,-3.056 -0.235,-447.096 -0.235,-447.096l247.604,-0l0,447.096c0,265.713 -123.802,405.76 -325.959,402.86c-80.152,-1.151 -147.95,-22.948 -200.59,-65.4c-53.107,44.392 -122.016,66.572 -203.725,65.4c-173.207,-2.486 -288.894,-101.39 -318.476,-296.792c12.066,-40.625 18.545,-83.644 18.545,-128.164c0,-52.987 -9.178,-103.846 -26.029,-151.075Zm0.031,180.4c-0.02,-2.399 -0.031,-4.808 -0.031,-7.229l0,-51.869c0.682,9.837 1.029,19.764 1.029,29.773c0,9.856 -0.336,19.635 -0.998,29.325Z" style="fill:#1a1b20;"/><path d="M4057.09,879.167l0,-879.167l247.604,0l0,492.903c54.001,-24.866 114.091,-38.736 177.396,-38.736c234.564,-0 425,190.436 425,425c0,234.564 -190.436,425 -425,425c-63.305,-0 -123.395,-13.871 -177.396,-38.736c-146.088,-67.269 -247.604,-215.005 -247.604,-386.264Zm247.604,9.212c4.801,93.763 82.449,168.419 177.396,168.419c98.037,-0 177.631,-79.594 177.631,-177.631c-0,-98.038 -79.594,-177.631 -177.631,-177.631c-94.947,-0 -172.595,74.655 -177.396,168.418l0,18.425Z" style="fill:#1a1b20;"/><path d="M2551.45,454.167c234.564,-0 425,190.436 425,425c0,234.564 -190.436,425 -425,425c-234.564,-0 -425,-190.436 -425,-425c0,-234.564 190.436,-425 425,-425Zm0,247.592c97.914,-0 177.408,79.494 177.408,177.408c0,97.914 -79.494,177.408 -177.408,177.408c-97.914,-0 -177.408,-79.494 -177.408,-177.408c0,-97.914 79.494,-177.408 177.408,-177.408Z" style="fill:#1a1b20;"/><circle cx="5031.92" cy="283.333" r="137.5" style="fill:#1a1b20;"/><path d="M6482.04,879.167l-0,-879.167l-247.605,0l0,492.903c-54,-24.866 -114.091,-38.736 -177.395,-38.736c-234.564,-0 -425,190.436 -425,425c-0,234.564 190.436,425 425,425c63.304,-0 123.395,-13.871 177.395,-38.736c146.089,-67.269 247.605,-215.005 247.605,-386.264Zm-247.605,9.212c-4.8,93.763 -82.448,168.419 -177.395,168.419c-98.038,-0 -177.631,-79.594 -177.631,-177.631c-0,-98.038 79.593,-177.631 177.631,-177.631c94.947,-0 172.595,74.655 177.395,168.418l0,18.425Z" style="fill:#1a1b20;"/><path d="M1037.26,1016.25c30.636,25.195 69.852,40.33 112.575,40.33c61.586,-0 118.766,-31.94 151.061,-84.38l210.821,129.831c-77.364,125.625 -214.345,202.141 -361.882,202.141c-234.564,-0 -425,-190.436 -425,-425c-0,-234.564 190.436,-425 425,-425c208.771,-0 386.628,151.633 419.65,357.776l-532.225,204.302Zm226.813,-272.81c-31.057,-26.141 -71.064,-41.676 -114.238,-41.676c-89.63,-0 -163.825,66.611 -175.738,152.987l289.976,-111.311Z" style="fill:#1a1b20;"/></g></svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

+3 -1
View File
@@ -22,7 +22,7 @@ export default function RootLayout({
<html lang="en">
<body
className={cn(
"h-[calc(100vh-64px)] antialiased bg-background flex flex-col pl-[300px]",
"h-screen antialiased bg-background flex items-start justify-between",
red_hat.className
)}
>
@@ -33,8 +33,10 @@ export default function RootLayout({
disableTransitionOnChange
>
<Sidebar />
<main className="w-full h-full">
<Navbar />
{children}
</main>
</ThemeProvider>
</body>
</html>
+5 -1
View File
@@ -21,7 +21,11 @@ const Navbar = () => {
router.push(`/symbol/${inputValue}`);
};
return <div className="h-16 border-b border-neutral-700 flex">Nav</div>;
return (
<div className="h-16 border-b border-neutral-700 flex w-full flex-col">
Nav
</div>
);
};
export default Navbar;
+145 -3
View File
@@ -1,12 +1,154 @@
"use client";
import Image from "next/image";
import React from "react";
import React, { useState } from "react";
import { Button } from "../ui/button";
import { cn } from "@/lib/utils";
import {
ArrowLeftRightIcon,
ArrowLeftToLineIcon,
ArrowRightToLine,
ArrowRightToLineIcon,
CalendarIcon,
CircleDollarSignIcon,
FileTextIcon,
LayoutGridIcon,
LineChartIcon,
LogOutIcon,
Mail,
PersonStanding,
PersonStandingIcon,
RocketIcon,
Settings,
} from "lucide-react";
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
CommandShortcut,
} from "../ui/command";
function Sidebar() {
const [isCollapsed, setIsCollapsed] = useState<boolean>(false);
const menuList = [
{
group: "Navigation",
items: [
{
link: "/dashboard",
icon: <LayoutGridIcon />,
text: "Dashboard",
},
{
link: "/calendar",
icon: <CalendarIcon />,
text: "Calendar",
},
{
link: "/porfolio",
icon: <LineChartIcon />,
text: "Portfolio",
},
],
},
{
group: "Apple Inc",
items: [
{
link: "/",
icon: <CircleDollarSignIcon />,
text: "Earnings",
},
{
link: "/",
icon: <ArrowLeftRightIcon />,
text: "Insider Trades",
},
{
link: "/",
icon: <FileTextIcon />,
text: "Filings",
},
],
},
];
return (
<div className="w-[275px] border-r border-neutral-700 min-h-screen p-4 fixed">
{/* <Image src={"/yellowbird.svg"} height={10} width={120} alt="yellowbird" /> */}
<div
className={cn(
isCollapsed ? "w-[75px]" : "min-w-[300px]",
"border-r border-neutral-700 min-h-screen"
)}
>
<div className="flex flex-col min-h-screen p-4">
<div className="h-12 pt-1 flex justify-center bg-primary rounded-full">
<Image
src={"/yellowbird-black.svg"}
height={10}
width={120}
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>
<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>
</div>
</div>
);
}
+28 -28
View File
@@ -1,12 +1,12 @@
"use client"
"use client";
import * as React from "react"
import { type DialogProps } from "@radix-ui/react-dialog"
import { Command as CommandPrimitive } from "cmdk"
import { Search } from "lucide-react"
import * as React from "react";
import { type DialogProps } from "@radix-ui/react-dialog";
import { Command as CommandPrimitive } from "cmdk";
import { Search } from "lucide-react";
import { cn } from "@/lib/utils"
import { Dialog, DialogContent } from "@/components/ui/dialog"
import { cn } from "@/lib/utils";
import { Dialog, DialogContent } from "@/components/ui/dialog";
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
@@ -20,8 +20,8 @@ const Command = React.forwardRef<
)}
{...props}
/>
))
Command.displayName = CommandPrimitive.displayName
));
Command.displayName = CommandPrimitive.displayName;
interface CommandDialogProps extends DialogProps {}
@@ -34,8 +34,8 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
</Command>
</DialogContent>
</Dialog>
)
}
);
};
const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
@@ -52,9 +52,9 @@ const CommandInput = React.forwardRef<
{...props}
/>
</div>
))
));
CommandInput.displayName = CommandPrimitive.Input.displayName
CommandInput.displayName = CommandPrimitive.Input.displayName;
const CommandList = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.List>,
@@ -65,9 +65,9 @@ const CommandList = React.forwardRef<
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
{...props}
/>
))
));
CommandList.displayName = CommandPrimitive.List.displayName
CommandList.displayName = CommandPrimitive.List.displayName;
const CommandEmpty = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Empty>,
@@ -78,9 +78,9 @@ const CommandEmpty = React.forwardRef<
className="py-6 text-center text-sm"
{...props}
/>
))
));
CommandEmpty.displayName = CommandPrimitive.Empty.displayName
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
const CommandGroup = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Group>,
@@ -94,9 +94,9 @@ const CommandGroup = React.forwardRef<
)}
{...props}
/>
))
));
CommandGroup.displayName = CommandPrimitive.Group.displayName
CommandGroup.displayName = CommandPrimitive.Group.displayName;
const CommandSeparator = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Separator>,
@@ -104,11 +104,11 @@ const CommandSeparator = React.forwardRef<
>(({ className, ...props }, ref) => (
<CommandPrimitive.Separator
ref={ref}
className={cn("-mx-1 h-px bg-border", className)}
className={cn("-mx-1 h-px bg-neutral-700", className)}
{...props}
/>
))
CommandSeparator.displayName = CommandPrimitive.Separator.displayName
));
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
const CommandItem = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Item>,
@@ -122,9 +122,9 @@ const CommandItem = React.forwardRef<
)}
{...props}
/>
))
));
CommandItem.displayName = CommandPrimitive.Item.displayName
CommandItem.displayName = CommandPrimitive.Item.displayName;
const CommandShortcut = ({
className,
@@ -138,9 +138,9 @@ const CommandShortcut = ({
)}
{...props}
/>
)
}
CommandShortcut.displayName = "CommandShortcut"
);
};
CommandShortcut.displayName = "CommandShortcut";
export {
Command,
@@ -152,4 +152,4 @@ export {
CommandItem,
CommandShortcut,
CommandSeparator,
}
};