Hide duplicate titles and empty tocs in generated content
At the moment we have two h1 titles, in the content generated by Sphinx and in the titlerow.html file. This change will hide the h1 title in the generated content. At the moment the title of a document is displayed in the local toc. This change will hide the title of a document in the local toc. At the moment the local toc is also displayed when it only contains the title of the document. This change will not display the local toc if it conly contains the title of the document. http://lists.openstack.org/pipermail/openstack-docs/2016-January/008180.html Change-Id: I48b923a67010c92945c46ab00de0b090ba7cd465
This commit is contained in:
@@ -39,8 +39,7 @@ ga('send', 'pageview');
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="docs-top-contents">
|
||||
<h5><a href="{{ pathto(master_doc) }}">Contents</a></h5>
|
||||
{{ toc }}
|
||||
{% include 'localtoc.html' %}
|
||||
</div>
|
||||
<div class="docs-body">
|
||||
{% block body %}{% endblock %}
|
||||
|
||||
4
openstackdocstheme/theme/openstackdocs/localtoc.html
Normal file
4
openstackdocstheme/theme/openstackdocs/localtoc.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{%- if display_toc %}
|
||||
<h5><a href="{{ pathto(master_doc) }}">Contents</a></h5>
|
||||
{{ toc }}
|
||||
{%- endif %}
|
||||
@@ -4127,7 +4127,7 @@ a.docs-edit i {
|
||||
.docs-top-contents ul {
|
||||
list-style: none;
|
||||
padding: 3px;
|
||||
margin: 0 0 0 10px; }
|
||||
margin: 0 0 5px 0; }
|
||||
|
||||
.docs-top-contents ul li a {
|
||||
text-decoration: underline; }
|
||||
@@ -4641,3 +4641,19 @@ table.highlighttable {
|
||||
padding-left: 0px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.docs-body .section h1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.docs-top-contents a[href="#"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.docs-top-contents h5 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.docs-top-contents {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user