1- import type { Metadata } from "next" ;
21import * as React from "react"
2+ import type { Metadata } from "next" ;
33import Link from "next/link"
4+ import Image from 'next/image'
5+
6+
7+
48import { Button } from "@/components/ui/button"
9+ import { SidebarProvider , SidebarTrigger } from "@/components/ui/sidebar"
10+ import { AppSidebar } from "@/components/app-sidebar"
511
612
713
814import "./globals.css" ;
9- import Image from 'next/image'
1015
1116
1217
@@ -21,12 +26,18 @@ export const metadata: Metadata = {
2126 ] ,
2227 } ,
2328} ;
29+
30+
31+
2432// font
2533import { Inter } from "next/font/google" ;
2634const inter = Inter ( {
2735 subsets : [ "latin" ] ,
2836 display : "swap" ,
2937} ) ;
38+
39+
40+
3041// Google Analystics
3142import { GoogleAnalytics } from '@next/third-parties/google'
3243
@@ -43,41 +54,62 @@ export default function RootLayout({
4354
4455
4556 < body id = "#" >
46- < header >
57+ < SidebarProvider >
58+
4759
4860
61+ < header >
4962
50- < div className = "fixed flex flex-row gap-3 m-6 z-20 flex-wrap" >
51- < Button asChild className = "bg-background text-foreground hover:bg-white group" >
52- < Link href = "/" className = "select-none" >
53- < Image
54- src = "/logo/OpenDriveLab/D.png"
55- alt = "OpenDriveLab"
56- width = { 24 }
57- height = { 24 }
58- className = "group-hover:scale-125 transition delay-100 duration-200"
59- />
63+
64+
65+ < AppSidebar />
66+
67+
68+
69+ < div className = "fixed flex flex-row gap-3 m-6 z-100 flex-wrap" >
70+
71+ < Button asChild className = "bg-background text-foreground hover:bg-white group" >
72+ < Link href = "/" className = "select-none" >
73+ < Image
74+ src = "/logo/OpenDriveLab/D.png"
75+ alt = "OpenDriveLab"
76+ width = { 24 }
77+ height = { 24 }
78+ className = "group-hover:scale-125 transition delay-100 duration-200"
79+ />
80+ </ Link >
81+ </ Button >
82+
83+ < SidebarTrigger />
84+
85+ </ div >
86+
87+
88+
89+ < div className = "fixed right-0 bottom-0 m-6 z-20" >
90+ < Link href = "#" className = "bg-background text-foreground hover:bg-o-blue hover:text-background rounded-full flex justify-center items-center p-2 select-none" >
91+ < span >
92+ < svg fill = "none" viewBox = "0 0 24 24" strokeWidth = "1.5" stroke = "currentColor" className = "size-6" >
93+ < path strokeLinecap = "round" strokeLinejoin = "round" d = "m4.5 18.75 7.5-7.5 7.5 7.5" />
94+ < path strokeLinecap = "round" strokeLinejoin = "round" d = "m4.5 12.75 7.5-7.5 7.5 7.5" />
95+ </ svg >
96+ </ span >
6097 </ Link >
61- </ Button >
62- </ div >
98+ </ div >
99+
100+
101+
102+ </ header >
63103
64104
65105
66- < div className = "fixed right-0 bottom-0 m-6 z-20" >
67- < Link href = "#" className = "bg-background text-foreground hover:bg-o-blue hover:text-background rounded-full flex justify-center items-center p-2 select-none" >
68- < span >
69- < svg fill = "none" viewBox = "0 0 24 24" strokeWidth = "1.5" stroke = "currentColor" className = "size-6" >
70- < path strokeLinecap = "round" strokeLinejoin = "round" d = "m4.5 18.75 7.5-7.5 7.5 7.5" />
71- < path strokeLinecap = "round" strokeLinejoin = "round" d = "m4.5 12.75 7.5-7.5 7.5 7.5" />
72- </ svg >
73- </ span >
74- </ Link >
75- </ div >
106+ < main >
107+ { children }
108+ </ main >
76109
77110
78111
79- </ header >
80- { children }
112+ </ SidebarProvider >
81113 </ body >
82114
83115
0 commit comments