Skip to content

Commit

Permalink
For Gym
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman254 committed Jan 17, 2025
1 parent 59efaac commit 78a8f91
Show file tree
Hide file tree
Showing 12 changed files with 1,039 additions and 6 deletions.
15 changes: 11 additions & 4 deletions app/(root)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import Navbar from "@/components/navigation/navbar";
import AppSidebar from "@/components/navigation/navbar/app-sidebar";
import HomeNavigation from "@/components/navigation/navbar/app-sidebar";
import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar";
import React from "react";

const RootLayout = ({ children }: { children: React.ReactNode }) => {
return (
<main>
<Navbar />
{children}
</main>
<SidebarProvider>
<main>
<Navbar />
<SidebarTrigger />
{children}
<AppSidebar />
</main>
</SidebarProvider>
);
};

Expand Down
18 changes: 18 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,23 @@
@layer base {
:root {
--radius: 0.5rem;
--sidebar-background: 0 0% 98%;
--sidebar-foreground: 240 5.3% 26.1%;
--sidebar-primary: 240 5.9% 10%;
--sidebar-primary-foreground: 0 0% 98%;
--sidebar-accent: 240 4.8% 95.9%;
--sidebar-accent-foreground: 240 5.9% 10%;
--sidebar-border: 220 13% 91%;
--sidebar-ring: 217.2 91.2% 59.8%;
}
.dark {
--sidebar-background: 240 5.9% 10%;
--sidebar-foreground: 240 4.8% 95.9%;
--sidebar-primary: 224.3 76.3% 48%;
--sidebar-primary-foreground: 0 0% 100%;
--sidebar-accent: 240 3.7% 15.9%;
--sidebar-accent-foreground: 240 4.8% 95.9%;
--sidebar-border: 240 3.7% 15.9%;
--sidebar-ring: 217.2 91.2% 59.8%;
}
}
2 changes: 0 additions & 2 deletions components/navigation/navbar/MobileNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import {
Sheet,
SheetClose,
SheetContent,
SheetDescription,
SheetHeader,
SheetTitle,
SheetTrigger,
} from "@/components/ui/sheet";
Expand Down
79 changes: 79 additions & 0 deletions components/navigation/navbar/app-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { Calendar, Home, Inbox, Search, Settings } from "lucide-react";

import {
Sidebar,
SidebarContent,
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar";
import NavLinks from "./NavLinks";
import { Button } from "@/components/ui/button";
import ROUTES from "@/constants/routes";
import Link from "next/link";

// Menu items.
const items = [
{
title: "Home",
url: "#",
icon: Home,
},
{
title: "Inbox",
url: "#",
icon: Inbox,
},
{
title: "Calendar",
url: "#",
icon: Calendar,
},
{
title: "Search",
url: "#",
icon: Search,
},
{
title: "Settings",
url: "#",
icon: Settings,
},
];

export default function AppSidebar() {
return (
<Sidebar className=" background-light900_dark200 border-none" side="left">
<SidebarContent className="">
<SidebarGroup>
<SidebarGroupLabel>Routes</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<div className="no-scrollbar flex h-[calc(100vh-80px)] flex-col justify-between overflow-y-auto">
<section className="flex h-full flex-col gap-6 pt-16">
<NavLinks isMobileNav />
</section>

<div className="flex flex-col gap-3">
<Link href={ROUTES.SIGN_IN}>
<Button className="small-medium btn-secondary min-h-[41px] w-full rounded-lg px-4 py-3 shadow-none">
<span className="primary-text-gradient">Log in</span>
</Button>
</Link>
</div>
<Link href={ROUTES.SIGN_UP}>
<Button className="small-medium light-border-2 btn-tertiary text-dark400_light900 min-h-[41px] w-full rounded-lg border px-4 py-3 shadow-none">
Sign up
</Button>
</Link>
</div>
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
</SidebarContent>
</Sidebar>
);
}
31 changes: 31 additions & 0 deletions components/ui/separator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"use client"

import * as React from "react"
import * as SeparatorPrimitive from "@radix-ui/react-separator"

import { cn } from "@/lib/utils"

const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(
(
{ className, orientation = "horizontal", decorative = true, ...props },
ref
) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
"shrink-0 bg-slate-200 dark:bg-slate-800",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
className
)}
{...props}
/>
)
)
Separator.displayName = SeparatorPrimitive.Root.displayName

export { Separator }
Loading

0 comments on commit 78a8f91

Please sign in to comment.