File tree Expand file tree Collapse file tree 7 files changed +95
-78
lines changed Expand file tree Collapse file tree 7 files changed +95
-78
lines changed Original file line number Diff line number Diff line change 100
100
listen (~> 3.0 )
101
101
json (2.3.1 )
102
102
kramdown (1.17.0 )
103
- libv8 (3.16.14.19 )
103
+ libv8 (3.16.14.19.1 )
104
104
liquid (4.0.3 )
105
105
listen (3.0.8 )
106
106
rb-fsevent (~> 0.9 , >= 0.9.4 )
Original file line number Diff line number Diff line change 1
1
< div id ="sidebar " class ="sidebar ">
2
- < div >
3
- <!-- <h2>Search</h2> -->
4
- < div class ="searchbox ">
5
- < form >
6
- < input type ="text " id ="st-search-input " class ="searchbox-input " placeholder ="Search the docs " />
7
- </ form >
8
- < script type ="text/javascript ">
9
- var Swiftype = window . Swiftype || { } ;
10
- ( function ( ) {
11
- Swiftype . key = 'tXvDDzd4fNTBnLvxfEyx' ;
12
-
13
- Swiftype . searchSearchFields = {
14
- "page" : [ "title, body, tags" ]
15
- } ;
16
- Swiftype . autocompleteSearchFields = {
17
- "page" : [ "title, body, tags" ]
18
- } ;
19
- /** DO NOT EDIT BELOW THIS LINE **/
20
- var script = document . createElement ( 'script' ) ; script . type = 'text/javascript' ; script . async = true ;
21
- script . src = "//swiftype.com/embed.js" ;
22
- var entry = document . getElementsByTagName ( 'script' ) [ 0 ] ;
23
- document . getElementsByTagName ( 'script' ) [ 0 ] . parentNode . insertBefore ( script , entry ) ;
24
- } ( ) ) ;
25
- </ script >
26
- </ div >
27
- </ div >
28
-
29
2
< section class ="sidebar-navigation ">
30
3
< nav >
31
4
< h3 > Travis CI Enterprise</ h3 >
Original file line number Diff line number Diff line change 5
5
< ul id ="navigation " class ="navigation ">
6
6
< li > < a href ="https://travis-ci.com/blog "> Blog</ a > </ li >
7
7
< li > < a href ="/ "> Docs</ a > </ li >
8
+ < li class ="searchbox-wrap ">
9
+ < div class ="searchtoggle ">
10
+ < img class ="searchtoggleicon " src ="/images/ui/search.svg " alt ="Search icon " />
11
+ </ div >
12
+ < div class ="searchbox ">
13
+ < form >
14
+ < input type ="text " id ="st-search-input " class ="searchbox-input " placeholder ="Search the docs " />
15
+ </ form >
16
+ < script type ="text/javascript ">
17
+ var Swiftype = window . Swiftype || { } ;
18
+ ( function ( ) {
19
+ Swiftype . key = 'tXvDDzd4fNTBnLvxfEyx' ;
20
+
21
+ Swiftype . searchSearchFields = {
22
+ "page" : [ "title, body, tags" ]
23
+ } ;
24
+ Swiftype . autocompleteSearchFields = {
25
+ "page" : [ "title, body, tags" ]
26
+ } ;
27
+ /** DO NOT EDIT BELOW THIS LINE **/
28
+ var script = document . createElement ( 'script' ) ; script . type = 'text/javascript' ; script . async = true ;
29
+ script . src = "//swiftype.com/embed.js" ;
30
+ var entry = document . getElementsByTagName ( 'script' ) [ 0 ] ;
31
+ document . getElementsByTagName ( 'script' ) [ 0 ] . parentNode . insertBefore ( script , entry ) ;
32
+ } ( ) ) ;
33
+ </ script >
34
+ </ div >
35
+ </ li >
8
36
< li class ="toggle "> < button type ="button " id ="toggle-menu " class ="button--teal "> Menu</ button > </ li >
9
37
</ ul >
10
38
</ nav >
Original file line number Diff line number Diff line change 1
1
< div id ="sidebar " class ="sidebar ">
2
- < div >
3
- <!-- <h2>Search</h2> -->
4
- < div class ="searchbox ">
5
- < form >
6
- < input type ="text " id ="st-search-input " class ="searchbox-input " placeholder ="Search the docs " />
7
- </ form >
8
- < script type ="text/javascript ">
9
- var Swiftype = window . Swiftype || { } ;
10
- ( function ( ) {
11
- Swiftype . key = 'tXvDDzd4fNTBnLvxfEyx' ;
12
-
13
- Swiftype . searchSearchFields = {
14
- "page" : [ "title, body, tags" ]
15
- } ;
16
- Swiftype . autocompleteSearchFields = {
17
- "page" : [ "title, body, tags" ]
18
- } ;
19
- /** DO NOT EDIT BELOW THIS LINE **/
20
- var script = document . createElement ( 'script' ) ; script . type = 'text/javascript' ; script . async = true ;
21
- script . src = "//swiftype.com/embed.js" ;
22
- var entry = document . getElementsByTagName ( 'script' ) [ 0 ] ;
23
- document . getElementsByTagName ( 'script' ) [ 0 ] . parentNode . insertBefore ( script , entry ) ;
24
- } ( ) ) ;
25
- </ script >
26
- </ div >
27
- </ div >
28
-
29
2
< section class ="sidebar-navigation ">
30
3
< nav >
31
4
< h3 > Getting Started</ h3 >
Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ $(document).ready(function () {
2
2
3
3
$ ( '#toggle-menu' ) . on ( 'click' , function ( ) {
4
4
$ ( '#sidebar' ) . toggleClass ( 'is-open' ) ;
5
- $ ( '.wrapper' ) . toggleClass ( 'is-fixed' )
5
+ $ ( '.wrapper' ) . toggleClass ( 'is-fixed' ) ;
6
6
if ( $ ( '#sidebar' ) . hasClass ( 'is-open' ) ) {
7
7
$ ( this ) . text ( 'Close' ) ;
8
8
} else {
9
9
$ ( this ) . text ( 'Menu' ) ;
10
10
}
11
-
12
11
} ) ;
13
12
14
-
13
+ $ ( '.searchtoggle' ) . on ( 'click' , function ( ) {
14
+ $ ( '.searchbox' ) . toggleClass ( 'is-open' ) ;
15
+ } ) ;
15
16
16
17
var sidebarToggle = function ( ) {
17
18
$ ( '.sidebar-navigation' ) . addClass ( 'has-js' ) ;
Original file line number Diff line number Diff line change
1
+ .topbar .navigation .searchbox-wrap
2
+ padding : 7px
3
+ text-align : right
4
+ margin-right : 10px
1
5
2
- .searchbox
3
- margin-top : 3rem
4
-
5
- .searchbox-input
6
- display : block
7
- width : 100%
8
- padding : .4em .6em
9
- border : 2px solid $cream-dark
10
- border-radius : 4px
11
- background:
12
- image : url (../../images/ui/search.svg )
13
- repeat : no-repeat
14
- size : 1.4rem
15
- position : 98% 48%
6
+ @media #{$large-up }
7
+ padding : 7px 30px
8
+
9
+ .searchbox
10
+ background-color : #f1f1f1
11
+ position : absolute
12
+ padding : 10px 15px
13
+ top : 54px
14
+ left : 0
15
+ right : 0
16
+ transition : transform 200ms ease
17
+ will-change : transform
18
+ transform : translateX(-100% )
19
+ z-index : 10
20
+
21
+ & .is-open
22
+ transform : translateX(0 )
23
+
24
+ .enterprise &
25
+ background-color : #333333
26
+
27
+ @media #{$large-up }
28
+ position : relative
29
+ transform : none
30
+ padding : 0
31
+ top : 0
32
+
33
+ .searchbox-input
34
+ display : block
35
+ width : 100%
36
+ padding : .4em 2em
37
+ border : 2px solid $cream-dark
38
+ border-radius : 4px
39
+ color : $asphalt-grey
40
+ background:
41
+ image : url (../../images/ui/search.svg )
42
+ repeat : no-repeat
43
+ size : 1.4rem
44
+ position : 1% 48%
45
+
46
+ .searchtoggle
47
+
48
+ .searchtoggleicon
49
+ height : 25px
50
+
51
+ @media #{$large-up }
52
+ display : none
You can’t perform that action at this time.
0 commit comments