Use base templates
[tickle] / tickle / templates / tickle / route_detail.html
index 114504b..6b6ad52 100644 (file)
@@ -1,22 +1,26 @@
-<html>
-  <head></head>
+{% extends 'tickle/base.html' %}
 
-  <body>
-    {% include 'tickle/area_breadcrumb.html' with area=route.area %}
-    <header>
-      <h1>{{ route.name }}</h1>
-      <div>{{ route.difficulty }}</div>
-      <div>{{ route.notes }}</div>
+{% block tickle_title_name %}{{ route.name }}{% endblock %}
+{% block tickle_header_name %}{{ route.name }}{% endblock %}
 
-      {% if route.pitches.count == 1 %}
-        {% include 'tickle/pitch_list_item.html' with pitch=route.pitches.first %}
-      {% else %}
-        <ul>
-          {% for pitch in route.pitches.all %}
-            <li>{% include 'tickle/pitch_list_item.html' %}</li>
-          {% endfor %}
-        </ul>
-      {% endif %}
-    </header>
-  </body>
-</html>
+{% block tickle_nav %}
+  {% include 'tickle/area_breadcrumb.html' with area=route.area is_parent=True %}
+{% endblock %}
+
+{% block tickle_extra_header %}
+  <h2>{{ route.difficulty }}</h2>
+{% endblock %}
+
+{% block tickle_main %}
+  <div>{{ route.notes }}</div>
+
+  {% if route.pitches.count == 1 %}
+    {% include 'tickle/pitch_list_item.html' with pitch=route.pitches.first %}
+  {% else %}
+    <ul>
+      {% for pitch in route.pitches.all %}
+        <li>{% include 'tickle/pitch_list_item.html' %}</li>
+      {% endfor %}
+    </ul>
+  {% endif %}
+{% endblock %}