File tree Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Expand file tree Collapse file tree 3 files changed +72
-1
lines changed Original file line number Diff line number Diff line change 1
1
$ ( document ) . ready ( function ( ) {
2
2
3
3
$ ( 'header .links__icon' ) . on ( 'click' , function ( ) {
4
- $ ( this ) . next ( ) . slideToggle ( ) ;
4
+ $ ( "header .header__searchbar" ) . hide ( ) ;
5
+ $ ( "header .header__links" ) . slideToggle ( ) ;
6
+ } ) ;
7
+
8
+ $ ( 'header .search__icon' ) . on ( 'click' , function ( ) {
9
+ $ ( "header .header__links" ) . hide ( ) ;
10
+ $ ( "header .header__searchbar" ) . slideToggle ( 400 , function ( ) {
11
+ if ( $ ( this ) . is ( ':visible' ) ) {
12
+ $ ( this ) . find ( "input[type=text]" ) . focus ( ) ;
13
+ }
14
+ } ) ;
5
15
} ) ;
6
16
7
17
if ( $ ( '.wy-menu-vertical li.current>a' ) . length ) {
Original file line number Diff line number Diff line change 1
1
< header >
2
2
< div class ="header__container ">
3
+ < div class ="search__icon ">
4
+ < i class ="fa fa-search "> </ i >
5
+ </ div >
3
6
< a href ="http://docs.mattermost.com/ " class ="header__logo ">
4
7
< img width ="176 " src ="https://about.mattermost.com/wp-content/uploads/2016/01/logo.png ">
5
8
</ a >
14
17
< li > < a href ="https://about.mattermost.com/contact/ "> Contact</ a > </ li >
15
18
< li > < a href ="https://www.mattermost.org/download/ "> Download</ a > </ li >
16
19
</ ul >
20
+ < div class ="header__searchbar ">
21
+ < form id ="rtd-search-form " class ="wy-form " action ="{{ pathto('search') }} " method ="get ">
22
+ < input type ="text " name ="q " placeholder ="Search by keyword " autofocus />
23
+ < input type ="hidden " name ="check_keywords " value ="yes " />
24
+ < input type ="hidden " name ="area " value ="default " />
25
+ </ form >
26
+ </ div >
17
27
</ div >
18
28
</ header >
Original file line number Diff line number Diff line change @@ -201,6 +201,15 @@ header .links__icon {
201
201
position : relative;
202
202
}
203
203
204
+ header .search__icon {
205
+ cursor : pointer;
206
+ display : none;
207
+ float : left;
208
+ font-size : 20px ;
209
+ padding : 0 20px ;
210
+ position : relative;
211
+ }
212
+
204
213
.wy-nav-top {
205
214
background : # F5F5F5 ;
206
215
padding : 0 10px ;
@@ -270,13 +279,23 @@ header .header__links li a {
270
279
border-top : 3px solid transparent;
271
280
}
272
281
282
+ header .header__searchbar {
283
+ display : none;
284
+ float : left;
285
+ padding : 0 5px 0 0 ;
286
+ }
287
+
273
288
@media (max-width : 768px ){
289
+ <<<<<<< HEAD
274
290
header .links__icon {
275
291
display : block;
276
292
}
277
293
.wy-nav-top {
278
294
display : none;
279
295
}
296
+ = = = = = = =
297
+
298
+ > > > > > > > c8fd417... Added a search box to the nav header for the mobile view .
280
299
.wy-side-nav-search {
281
300
position : relative;
282
301
}
@@ -290,9 +309,41 @@ header .header__links li a {
290
309
.wy-nav-content-wrap .shift {
291
310
top : 70px ;
292
311
}
312
+ header .header__container {
313
+ text-align : center;
314
+ }
315
+ header .links__icon {
316
+ display : block;
317
+ }
318
+ header .search__icon {
319
+ display : block;
320
+ }
321
+ header .header__logo {
322
+ position : relative;
323
+ margin-left : auto;
324
+ margin-right : auto;
325
+ float : none;
326
+ }
293
327
header .header__logo img {
294
328
width : 176px ;
295
329
}
330
+ header .header__searchbar {
331
+ border-bottom : 1px solid # ccc ;
332
+ display : none;
333
+ background : # fff ;
334
+ line-height : 40px ;
335
+ padding : 0 15px 5px ;
336
+ width : 100% ;
337
+ }
338
+ header .header__searchbar input [type = "text" ] {
339
+ width : 100% ;
340
+ border-radius : 50px ;
341
+ border : 1px solid # ddd ;
342
+ padding : 6px 12px ;
343
+ }
344
+ header .header__searchbar input : focus {
345
+ outline : none;
346
+ }
296
347
header .header__links {
297
348
border-bottom : 1px solid # ccc ;
298
349
display : none;
You can’t perform that action at this time.
0 commit comments