Skip to content

Commit b6144dc

Browse files
Merge pull request #3421 from travis-ci/release_241104
Release 24 11 04
2 parents 11b56b7 + feb0df9 commit b6144dc

File tree

7 files changed

+95
-78
lines changed

7 files changed

+95
-78
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ GEM
100100
listen (~> 3.0)
101101
json (2.3.1)
102102
kramdown (1.17.0)
103-
libv8 (3.16.14.19)
103+
libv8 (3.16.14.19.1)
104104
liquid (4.0.3)
105105
listen (3.0.8)
106106
rb-fsevent (~> 0.9, >= 0.9.4)

_includes/enterprise_sidebar.html

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,4 @@
11
<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-
292
<section class="sidebar-navigation">
303
<nav>
314
<h3>Travis CI Enterprise</h3>

_includes/header.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@
55
<ul id="navigation" class="navigation">
66
<li><a href="https://travis-ci.com/blog">Blog</a></li>
77
<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>
836
<li class="toggle"><button type="button" id="toggle-menu" class="button--teal">Menu</button></li>
937
</ul>
1038
</nav>

_includes/sidebar.html

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,4 @@
11
<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-
292
<section class="sidebar-navigation">
303
<nav>
314
<h3>Getting Started</h3>

assets/javascripts/main.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ $(document).ready(function () {
22

33
$('#toggle-menu').on('click', function () {
44
$('#sidebar').toggleClass('is-open');
5-
$('.wrapper').toggleClass('is-fixed')
5+
$('.wrapper').toggleClass('is-fixed');
66
if ($('#sidebar').hasClass('is-open')) {
77
$(this).text('Close');
88
} else {
99
$(this).text('Menu');
1010
}
11-
1211
});
1312

14-
13+
$('.searchtoggle').on('click', function () {
14+
$('.searchbox').toggleClass('is-open');
15+
});
1516

1617
var sidebarToggle = function () {
1718
$('.sidebar-navigation').addClass('has-js');

assets/stylesheets/_search.sass

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,52 @@
1+
.topbar .navigation .searchbox-wrap
2+
padding: 7px
3+
text-align: right
4+
margin-right: 10px
15

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

0 commit comments

Comments
 (0)