summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-17 03:50:23 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-23 17:41:09 +0300
commit33ae55c3cdfe78de2e5c9e53c95eb35cc6f3e068 (patch)
tree49ec67dcc737f437bcfee061757eaf14891a524c
parentdd84815d61fe8c306ac799985ae9f2683741c49a (diff)
Documentation: Generate local TOC on demand
All pages are generated with a local TOC, which is pointless on simple pages such as the front page, or other pages containing little content. Use the .. contents:: :local: directive instead to generate the local TOC on demand, and remove the automatic local TOC generation. Only the Docs page uses a local TOC. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--Documentation/docs.rst3
-rw-r--r--Documentation/theme/layout.html5
-rw-r--r--Documentation/theme/static/css/theme.css38
3 files changed, 29 insertions, 17 deletions
diff --git a/Documentation/docs.rst b/Documentation/docs.rst
index 7a3977c1..7cb60596 100644
--- a/Documentation/docs.rst
+++ b/Documentation/docs.rst
@@ -1,3 +1,6 @@
+.. contents::
+ :local:
+
*************
Documentation
*************
diff --git a/Documentation/theme/layout.html b/Documentation/theme/layout.html
index a5cc2776..139c39c7 100644
--- a/Documentation/theme/layout.html
+++ b/Documentation/theme/layout.html
@@ -100,11 +100,6 @@
</header>
<div id="content">
- <div class="local-toc">
- <div class="toc-title">Contents</div>
- {{ toc }}
- </div>
-
{# PAGE CONTENT #}
<div class="block">
{% block body %}{% endblock %}
diff --git a/Documentation/theme/static/css/theme.css b/Documentation/theme/static/css/theme.css
index 047aff07..4901bbf5 100644
--- a/Documentation/theme/static/css/theme.css
+++ b/Documentation/theme/static/css/theme.css
@@ -24,6 +24,10 @@ a.headerlink {
visibility: hidden;
}
+a.toc-backref {
+ text-decoration: none;
+}
+
h1:hover a.headerlink,
h2:hover a.headerlink,
h3:hover a.headerlink,
@@ -206,37 +210,47 @@ div#content {
div#content > div.block {
font-size: 16px;
margin-right: 0px;
- margin-left: 20px;
- max-width: 800px;
- padding: 20px 60px 0px 60px;
+ margin-left: 0px;
+ max-width: 1280px;
+ padding: 0px 60px 0px 60px;
text-align: justify;
- width: 70%;
}
div#content > div.block h1 {
color: black;
font-size: 40px;
+ margin-top: 0px;
text-align: left;
}
-div.local-toc {
+div#content > div.block > div.section {
+ max-width: 800px;
+}
+
+div.local.topic {
float: right;
background-color: #fcfcff;
border: 1px dotted #4896e0;
- margin-right: 100px;
+ margin-left: 20px;
+ margin-right: 0px;
+ max-width: 15em;
padding: 10px 20px 10px 10px;
+ text-align: left;
}
-div.toc-title {
- font-weight: bold;
-}
-
-div.local-toc ul {
+div.local.topic ul {
padding-left: 20px;
margin-bottom: 5px;
}
-div.local-toc a {
+div.local.topic > ul:before {
+ content: "Contents";
+ display: block;
+ font-weight: bold;
+ margin-bottom: 10px;
+}
+
+div.local.topic a {
font-weight: normal;
padding-left: 10px;
text-decoration: none;