]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Sphinx HTML: Collapse l4 in ToC in the sidebar
authorZhanna Tsitkov <tsitkova@mit.edu>
Fri, 1 Jun 2012 17:19:29 +0000 (13:19 -0400)
committerZhanna Tsitkov <tsitkova@mit.edu>
Fri, 1 Jun 2012 17:19:29 +0000 (13:19 -0400)
Also,
- resize the width of the document vs sidebar;
- decrease padding in the sidebar;
- mark current l2 in ToC in the sidebar.

doc/rst_source/_static/kerb.css
doc/rst_source/_templates/layout.html
doc/rst_source/conf.py

index d23df9df0dada4ff33cf75f43e9d243fe00d9a05..45f1b6ece8704018dab50c60c55d77b918e0cc57 100644 (file)
@@ -6,7 +6,7 @@
  *
  */
 div.body {
-  padding-right: 2em;
+  padding-right: .5em;
   text-align: left;
   overflow-x: hidden;
 }
@@ -14,12 +14,10 @@ div.body {
 /* Page layout */
 
 div.header, div.content, div.footer {
-  width: 70%;
   margin-left: auto;
   margin-right: auto;
 }
 
-
 div.header-wrapper {
   background: white;
   border-bottom: 3px solid #2e3436;
@@ -48,8 +46,9 @@ div.header div.right a {
 /* Content */
 
 div.document {
-  width: 70%;
+  width: 80%;
   float: left;
+  margin: 0;
   background-color: white;
   padding-top: 20px;
   padding-bottom: 20px;
@@ -73,22 +72,41 @@ div.document div.section dl {
 div.sidebar {
   float: right;
   font-size: .9em;
-  padding-top: 0px;
   width: 20%;
-  background-color: #4c0f1a;
+  margin: 0;
+  padding: 0;
+  background-color: white;
 }
 
 div.sidebar ul {
   list-style-type: none;
-  padding: 1px;
-  margin-left: 1em;
+  margin-left: .5em;
+}
+
+div.sidebar li.toctree-l1 a {
+  margin-left: .5em;
+}
+
+div.sidebar li.toctree-l2 a {
+  margin-left: .5em;
+}
+
+div.sidebar li.toctree-l3 a {
+  margin-left: .5em;
+}
+
+div.sidebar li.toctree-l2.current a {
+  border-right: 2px solid #fcaf3e  !important;
 }
 
 div.sidebar li.toctree-l3.current a {
-  border-right: 5px solid #fcaf3e;
   font-weight: bold;
 }
 
+div.sidebar li.toctree-l4 a {
+  display: none;
+}
+
 /* Other body styles */
 
 dt:target, .highlighted {
index 3d7c2ba7b253e91b675df0361741cd50f3483fb2..b2a9222d2e8e9bd00acf530bce53e32ac8fda451 100644 (file)
@@ -4,9 +4,10 @@
                   [('index', 'Full Table of Contents', 'C', 'Contents')] %}
 {% set css_files = css_files + ["_static/kerb.css"] %}
 
+{# Add a "feedback" button to the footer #}
 {% macro feedback_rellinks() %}
     <div class="footer-wrapper" >
-        <div class="footer"  >
+        <div class="footer" >
             <div class="left" >
                 {%- for rellink in rellinks|reverse %}
                     <a href="{{ pathto(rellink[0]) }}"
@@ -29,6 +30,7 @@
         <div class="header" style="padding-bottom: 0px;">
             {% if logo %}
                 <p class="logo">
+                    {# Link logo to kerberos.org #}
                     <a href="http://kerberos.org"> <img class="logo"
                     src="{{ pathto('_static/' + logo, 1) }}" alt="Logo" /></a>
                 </p>
     </div>
 {% endblock %}
 
-
 {%- block content %}
     <div class="content-wrapper" ;">
         <div class="content">
+            {%- block sidebar2 %} {%- endblock %}
             {%- block sidebar1 %}
                 <div class="sidebar"
-                    style="float: right; margin: 5px; background: #F9F9F9">
+                    style="float: right; background: #F9F9F9">
                     <h2>{{ _('On this page') }} </h2>
                     {{ toc }}
                     <br/>
index 9331cbd022d0b0b6ceb9f966b8d30efbdf3a73c0..31b4892e4b2cd4cb4b6a52d1dc079f3d6fbf70ae 100644 (file)
@@ -98,7 +98,9 @@ html_theme = 'agogo'
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-html_theme_options = { "linkcolor": "#a63019", "footerbg":  "#59121e", "bgcolor": "#59121e", "documentwidth": "910px", "pagewidth": "960px" }
+html_theme_options = { "linkcolor": "#a63019", "footerbg":  "#59121e",
+                       "bgcolor": "#59121e", "documentwidth": "900px",
+                       "pagewidth": "960px", "sidebarwidth": "40px" }
 
 # Add any paths that contain custom themes here, relative to this directory.
 #html_theme_path = []