DOC: Use CSS to style versions sidebar.

Summary:

* Label current version with an html id so it can be highlighted in CSS.
* Note: Switched out arrow indicator for a disc b/c it's easier (unicode bullets are not well-supported).
* Move script file to theme and use standard Sphinx theming to include javascript file.
This commit is contained in:
Tony S Yu
2012-02-09 00:02:57 -05:00
parent 5c9c8c1867
commit abbd7c8854
4 changed files with 12 additions and 4 deletions
-19
View File
@@ -1,19 +0,0 @@
function insert_version_links() {
var labels = ['dev', '0.4', '0.3'];
document.write('<ul class="versions">\n');
for (i = 0; i < labels.length; i++){
document.write('<li>');
if (typeof(DOCUMENTATION_OPTIONS) !== 'undefined') {
if ((DOCUMENTATION_OPTIONS['VERSION'] == labels[i]) ||
(DOCUMENTATION_OPTIONS['VERSION'].match(/dev$/) && (i == 0))) {
document.write('&#9656;&nbsp;');
}
}
document.write('<a href="URL">skimage VERSION</a> </li>\n'
.replace('VERSION', labels[i])
.replace('URL', 'http://scikits-image.org/docs/' + labels[i]));
}
document.write('</ul>\n');
}