Skip to content

Commit 76bc991

Browse files
authored
[DOCS] add search box (ethereum#20251)
This adds a search box (powered by DuckDuckGo site search) to the navbar.
1 parent 9a755be commit 76bc991

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

_layouts/default.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,20 @@
3131
<div id="navbar" class="navbar-collapse collapse">
3232
<ul class="nav navbar-nav">
3333
{% for link in site.data.navbar %}
34-
{% capture target %}{% include link.html url=link.last %}{% endcapture %}
34+
{% capture target %}{% include link.html url=link.last %}{% endcapture %}
3535
<li><a href="{{target |strip }}">{{ link.first }}</a></li>
36-
{% endfor %}
36+
{% endfor %}
3737
</ul>
38+
<form class="navbar-form pull-right" role="search" method="get" action="https://duckduckgo.com/">
39+
<input type="hidden" name="sites" value="geth.ethereum.org">
40+
<input type="hidden" name="kz" value="-1">
41+
<div class="input-group navbar-input-group-fixup">
42+
<input class="input-sm" type="text" name="q" placeholder="Search site...">
43+
<span class="input-group-btn">
44+
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search" aria-hidden="true"></i></button>
45+
</span>
46+
</div>
47+
</form>
3848
</div>
3949
</div>
4050
</nav>

static/styles/custom/common.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ table thead tr th, table tbody tr td {
5050
border-bottom: 1px solid #ddd;
5151
padding: 4px;
5252
}
53+
54+
.navbar-input-group-fixup {
55+
margin-top: 5px;
56+
}

0 commit comments

Comments
 (0)