[DOCS] add search box (#20251)

This adds a search box (powered by DuckDuckGo site search) to the
navbar.
pull/20303/head
Felix Lange 5 years ago committed by GitHub
parent 9a755be67b
commit 76bc99158d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      _layouts/default.html
  2. 4
      static/styles/custom/common.css

@ -31,10 +31,20 @@ common-js:
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% for link in site.data.navbar %}
{% capture target %}{% include link.html url=link.last %}{% endcapture %}
{% capture target %}{% include link.html url=link.last %}{% endcapture %}
<li><a href="{{target |strip }}">{{ link.first }}</a></li>
{% endfor %}
{% endfor %}
</ul>
<form class="navbar-form pull-right" role="search" method="get" action="https://duckduckgo.com/">
<input type="hidden" name="sites" value="geth.ethereum.org">
<input type="hidden" name="kz" value="-1">
<div class="input-group navbar-input-group-fixup">
<input class="input-sm" type="text" name="q" placeholder="Search site...">
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search" aria-hidden="true"></i></button>
</span>
</div>
</form>
</div>
</div>
</nav>

@ -50,3 +50,7 @@ table thead tr th, table tbody tr td {
border-bottom: 1px solid #ddd;
padding: 4px;
}
.navbar-input-group-fixup {
margin-top: 5px;
}

Loading…
Cancel
Save