Make some fixes to the documentation template

* Sidebar made a little wider
* Implemented collapsible title in the sidebar toc
* Removed useless maxdepth, let them be max by default.

Change-Id: I8537c6f91fe33aa1b94c43328dadb7ea41630dc5
Closes-Bug: 1326601
This commit is contained in:
Dmitry Ilyin 2014-06-25 18:06:18 +04:00
parent 43c5ed735d
commit f780842f61
22 changed files with 85 additions and 25 deletions

View File

@ -0,0 +1,13 @@
{#
mirantis/globaltoc.html
~~~~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: global table of contents.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
<div class="sphinxglobaltoc">
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
{{ toctree(collapse = False) }}
</div>

View File

@ -19,8 +19,13 @@
{% set reldelim2 = reldim2 is not defined and ' &nbsp; &nbsp;' or reldelim2 %}
{# add script file to instrument collapsable sections and other features #}
{% set script_files = script_files + ['_static/jquery.cookie.js',
'_static/cloud.js', '_static/menu.js'] %}
{% set script_files = script_files + [
'_static/jquery.cookie.js',
'_static/cloud.js',
'_static/menu.js',
'_static/toc.js'
]
%}
{# add font stylesheets #}
{% set css_files = css_files + [theme_fontcssurl] %}

View File

@ -1,6 +1,6 @@
{#
basic/localtoc.html
~~~~~~~~~~~~~~~~~~~
mirantis/localtoc.html
~~~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: local table of contents.

View File

@ -106,7 +106,7 @@ div.sphinxsidebar
}
div.sphinxsidebar #searchbox input[type="text"] {
width: 145px;
width: {{ theme_sidebarwidth|replace('px','')|int - 50 }}px;
}
div.sphinxsidebar .searchtip

View File

@ -3,6 +3,24 @@ div.sphinxsidebar p.logo
margin: 1em 10px 0 -10px;
text-align: right;
}
div.sphinxsidebar img.logo
{
margin: auto;
display: block;
}
.sphinxglobaltoc li
{
padding: 2px;
font-size: 100%;
}
.sphinxglobaltoc li.current a
{
font-weight: bold;
}
li.toctree-l1, li.toctree-l2
{
margin-top: 4px;

View File

@ -0,0 +1,39 @@
jQuery(window).load(function() {
var toc_open_timer;
var toc_close_timer;
var open_time = 500;
var close_time = 1000;
$('.sphinxglobaltoc ul ul').hide();
$('.sphinxglobaltoc li').on({
'mouseover': function () {
var that = this;
toc_open_timer = setTimeout(function () {
$(that).children('ul').show();
},
open_time);
},
'mouseout' : function () {
if (typeof toc_open_timer != undefined) {
clearTimeout(toc_open_timer);
}
}
});
$('.sphinxglobaltoc').on({
'mouseout' :function() {
var that = this;
toc_close_timer = setTimeout(function() {
$('.sphinxglobaltoc ul ul').hide();
},
close_time);
},
'mouseover' : function() {
if (typeof toc_close_timer != undefined) {
clearTimeout(toc_close_timer);
}
}
});
});

View File

@ -70,7 +70,7 @@ footerbgcolor = #f5f5f5 url(fuel_tile.jpg)
footertextcolor = #D32F1A
# styling for sidebar
sidebarwidth = 200px
sidebarwidth = 275px
sidebarbgcolor = #FFFFFF
sidebartextcolor = #38424B
sidebarlinkcolor = #D32F1A

View File

@ -9,9 +9,8 @@
Documentation
=============================
.. toctree::
:maxdepth: 1
.. toctree::
planning-guide
user-guide
operations

View File

@ -7,6 +7,5 @@ Operations Guide
================
.. contents:: :local:
:depth: 3
.. include:: /contents/contents-operations.rst

View File

@ -23,7 +23,6 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: /pages/preface/preface.rst
.. include:: /contents/contents-install.rst

View File

@ -23,7 +23,6 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: /pages/preface/preface.rst
.. include:: /contents/contents-operations.rst

View File

@ -23,7 +23,6 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: /pages/preface/preface.rst
.. include:: /contents/contents-planning-guide.rst

View File

@ -23,7 +23,6 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: /pages/preface/preface.rst
.. include:: /contents/contents-refarch.rst

View File

@ -23,7 +23,6 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: /pages/preface/preface.rst
.. include:: /contents/contents-release-notes.rst

View File

@ -23,7 +23,6 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: /pages/preface/preface.rst
.. include:: /contents/contents-user.rst

View File

@ -23,6 +23,5 @@
PageBreak oneColumn
.. toctree::
:maxdepth: 3
.. include:: ../contents/contents-virtualbox.rst

View File

@ -7,6 +7,5 @@ Planning Guide
==============
.. contents:: :local:
:depth: 3
.. include:: /contents/contents-planning-guide.rst

View File

@ -7,6 +7,5 @@ Reference Architectures
=======================
.. contents:: :local:
:depth: 3
.. include:: /contents/contents-refarch.rst

View File

@ -7,6 +7,5 @@ Release Notes
=============
.. contents:: :local:
:depth: 1
.. include:: /contents/contents-release-notes.rst

View File

@ -6,6 +6,5 @@ Terminology Reference
=====================
.. contents:: :local:
:depth: 3
.. include:: /contents/contents-terminology.rst

View File

@ -8,6 +8,5 @@ User Guide
==========
.. contents:: :local:
:depth: 3
.. include:: /contents/contents-user.rst

View File

@ -7,6 +7,5 @@ Running Mirantis OpenStack on VirtualBox
========================================
.. contents:: :local:
:depth: 3
.. include:: /contents/contents-virtualbox.rst