@@ -4,58 +4,59 @@ import React from "react";
44const Navbar = ( { menus } ) => {
55 return (
66 < nav className = "flex items-center justify-between flex-wrap bg-teal-500 p-6" >
7- < div className = "flex items-center flex-shrink-0 text-white mr-6" >
8- < svg
9- className = "fill-current h-8 w-8 mr-2"
10- width = "54"
11- height = "54"
12- viewBox = "0 0 54 54"
13- xmlns = "http://www.w3.org/2000/svg"
14- >
15- < path d = "M13.5 22.1c1.8-7.2 6.3-10.8 13.5-10.8 10.8 0 12.15 8.1 17.55 9.45 3.6.9 6.75-.45 9.45-4.05-1.8 7.2-6.3 10.8-13.5 10.8-10.8 0-12.15-8.1-17.55-9.45-3.6-.9-6.75.45-9.45 4.05zM0 38.3c1.8-7.2 6.3-10.8 13.5-10.8 10.8 0 12.15 8.1 17.55 9.45 3.6.9 6.75-.45 9.45-4.05-1.8 7.2-6.3 10.8-13.5 10.8-10.8 0-12.15-8.1-17.55-9.45-3.6-.9-6.75.45-9.45 4.05z" />
16- </ svg >
17- < Link href = "/" >
18- < a >
7+ < div className = "container mx-auto flex" >
8+ < div className = "flex items-center flex-shrink-0 text-white mr-6" >
9+ < svg
10+ className = "fill-current h-8 w-8 mr-2"
11+ width = "54"
12+ height = "54"
13+ viewBox = "0 0 54 54"
14+ xmlns = "http://www.w3.org/2000/svg"
15+ >
16+ < path d = "M13.5 22.1c1.8-7.2 6.3-10.8 13.5-10.8 10.8 0 12.15 8.1 17.55 9.45 3.6.9 6.75-.45 9.45-4.05-1.8 7.2-6.3 10.8-13.5 10.8-10.8 0-12.15-8.1-17.55-9.45-3.6-.9-6.75.45-9.45 4.05zM0 38.3c1.8-7.2 6.3-10.8 13.5-10.8 10.8 0 12.15 8.1 17.55 9.45 3.6.9 6.75-.45 9.45-4.05-1.8 7.2-6.3 10.8-13.5 10.8-10.8 0-12.15-8.1-17.55-9.45-3.6-.9-6.75.45-9.45 4.05z" />
17+ </ svg >
18+ < Link href = "/" >
19+ < a >
1920 < span className = "font-semibold text-xl tracking-tight" >
2021 Next.js WordPress Theme
2122 </ span >
22- </ a >
23- </ Link >
24- </ div >
25- < div className = "block lg:hidden" >
26- < button className = "flex items-center px-3 py-2 border rounded text-teal-200 border-teal-400 hover:text-white hover:border-white" >
27- < svg
28- className = "fill-current h-3 w-3"
29- viewBox = "0 0 20 20"
30- xmlns = "http://www.w3.org/2000/svg"
31- >
32- < title > Menu</ title >
33- < path d = "M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
34- </ svg >
35- </ button >
36- </ div >
37- < div className = "w-full block flex-grow lg:flex lg:items-center lg:w-auto" >
38- < div className = "text-sm lg:flex-grow" >
39- { ( menus || [ ] ) . map ( ( menu , index ) => {
40- const path = menu ?. node ?. path ?? "" ;
41- const href = "[...slug]" ;
42- return (
43- < Link key = { menu ?. node ?. id ?? "" } href = { href } as = { path } >
44- < a className = "block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4" >
45- { menu ?. node ?. label ?? "" }
46- </ a >
47- </ Link >
48- ) ;
49- } ) }
50- </ div >
23+ </ a >
24+ </ Link >
25+ </ div >
26+ < div className = "block lg:hidden" >
27+ < button className = "flex items-center px-3 py-2 border rounded text-teal-200 border-teal-400 hover:text-white hover:border-white" >
28+ < svg
29+ className = "fill-current h-3 w-3"
30+ viewBox = "0 0 20 20"
31+ xmlns = "http://www.w3.org/2000/svg"
32+ >
33+ < title > Menu</ title >
34+ < path d = "M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
35+ </ svg >
36+ </ button >
37+ </ div >
38+ < div className = "w-full block flex-grow lg:flex lg:items-center lg:w-auto" >
39+ < div className = "text-sm lg:flex-grow" >
40+ { ( menus || [ ] ) . map ( ( menu , index ) => {
41+ const path = menu ?. node ?. path ?? "" ;
42+ const href = "[...slug]" ;
43+ return (
44+ < Link key = { menu ?. node ?. id ?? "" } href = { href } as = { path } >
45+ < a className = "block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4" >
46+ { menu ?. node ?. label ?? "" }
47+ </ a >
48+ </ Link >
49+ ) ;
50+ } ) }
51+ </ div >
5152
52- < div >
53- < Link href = "/blog" as = { "/blog" } >
54- < a className = "inline-block text-sm px-4 py-2 mr-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0" >
55- Blog
56- </ a >
57- </ Link >
58- { /* <Link href="[...slug]" as={"/slug"}>
53+ < div >
54+ < Link href = "/blog" as = { "/blog" } >
55+ < a className = "inline-block text-sm px-4 py-2 mr-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0" >
56+ Blog
57+ </ a >
58+ </ Link >
59+ { /* <Link href="[...slug]" as={"/slug"}>
5960 <a className="inline-block text-sm px-4 py-2 mr-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0">
6061 Slug
6162 </a>
@@ -65,8 +66,9 @@ const Navbar = ({ menus }) => {
6566 Page
6667 </a>
6768 </Link> */ }
68- </ div >
69- </ div >
69+ </ div >
70+ </ div >
71+ </ div >
7072 </ nav >
7173 ) ;
7274} ;
0 commit comments