summaryrefslogtreecommitdiff
path: root/docsite/_themes
diff options
context:
space:
mode:
authorNigel Metheringham <nigel.metheringham@dev.intechnology.co.uk>2013-02-24 12:20:16 +0000
committerNigel Metheringham <nigel.metheringham@dev.intechnology.co.uk>2013-02-24 12:20:16 +0000
commit86d55c1c4d1d409d0251ee761651f13b824d7bc1 (patch)
treeed4790522a2a28d32f1d1dadb9ab2a07c2df6979 /docsite/_themes
parent185790e32a50e1c9a434c79bc750f9f047cf396e (diff)
downloadansible-86d55c1c4d1d409d0251ee761651f13b824d7bc1.tar.gz
Tweak maximum length of drop down menu
Diffstat (limited to 'docsite/_themes')
-rw-r--r--docsite/_themes/bootstrap/layout.html16
1 files changed, 15 insertions, 1 deletions
diff --git a/docsite/_themes/bootstrap/layout.html b/docsite/_themes/bootstrap/layout.html
index 1d377d48b8..30f8add71c 100644
--- a/docsite/_themes/bootstrap/layout.html
+++ b/docsite/_themes/bootstrap/layout.html
@@ -1,6 +1,6 @@
{% extends "basic/layout.html" %}
{% set script_files = script_files + ['_static/bootstrap-dropdown.js', '_static/bootstrap-scrollspy.js'] %}
-{% set css_files = ['_static/bootstrap.css', '_static/bootstrap-sphinx.css'] + css_files %}
+{% set css_files = ['_static/bootstrap.css', '_static/bootstrap-sphinx.css', '_static/ansible-local.css'] + css_files %}
{# Sidebar: Rework into our Boostrap nav section. #}
{% macro navBar() %}
@@ -98,6 +98,20 @@ s.parentNode.insertBefore(ga, s);
})();
</script>
+<script type="text/javascript">
+// Set the maximum height of drop down menus to just less than the height
+// of the viewport.
+var set_max_menu_height = function () {
+
+ // set menu max height to 75 less than viewport height
+ $('.dropdown-menu').css('max-height', $(window).height() - 75);
+}
+
+// Set this when we set the page up and on each resize.
+$(window).resize(set_max_menu_height);
+$(window).ready(set_max_menu_height);
+
+</script>
{% endblock %}