From 746ae155fb5a17c9f31873ad6d387b58574849ba Mon Sep 17 00:00:00 2001 From: Thatcher Peskens Date: Mon, 16 Dec 2013 18:36:35 -0800 Subject: [PATCH] Added warning when browsing master. & no longer hides alternative versions. --- docs/theme/docker/layout.html | 7 +++++-- docs/theme/docker/static/css/main.css | 11 ++++++----- docs/theme/docker/static/css/main.less | 13 +++++++------ docs/theme/docker/static/js/docs.js | 22 ++++++++++++++-------- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/docs/theme/docker/layout.html b/docs/theme/docker/layout.html index ad34442230..1b62dc5c08 100755 --- a/docs/theme/docker/layout.html +++ b/docs/theme/docker/layout.html @@ -99,7 +99,7 @@ {{ toctree(collapse=False, maxdepth=3) }}
- +
@@ -140,7 +140,9 @@
- Current version: +

Note: You are currently browsing the development documentation. The current release may work differently.

+ + Available versions:
    {% for slug, url in versions %}
  • Local
  • '); - } - - // 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('
  • Local
  • '); + } + + 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"); + + + }); \ No newline at end of file