From 04f04aec62b7b67b1f557fad9c30c1a860903c4c Mon Sep 17 00:00:00 2001 From: Justin Brooks Date: Thu, 6 Feb 2025 22:56:13 -0500 Subject: [PATCH 01/14] new ui layouts --- .../app/[workspaceSlug]/(appv2)/layout.tsx | 81 +++++++++++++++++++ .../(appv2)/resources2/layout.tsx | 54 +++++++++++++ .../(appv2)/resources2/page.tsx | 3 + apps/webservice/src/app/globals.css | 18 ++--- packages/ui/src/sidebar.tsx | 6 +- 5 files changed, 150 insertions(+), 12 deletions(-) create mode 100644 apps/webservice/src/app/[workspaceSlug]/(appv2)/layout.tsx create mode 100644 apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/layout.tsx create mode 100644 apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/page.tsx diff --git a/apps/webservice/src/app/[workspaceSlug]/(appv2)/layout.tsx b/apps/webservice/src/app/[workspaceSlug]/(appv2)/layout.tsx new file mode 100644 index 000000000..f9bf0c3ad --- /dev/null +++ b/apps/webservice/src/app/[workspaceSlug]/(appv2)/layout.tsx @@ -0,0 +1,81 @@ +import React from "react"; +import Image from "next/image"; +import Link from "next/link"; +import { + IconCategory, + IconChartBar, + IconCube, + IconPlug, + IconRocket, +} from "@tabler/icons-react"; + +import { cn } from "@ctrlplane/ui"; + +export const metadata = { + title: "Ctrlplane", +}; + +const SidebarIconLink: React.FC<{ + active?: boolean; + icon: React.ReactNode; + label: string; + href: string; +}> = ({ icon, label, href, active }) => { + return ( +
+ + + {icon} + + + {label} + + +
+ ); +}; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( +
+ + +
+ + +
{children}
+
+
+ ); +} diff --git a/apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/layout.tsx b/apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/layout.tsx new file mode 100644 index 000000000..81c487a01 --- /dev/null +++ b/apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/layout.tsx @@ -0,0 +1,54 @@ +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupLabel, + SidebarMenu, + SidebarMenuButton, + SidebarProvider, +} from "@ctrlplane/ui/sidebar"; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( +
+ + + + + Resources + + List + Providers + Resources + Views + + + + + Common Types + + List + Providers + Resources + Views + + + + + Recently Added + + List + Providers + Resources + Views + + + + test + +
{children}
+
+
+ ); +} diff --git a/apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/page.tsx b/apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/page.tsx new file mode 100644 index 000000000..a31379ed0 --- /dev/null +++ b/apps/webservice/src/app/[workspaceSlug]/(appv2)/resources2/page.tsx @@ -0,0 +1,3 @@ +export default function ResourcesPage() { + return
Resources Page
; +} diff --git a/apps/webservice/src/app/globals.css b/apps/webservice/src/app/globals.css index bd42add2f..cbac91966 100644 --- a/apps/webservice/src/app/globals.css +++ b/apps/webservice/src/app/globals.css @@ -42,7 +42,7 @@ } .dark { - --background: 240 10% 3.9%; + --background: 0 0% 3.9%; --foreground: 0 0% 98%; --card: 240 10% 3.9%; --card-foreground: 0 0% 98%; @@ -68,14 +68,14 @@ --chart-4: 280 65% 60%; --chart-5: 340 75% 55%; - --sidebar-background: 0 0% 0%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 4% 10%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; + --sidebar-background: var(--background); + --sidebar-foreground: var(--foreground); + --sidebar-primary: var(--primary); + --sidebar-primary-foreground: var(--primary-foreground); + --sidebar-accent: var(--accent); + --sidebar-accent-foreground: var(--accent-foreground); + --sidebar-border: var(--border); + --sidebar-ring: var(--ring); } } diff --git a/packages/ui/src/sidebar.tsx b/packages/ui/src/sidebar.tsx index b9b7c0de3..556cafb2a 100644 --- a/packages/ui/src/sidebar.tsx +++ b/packages/ui/src/sidebar.tsx @@ -150,7 +150,7 @@ const SidebarProvider = React.forwardRef< } as React.CSSProperties } className={cn( - "group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full", + "group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex w-full", className, )} ref={ref} @@ -233,7 +233,7 @@ const Sidebar = React.forwardRef< {/* This is what handles the sidebar gap on desktop */}