krb5 commit: Refactor rellinks formatting in layout.html

Tom Yu tlyu at MIT.EDU
Thu Jan 31 15:40:50 EST 2013


https://github.com/krb5/krb5/commit/b7fc3fe5bf37e29acdcf164238fdb11a79983755
commit b7fc3fe5bf37e29acdcf164238fdb11a79983755
Author: Tom Yu <tlyu at mit.edu>
Date:   Fri Jan 18 15:45:52 2013 -0500

    Refactor rellinks formatting in layout.html

 doc/_templates/layout.html |   38 +++++++++++++++-----------------------
 1 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
index 66396b5..6dc41cd 100644
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -4,9 +4,17 @@
                   [('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" >
+{# Add a "feedback" button to the rellinks #}
+{%- macro feedback_rellinks() %}
+    {%- for rellink in rellinks|reverse %}
+        <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
+            {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>{{ reldelim2 }}
+    {%- endfor %}
+    <a href="mailto:krb5-bugs at mit.edu?subject=Documentation__{{ title }}">feedback</a>
+{%- endmacro %}
+
+{% block footer %}
+    <div class="footer-wrapper">
         <div class="footer" >
             <div class="right" ><i>Release: {{ release }}</i><br />
             {%- if show_copyright %}
@@ -17,22 +25,12 @@
               {%- endif %}
             {%- endif %}
             </div>
-            <div class="left" >
-                {%- for rellink in rellinks|reverse %}
-                    <a href="{{ pathto(rellink[0]) }}"
-                    title="{{ rellink[1]|striptags }}"
-                    {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
-                    {{ reldelim2 }}
-                {%- endfor %}
-                {%- block rootrellink %}
-                    <a href="mailto:krb5-bugs at mit.edu?subject=Documentation__{{ title }}">feedback</a>
-                {%- endblock %}
+            <div class="left">
+                {{ feedback_rellinks() }}
             </div>
         </div>
     </div>
-{%- endmacro %}
-
-{% block footer %} {{ feedback_rellinks() }}{% endblock %}
+{% endblock %}
 
 {% block header %}
     <div class="header-wrapper">
@@ -48,13 +46,7 @@
             <h1><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a></h1>
             {% endblock %}
             <div class="rel">
-                {%- for rellink in rellinks|reverse %}
-                    <a href="{{ pathto(rellink[0]) }}"
-                    title="{{ rellink[1]|striptags }}"
-                    {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
-                    {{ reldelim2 }}
-                {%- endfor %}
-                <a href="mailto:krb5-bugs at mit.edu?subject=Documentation__{{ title }}">feedback</a>
+                {{ feedback_rellinks() }}
             </div>
         </div>
     </div>


More information about the cvs-krb5 mailing list