]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Reduce copied code in layout.html
authorTom Yu <tlyu@mit.edu>
Fri, 18 Jan 2013 04:29:59 +0000 (23:29 -0500)
committerTom Yu <tlyu@mit.edu>
Thu, 31 Jan 2013 20:10:21 +0000 (15:10 -0500)
layout.html unneccesarily copied code from the parent
agogo/layout.html content block just to alter the sidebar.  Override
various subblocks of the sidebar instead.

doc/_templates/layout.html

index fa0ddc816ff40714b5e2678ea2e7aef819e9a360..66396b5d29c09e46a37df8f2d27a4d0b0511430f 100644 (file)
     </div>
 {% endblock %}
 
-{%- block content %}
-    <div class="content-wrapper">
-        <div class="content">
-            {%- block sidebar2 %} {%- endblock %}
-            {%- block sidebar1 %}
-                <div class="sidebar">
-                    <h2>{{ _('On this page') }} </h2>
-                    {{ toc }}
-                    <br/>
-                    <h2>{{ _('Table of contents') }}</h2>
-                    {{ toctree(collapse=true, maxdepth=3, titles_only=true, includehidden=false) }}
-                    <br/>
-                    <h4><a href="{{ pathto('index') }}">Full Table of Contents
-                    </a></h4>
-                    <h4>{{ _('Search') }}</h4>
-                    <form class="search" action="{{ pathto('search') }}" method="get">
-                        <input type="text" name="q" size="18" />
-                        <input type="submit" value="{{ _('Go') }}" />
-                        <input type="hidden" name="check_keywords" value="yes" />
-                        <input type="hidden" name="area" value="default" />
-                    </form>
-                </div>
-            {%- endblock %}
-            <div class="document">
-                 {%- block document %}{{ super() }}{%- endblock %}
-            </div>
-            <div class="clearer" ></div>
-        </div>
-    </div>
-{% endblock %}
+{%- block sidebartoc %}
+    <h2>{{ _('On this page') }}</h2>
+    {{ toc }}
+    <br/>
+    <h2>{{ _('Table of contents') }}</h2>
+    {{ toctree(collapse=true, maxdepth=3, titles_only=true,
+               includehidden=false) }}
+    <br/>
+    <h4><a href="{{ pathto('index') }}">Full Table of Contents</a></h4>
+{%- endblock %}
+
+{%- block sidebarsearch %}
+    <h4>{{ _('Search') }}</h4>
+    <form class="search" action="{{ pathto('search') }}" method="get">
+      <input type="text" name="q" size="18" />
+      <input type="submit" value="{{ _('Go') }}" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+{%- endblock %}