1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Added warning when browsing master. & no longer hides alternative versions.

This commit is contained in:
Thatcher Peskens 2013-12-16 18:36:35 -08:00
parent 945a1f06f9
commit 746ae155fb
4 changed files with 32 additions and 21 deletions

View file

@ -99,7 +99,7 @@
{{ toctree(collapse=False, maxdepth=3) }}
<form>
<input type="text" id="st-search-input" class="st-search-input span3" style="width:160px;" />
<input type="text" id="st-search-input" class="st-search-input span3" placeholder="search in documentation" style="width:210px;" />
<div id="st-results-container"></div>
</form>
</div>
@ -140,7 +140,9 @@
<div class="tbox version-flyer ">
<div class="content">
<small>Current version:</small>
<p><span class="version-note">Note: You are currently browsing the development documentation. The current release may work differently.</span></p>
<small>Available versions:</small>
<ul class="inline">
{% for slug, url in versions %}
<li class="alternative"><a href="{{ url }}{%- for word in pagename.split('/') -%}
@ -163,6 +165,7 @@
</div>
<!-- end of footer -->
</div>
</div>

View file

@ -349,6 +349,7 @@ div.alert.alert-block {
border: 1px solid #88BABC;
padding: 5px;
font-size: larger;
max-width: 300px;
}
.version-flyer .content {
padding-right: 45px;
@ -358,18 +359,18 @@ div.alert.alert-block {
background-position: right center;
background-repeat: no-repeat;
}
.version-flyer .alternative {
visibility: hidden;
display: none;
}
.version-flyer .active-slug {
visibility: visible;
display: inline-block;
font-weight: bolder;
}
.version-flyer:hover .alternative {
animation-duration: 1s;
display: inline-block;
visibility: visible;
}
.version-flyer .version-note {
font-size: 16px;
color: red;
}
/* =====================================
Styles for

View file

@ -535,31 +535,34 @@ div.alert.alert-block {
border: 1px solid #88BABC;
padding: 5px;
font-size: larger;
max-width: 300px;
.content {
padding-right: 45px;
margin-top: 7px;
margin-left: 7px;
// display: inline-block;
background-image: url('../img/container3.png');
background-position: right center;
background-repeat: no-repeat;
}
.alternative {
visibility: hidden;
display: none;
}
.active-slug {
visibility: visible;
display: inline-block;
font-weight: bolder;
}
&:hover .alternative {
animation-duration: 1s;
display: inline-block;
visibility: visible;
}
.version-note {
font-size: 16px;
color: red;
}
}
@ -640,5 +643,3 @@ dt:hover > a.headerlink {
.deprecated {
color: orangered;
}

View file

@ -53,14 +53,6 @@ $(function(){
}
}
if (doc_version == "") {
$('.version-flyer ul').html('<li class="alternative active-slug"><a href="" title="Switch to local">Local</a></li>');
}
// mark the active documentation in the version widget
$(".version-flyer a:contains('" + doc_version + "')").parent().addClass('active-slug');
// attached handler on click
// Do not attach to first element or last (intro, faq) so that
// first and last link directly instead of accordian
@ -95,4 +87,18 @@ $(function(){
// add class to all those which have children
$('.sidebar > ul > li').not(':last').not(':first').addClass('has-children');
if (doc_version == "") {
$('.version-flyer ul').html('<li class="alternative active-slug"><a href="" title="Switch to local">Local</a></li>');
}
if (doc_version == "master") {
$('.version-flyer .version-note').hide();
}
// mark the active documentation in the version widget
$(".version-flyer a:contains('" + doc_version + "')").parent().addClass('active-slug').setAttribute("title", "Current version");
});