Anonymous avatar Anonymous committed 68ae0b0

Add mainstage, see_also, links, commentary blocks to base.html.

Comments (0)

Files changed (1)

templates/base.html

   </header>
 
   <article>
+    {% block mainstage %}{% endblock %}
     {% block description %}
       {% if description and images %}
         <div class="row-fluid">
     {% block content %}
     {% endblock content %}
 
-    {% if see_also %}
-      <section id="see_also">
-        <h2>See Also</h2>
-        <ul>
-          {% for thing in see_also %}
-          <li>
-            {{ link(thing) }}
-          </li>
-          {% endfor %}
-        </ul>
-      </section>
-    {% endif %}
+    {% block see_also %}
+      {% if see_also %}
+        <section id="see_also">
+          <h2>See Also</h2>
+          <ul>
+            {% for thing in see_also %}
+            <li>
+              {{ link(thing) }}
+            </li>
+            {% endfor %}
+          </ul>
+        </section>
+      {% endif %}
+    {% endblock see_also %}
 
-    {% if links %}
-      <section id="links">
-        <h2>Links</h2>
-        <ul>
-          {% for link in links %}
-          <li>
-            <a href="{{ link }}">{{ link }}</a>
-          </li>
-          {% endfor %}
-        </ul>
-      </section>
-    {% endif %}
+    {% block links %}
+      {% if links or references %}
+        <section id="links">
+          <h2>Links</h2>
+          <ul>
+            {% for reference in references %}
+            <li>
+              <a href="{{ reference.url }}">{{ reference.title }}</a> -- {{ reference.description }}
+            </li>
+            {% endfor %}
+            {% for link in links %}
+            <li>
+              <a href="{{ link }}">{{ link }}</a>
+            </li>
+            {% endfor %}
+          </ul>
+        </section>
+      {% endif %}
+    {% endblock links %}
 
-    {% if references %}
-      <section id="references">
-        <h2>References</h2>
-        <ul>
-          {% for reference in references %}
-          <li>
-            <a href="{{ reference.url }}">{{ reference.title }}</a> -- {{ reference.description }}
-          </li>
-          {% endfor %}
-        </ul>
-      </section>
-    {% endif %}
-
-    {% if commentary %}
-      <section id="commentary">
-        <h2>Commentary</h2>
-        {{ commentary_html }}
-      </section>
-    {% endif %}
+    {% block commentary %}
+      {% if commentary %}
+        <section id="commentary">
+          <h2>Commentary</h2>
+          {{ commentary_html }}
+        </section>
+      {% endif %}
+    {% endblock commentary %}
   </article>
 
   <footer>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.