1
- import Image from " next/image" ;
1
+ import Image from ' next/image' ;
2
2
import Link from 'next/link' ;
3
3
import { useRouter } from 'next/router' ;
4
4
import { useState } from 'react' ;
@@ -14,93 +14,90 @@ const NavBar = () => {
14
14
{ name : 'About' , path : '/about' } ,
15
15
{ name : 'Projects' , path : '/projects' } ,
16
16
{ name : 'Open Source' , path : '/open-source' } ,
17
- { name : 'Guestbook' , path : '/guestbook' } ,
18
17
] ;
19
18
20
19
return (
21
- ( < div className = 'bg-sh-dark-500 bg-opacity-80 fixed w-full top-0 z-20 backdrop-filter backdrop-blur-sm shadow-lg mb-28' >
22
- < div className = 'max-w-[50rem] mx-auto w-full px-5 py-2.5 md:px-10 lg:px-0' >
20
+ < div className = 'fixed top-0 z-20 w-full shadow-lg bg-sh-dark-500 bg-opacity-80 backdrop-filter backdrop-blur-sm mb-28' >
21
+ < div className = 'max-w-[50rem] mx-auto w-full px-5 py-2.5 md:px-10 lg:px-0' >
23
22
< div className = 'flex items-center w-full' >
24
- < div className = 'w-3/4 justify-start items-center inline-flex ' >
23
+ < div className = 'inline-flex items-center justify-start w-3/4 ' >
25
24
< div className = 'dropdown' >
26
25
< label
27
26
onClick = { ( ) => setIsMenuOpen ( ! isMenuOpen ) }
28
27
className = 'md:hidden'
29
28
>
30
- < HiOutlineMenuAlt1 className = 'bg-sh-dark p-2 rounded-lg h-9 w-9 mr-5 cursor-pointer ' />
29
+ < HiOutlineMenuAlt1 className = 'p-2 mr-5 rounded-lg cursor-pointer bg-sh-dark h-9 w-9 ' />
31
30
</ label >
32
31
{ isMenuOpen && (
33
32
< ul className = 'border border-sh-white-500 bg-sh-dark-500 bg-opacity-[0.97] backdrop-filter shadow-lg shadow-sh-dark-500 rounded-md absolute mt-3 px-2 py-5 w-64 space-y-5' >
34
33
{ webLinks . map ( ( link , index ) => (
35
34
< li key = { index } onClick = { ( ) => setIsMenuOpen ( false ) } >
36
35
< Link
37
- href = { link . path }
38
- className = {
39
- router . pathname == link . path
40
- ? 'menu-item active'
41
- : 'menu-item'
42
- } >
43
-
44
- { link . name }
45
-
46
- </ Link >
36
+ href = { link . path }
37
+ className = {
38
+ router . pathname == link . path
39
+ ? 'menu-item active'
40
+ : 'menu-item'
41
+ }
42
+ >
43
+ { link . name }
44
+ </ Link >
47
45
</ li >
48
46
) ) }
49
47
</ ul >
50
48
) }
51
49
</ div >
52
50
< Link
53
- href = '/'
54
- className = ' rounded-full border-2 border-sh-blue flex mr-7 w-10 h-10 scale-90 hover:scale-100 transition ease-in select-none' >
55
-
56
- < Image
57
- className = 'rounded-full'
58
- src = { UserImg }
59
- alt = 'Shafin Avatar'
60
- draggable = 'false'
61
- style = { {
62
- maxWidth : " 100%" ,
63
- height : " auto" ,
64
- objectFit : " contain"
65
- } } />
66
-
67
- </ Link >
51
+ href = '/'
52
+ className = 'flex w-10 h-10 transition ease-in scale-90 border-2 rounded-full select-none border-sh-blue mr-7 hover:scale-100'
53
+ >
54
+ < Image
55
+ className = 'rounded-full'
56
+ src = { UserImg }
57
+ alt = 'Shafin Avatar'
58
+ draggable = 'false'
59
+ style = { {
60
+ maxWidth : ' 100%' ,
61
+ height : ' auto' ,
62
+ objectFit : ' contain' ,
63
+ } }
64
+ />
65
+ </ Link >
68
66
< div className = 'hidden md:flex' >
69
67
< ul className = 'inline-flex flex-row gap-3' >
70
68
{ webLinks . map ( ( link , index ) => (
71
69
< li key = { index } >
72
70
< Link
73
- href = { link . path }
74
- className = {
75
- router . pathname == link . path
76
- ? 'menu-item active'
77
- : 'menu-item'
78
- } >
79
-
80
- { link . name }
81
-
82
- </ Link >
71
+ href = { link . path }
72
+ className = {
73
+ router . pathname == link . path
74
+ ? 'menu-item active'
75
+ : 'menu-item'
76
+ }
77
+ >
78
+ { link . name }
79
+ </ Link >
83
80
</ li >
84
81
) ) }
85
82
</ ul >
86
83
</ div >
87
84
</ div >
88
85
89
- < div className = 'w-1/4 justify-end text-xl flex gap-3 ' >
86
+ < div className = 'flex justify-end w-1/4 gap-3 text-xl' >
90
87
< a
91
88
target = '_blank'
92
89
aria-label = 'github link'
93
90
rel = 'noopener noreferrer'
94
91
href = 'https://github.com/shahriarshafin'
95
- className = 'cursor-pointer p-3 rounded-xl hover:bg-sh-dark transition ease-in '
92
+ className = 'p-3 transition ease-in cursor-pointer rounded-xl hover:bg-sh-dark'
96
93
>
97
94
< FaGithub />
98
95
</ a >
99
96
</ div >
100
97
</ div >
101
98
</ div >
102
- </ div > )
103
- ) ;
99
+ </ div >
100
+ ) ;
104
101
} ;
105
102
106
103
export default NavBar ;
0 commit comments