mirror of https://github.com/sbt/sbt.git
search bar and link Home to scala-sbt.org when targeting the website
This commit is contained in:
parent
6354b174e8
commit
c6b355e267
|
|
@ -22,7 +22,11 @@
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
|
{%- if home_site is sameas True %}
|
||||||
|
<li><a href="http://www.scala-sbt.org/">Home</a></li>
|
||||||
|
{%- else %}
|
||||||
<li><a href="{{ pathto('home') }}">Home</a></li>
|
<li><a href="{{ pathto('home') }}">Home</a></li>
|
||||||
|
{%- endif %}
|
||||||
<li><a href="{{ pathto('index') }}">Documentation</a></li>
|
<li><a href="{{ pathto('index') }}">Documentation</a></li>
|
||||||
<li><a href="{{ pathto('Getting-Started/Setup') }}">Download</a></li>
|
<li><a href="{{ pathto('Getting-Started/Setup') }}">Download</a></li>
|
||||||
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
|
<li><a href="http://groups.google.com/group/simple-build-tool">Mailing List</a></li>
|
||||||
|
|
@ -35,6 +39,15 @@
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="page-title">{{ title }}</div>
|
<div class="page-title">{{ title }}</div>
|
||||||
|
{%- if site_search_base %}
|
||||||
|
<div class="search-box">
|
||||||
|
<form method="get" action="http://www.google.com/search" id="search">
|
||||||
|
<input type="search" placeholder="Search {{release}} on Google" name="q" results="10" size="29" id="search-input">
|
||||||
|
<input type="hidden" name="sitesearch" value="{{site_search_base}}/">
|
||||||
|
<input type="submit" id="submit-search">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
|
||||||
|
|
@ -193,3 +193,18 @@ a.headerlink:hover {
|
||||||
div.doc-howto-summary h3 {
|
div.doc-howto-summary h3 {
|
||||||
color: rgb(13, 36, 40);
|
color: rgb(13, 36, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
float: right;
|
||||||
|
margin-bottom: -15px;
|
||||||
|
margin-top: -15px;
|
||||||
|
}
|
||||||
|
form#search {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
input#submit-search {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
input#search-input {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,21 @@ html_show_sphinx = False
|
||||||
htmlhelp_basename = 'sbtdoc'
|
htmlhelp_basename = 'sbtdoc'
|
||||||
html_use_smartypants = False
|
html_use_smartypants = False
|
||||||
|
|
||||||
|
# if true:
|
||||||
|
# the Home link is to scala-sbt.org
|
||||||
|
# if false:
|
||||||
|
# the Home link is to home.html for the current documentation version
|
||||||
|
# TODO: pass this as an argument to sphinx
|
||||||
|
home_site = True
|
||||||
|
|
||||||
|
# Passed to Google as site:<site_search_base>
|
||||||
|
# If empty, no search box is included
|
||||||
|
# TODO: pass this as an argument to sphinx, use actual version instead of release
|
||||||
|
site_search_base = 'http://www.scala-sbt.org/release/docs'
|
||||||
|
|
||||||
|
# passes variables to the template
|
||||||
|
html_context = {'home_site': home_site, 'site_search_base': site_search_base}
|
||||||
|
|
||||||
# Issues role
|
# Issues role
|
||||||
|
|
||||||
issuetracker = 'github'
|
issuetracker = 'github'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue