1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge branch 'doc_html_tweaks' of git://github.com/nigelm/ansible into devel

This commit is contained in:
Michael DeHaan 2013-02-25 09:24:56 -05:00
commit bd6852eda0
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,8 @@
/* Local CSS tweaks for ansible */
.dropdown-menu {
overflow-y: auto;
}
h2 {
padding-top: 40px;
}

View file

@ -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() %}
@ -97,6 +97,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 %}

View file

@ -1,5 +1,5 @@
<li class="dropdown" data-dropdown="dropdown">
<a href="#"
class="dropdown-toggle">{{ _('Page') }}</a>
class="dropdown-toggle">{{ _('Section') }}</a>
<span class="localtoc">{{ toc }}</span>
</li>