site: fixes for 1.0/0.27 doc links

This commit is contained in:
Simon Michael 2016-10-28 11:56:58 -07:00
parent 8b538e8095
commit 00aedabdc5
4 changed files with 14 additions and 12 deletions

View File

@ -17,7 +17,7 @@ m4_dnl
m4_define({{_versions_}},
<div class="versions">
This doc is for version **_version_**.
Other versions:
Available versions:
<a href="$1.html">_version_</a>
| <a href="doc/0.27/manual.html{{#}}$1">0.27</a>
</div>)m4_dnl

View File

@ -4,8 +4,9 @@
6a7,12
> <div class="versions">
> This doc is for version **0.27**.
> Other versions:
> <a href="/manual.html">0.28dev</a>
> Available versions:
> <a href="/manual.html">1.0</a>
> | <a href="doc/0.27/manual.html">0.27</a>
> </div>
>
2198a2207,2208

View File

@ -6,15 +6,16 @@ function highlightDocVersion() {
$('.versions').each( function() {
var parts = window.location.pathname.split('/');
var dir = parts.length > 1 ? parts[parts.length-2] : '';
var ver = $.isNumeric(dir) ? dir : '0.28dev';
var ver = $.isNumeric(dir) ? dir : '1.0';
$(this).find('a').each( function() {
if ($(this).html() == ver)
$(this)
.removeAttr('href')
.css('text-decoration', 'none')
.css('color', 'initial')
// .css('font-weight','bold');
.hide()
// .removeAttr('href')
// .css('text-decoration', 'none')
// .css('color', 'initial')
.css('font-weight','bold')
// .hide()
;
});
});
}

View File

@ -40,9 +40,9 @@
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="download.html">Download</a>
<li><a href="docs.html">Docs</a>
<li><a href="developer-guide.html">Contribute</a>
<li><a href="/download.html">Download</a>
<li><a href="/docs.html">Docs</a>
<li><a href="/developer-guide.html">Contribute</a>
</ul>
</div>
</div>