From abbd7c88545870218d36af3841c8fa471099d107 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Thu, 9 Feb 2012 00:02:57 -0500 Subject: [PATCH] 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. --- doc/source/_templates/versions.html | 1 - doc/source/themes/agogo/layout.html | 2 +- doc/source/themes/agogo/static/agogo.css_t | 8 ++++++++ .../{_static => themes/agogo/static}/docversions.js | 5 +++-- 4 files changed, 12 insertions(+), 4 deletions(-) rename doc/source/{_static => themes/agogo/static}/docversions.js (85%) diff --git a/doc/source/_templates/versions.html b/doc/source/_templates/versions.html index f3ab452f..a0da9d70 100644 --- a/doc/source/_templates/versions.html +++ b/doc/source/_templates/versions.html @@ -2,7 +2,6 @@

Version

- diff --git a/doc/source/themes/agogo/layout.html b/doc/source/themes/agogo/layout.html index 3ba13ef2..260f06bf 100644 --- a/doc/source/themes/agogo/layout.html +++ b/doc/source/themes/agogo/layout.html @@ -9,7 +9,7 @@ :license: BSD, see LICENSE for details. #} {% extends "basic/layout.html" %} - +{% set script_files = script_files + ['_static/docversions.js'] %} {% block header %}
diff --git a/doc/source/themes/agogo/static/agogo.css_t b/doc/source/themes/agogo/static/agogo.css_t index b229cc96..fc6ae242 100644 --- a/doc/source/themes/agogo/static/agogo.css_t +++ b/doc/source/themes/agogo/static/agogo.css_t @@ -337,6 +337,14 @@ div.sidebarblock { margin-bottom: .8em; } +ul.versions li { + color: gray; + list-style: circle inside; +} + +ul.versions li#current { + list-style: disc inside; +} /* Footer */ diff --git a/doc/source/_static/docversions.js b/doc/source/themes/agogo/static/docversions.js similarity index 85% rename from doc/source/_static/docversions.js rename to doc/source/themes/agogo/static/docversions.js index 05578a8b..a25607ad 100644 --- a/doc/source/_static/docversions.js +++ b/doc/source/themes/agogo/static/docversions.js @@ -4,13 +4,14 @@ function insert_version_links() { document.write('