-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create sidebar, design logo and change theme
- Loading branch information
1 parent
3186721
commit b379d21
Showing
16 changed files
with
8,944 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
'use client'; | ||
|
||
import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from "@/components/ui/sidebar"; | ||
import { Bot, CreditCard, LayoutDashboard, Plus, Presentation } from "lucide-react"; | ||
import Link from "next/link"; | ||
import { usePathname } from "next/navigation"; | ||
import { cn } from "@/lib/utils"; | ||
import { Button } from "@/components/ui/button"; | ||
import Image from "next/image"; | ||
|
||
const items = [ | ||
{ | ||
title: "Dashboard", | ||
url: "/dashboard", | ||
icon: LayoutDashboard | ||
}, | ||
{ | ||
title: "Q&A", | ||
url: "/qa", | ||
icon: Bot | ||
}, | ||
{ | ||
title: "Meetings", | ||
url: "/meetings", | ||
icon: Presentation | ||
}, | ||
{ | ||
title: "Billing", | ||
url: "/billing", | ||
icon: CreditCard | ||
} | ||
] | ||
|
||
const projects = [ | ||
{ | ||
name: "Project 1" | ||
}, | ||
{ | ||
name: "Project 2" | ||
} | ||
] | ||
|
||
export function AppSidebar() { | ||
const pathname = usePathname(); | ||
const {open} = useSidebar(); | ||
return ( | ||
<Sidebar collapsible="icon" variant="floating"> | ||
<SidebarHeader> | ||
<div className="flex items-center gap-2"> | ||
<Image src="/logo_transparent.png" width={200} height={150} alt="logo" /> | ||
</div> | ||
</SidebarHeader> | ||
|
||
<SidebarContent> | ||
<SidebarGroup> | ||
<SidebarGroupLabel> | ||
Application | ||
</SidebarGroupLabel> | ||
<SidebarGroupContent> | ||
<SidebarMenu> | ||
{items.map((item) => { | ||
return ( | ||
<SidebarMenuItem key={item.title} > | ||
<SidebarMenuButton asChild> | ||
<Link href={item.url} className={cn({'!bg-primary !text-white': pathname === item.url}, 'list-none')}> | ||
<item.icon /> | ||
<span>{item.title}</span> | ||
</Link> | ||
</SidebarMenuButton> | ||
</SidebarMenuItem> | ||
) | ||
})} | ||
</SidebarMenu> | ||
</SidebarGroupContent> | ||
</SidebarGroup> | ||
|
||
<SidebarGroup> | ||
<SidebarGroupLabel> | ||
Your Projects | ||
</SidebarGroupLabel> | ||
<SidebarGroupContent> | ||
<SidebarMenu> | ||
{projects.map(project => { | ||
return ( | ||
<SidebarMenuItem key={project.name}> | ||
<SidebarMenuButton asChild> | ||
<div> | ||
<div className={cn('rounded-sm border size-6 flex items-center justify-center text-sm bg-white text-primary', {'bg-primary text-white': true})}> | ||
{project.name[0]} | ||
</div> | ||
<span>{project.name}</span> | ||
</div> | ||
</SidebarMenuButton> | ||
</SidebarMenuItem> | ||
) | ||
})} | ||
<div className="h-2" /> | ||
{open && ( | ||
<SidebarMenuItem> | ||
<SidebarMenuButton asChild> | ||
<Link href="/create"> | ||
<Button size="sm" variant="outline" className="w-fit"> | ||
<Plus /> | ||
Create Project | ||
</Button> | ||
</Link> | ||
</SidebarMenuButton> | ||
</SidebarMenuItem> | ||
)} | ||
</SidebarMenu> | ||
</SidebarGroupContent> | ||
</SidebarGroup> | ||
|
||
</SidebarContent> | ||
</Sidebar> | ||
); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { SidebarProvider } from "@/components/ui/sidebar"; | ||
import { UserButton } from "@clerk/nextjs"; | ||
import React from "react"; | ||
import { AppSidebar } from "./app-sidebar"; | ||
|
||
type Props = { | ||
children: React.ReactNode; | ||
}; | ||
|
||
const SidebarLayout = ({ children }: Props) => { | ||
return ( | ||
<SidebarProvider> | ||
<AppSidebar /> | ||
<main className="w-full m-2"> | ||
<div className="flex items-center gap-2 border-sidebar-border bg-sidebar border shadow rounded-md p-2 px-4"> | ||
{/* <SearchBar /> */} | ||
<div className="ml-auto"></div> | ||
<UserButton /> | ||
</div> | ||
<div className="h-4"></div> | ||
{/* Main content */} | ||
<div className="border-sidebar-border bg-sidebar border shadow rounded-md overflow-y-scroll h=[calc(100vh-8rem)] p-4"> | ||
{children} | ||
</div> | ||
</main> | ||
</SidebarProvider> | ||
); | ||
}; | ||
|
||
export default SidebarLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from "react"; | ||
|
||
const QAPage = () => { | ||
return ( | ||
<div>QAPage</div> | ||
) | ||
} | ||
|
||
export default QAPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { type ClassValue, clsx } from "clsx"; | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters