@@ -9,6 +9,13 @@ function Header(): JSX.Element {
99
1010 const navigate : NavigateFunction = useNavigate ( ) ;
1111
12+ function handleSubmitSearch ( event ) : boolean {
13+ event . preventDefault ( ) ;
14+ const input : HTMLInputElement = event . target . elements [ 0 ] ;
15+ navigate ( `/search?q=${ encodeURIComponent ( input . value ) } ` , { } ) ;
16+ return false ;
17+ }
18+
1219 return (
1320 < header >
1421 < div style = { {
@@ -26,6 +33,7 @@ function Header(): JSX.Element {
2633 height : '40px' ,
2734 textAlign : 'center' ,
2835 verticalAlign : 'middle' ,
36+ marginRight :'10px' ,
2937 width : '40px'
3038 } } >
3139 < CustomSVG icon = "menu" viewBox = "0 0 24 24" style = { { height : '16px' , padding : '12px 0' } } />
@@ -71,6 +79,49 @@ function Header(): JSX.Element {
7179 < CustomSVG icon = "arrow-right" viewBox = "0 0 24 24"
7280 style = { { height : '18px' , padding : '11px 0' } } />
7381 </ NavLink >
82+ < div style = { { display : 'inline-block' , height : '40px' } } >
83+ < form onSubmit = { handleSubmitSearch } style = { { height :'100%' , marginRight :'10px' , position :'relative' } } >
84+ < CustomSVG icon = "search" style = { { fill :'transparent' , height :'100%' , left :'10px' , position :'absolute' , stroke :'white' , strokeWidth :'2px' , verticalAlign :'middle' , width :'16px' } } viewBox = "0 0 24 24" />
85+ < input placeholder = "Search" style = { {
86+ backgroundColor : 'rgba(45, 45, 45, 0.7)' ,
87+ border : 'none' ,
88+ borderRadius : '6px' ,
89+ color : 'rgb(253, 253, 253)' ,
90+ fontSize : '13px' ,
91+ height : '38px' ,
92+ paddingLeft : '35px' ,
93+ paddingRight : '10px' ,
94+ verticalAlign :'middle' ,
95+ width :'480px' ,
96+ } } />
97+ </ form >
98+ </ div >
99+ < NavLink className = "hoverHeaderButtonFill" to = { null } style = { {
100+ backgroundColor : 'rgba(45, 45, 45, 0.7)' ,
101+ borderRadius : '1.5rem' ,
102+ display : 'inline-block' ,
103+ height : '40px' ,
104+ marginRight : '10px' ,
105+ textAlign : 'center' ,
106+ verticalAlign : 'middle' ,
107+ width : '40px'
108+ } } >
109+ < CustomSVG icon = "publish" viewBox = "0 0 24 24"
110+ style = { { height : '18px' , padding : '11px 0' , strokeWidth :'2px' } } />
111+ </ NavLink >
112+ < NavLink className = "hoverHeaderButtonFill" to = { null } style = { {
113+ backgroundColor : 'rgba(45, 45, 45, 0.7)' ,
114+ borderRadius : '1.5rem' ,
115+ display : 'inline-block' ,
116+ height : '40px' ,
117+ marginRight : '10px' ,
118+ textAlign : 'center' ,
119+ verticalAlign : 'middle' ,
120+ width : '40px'
121+ } } >
122+ < CustomSVG icon = "settings" viewBox = "0 0 24 24"
123+ style = { { height : '18px' , padding : '11px 0' , fill :'transparent' , strokeWidth :'2px' } } />
124+ </ NavLink >
74125 </ div >
75126 < div style = { { justifyContent : 'flex-end' } } >
76127 < Link className = "hoverHeaderButton" style = { {
0 commit comments