mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove version selector and edit on Github on search page, as it only searches the latest docs
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
This commit is contained in:
parent
9d5e3a54a0
commit
5bf3ac5738
2 changed files with 13 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
page_title: Search the Docker documentation
|
page_title: Search the Docker documentation
|
||||||
page_keywords: Docker, search documentation
|
page_keywords: Docker, search documentation
|
||||||
no_toc: true
|
no_toc: true
|
||||||
|
no_version_dropdown: true
|
||||||
|
|
||||||
# Search
|
# Search
|
||||||
|
|
||||||
|
|
15
docs/theme/mkdocs/base.html
vendored
15
docs/theme/mkdocs/base.html
vendored
|
@ -62,11 +62,12 @@
|
||||||
<div class="span12 content-body">
|
<div class="span12 content-body">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include "beta_warning.html" %}
|
{% include "beta_warning.html" %}
|
||||||
|
{% if not meta.no_version_dropdown %}
|
||||||
<div id="versionnav" class="span3 pull-right">
|
<div id="versionnav" class="span3 pull-right">
|
||||||
<ul class="nav version pull-right">
|
<ul class="nav version pull-right">
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a id="logged-in-header-username" class="dropdown-toggle" data-toggle="dropdown" href="#">
|
<a id="document-version-number" class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
Latest (Version {{ major_minor }})
|
Version {{ major_minor }}
|
||||||
</a>
|
</a>
|
||||||
<ul id="documentation-version-list" class="dropdown-menu pull-right">
|
<ul id="documentation-version-list" class="dropdown-menu pull-right">
|
||||||
{% if not meta.no_edit %}
|
{% if not meta.no_edit %}
|
||||||
|
@ -77,6 +78,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -119,10 +121,17 @@ piCId = '1482';
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#content').css("min-height", $(window).height() - 553 );
|
$('#content').css("min-height", $(window).height() - 553 );
|
||||||
|
// if the URL contains a version string, update the version picker to reflect that
|
||||||
|
version = document.location.pathname.match(/^\/(v\d\.\d)\/.*/)
|
||||||
|
if (version && version[1]) {
|
||||||
|
$('#document-version-number')[0].text = 'Version '+version[1];
|
||||||
|
} else {
|
||||||
|
$('#document-version-number')[0].text = $('#document-version-number')[0].text + " (Latest)"
|
||||||
|
}
|
||||||
// load the complete versions list
|
// load the complete versions list
|
||||||
$.get("/versions.html_fragment", function( data ) {
|
$.get("/versions.html_fragment", function( data ) {
|
||||||
$('#documentation-version-list').prepend(data);
|
$('#documentation-version-list').prepend(data);
|
||||||
//remove any "/v1.1/" bits from font.
|
//remove any "/v1.1/" bits from front, so we can add the path to the version selection dropdown.
|
||||||
path = document.location.pathname.replace(/^\/v\d\.\d/, "");
|
path = document.location.pathname.replace(/^\/v\d\.\d/, "");
|
||||||
$('#documentation-version-list a.version').each(function(i, e) {
|
$('#documentation-version-list a.version').each(function(i, e) {
|
||||||
e.href = e.href+path;
|
e.href = e.href+path;
|
||||||
|
|
Loading…
Add table
Reference in a new issue