-{% if area.parent %}
- {% include 'tickle/area_breadcrumb.html' with area=area.parent %} >
+{% if area %}
+ {% include 'tickle/area_breadcrumb.html' with area=area.parent is_parent=True %}
+ >
+ {% if is_parent %}
+ <a href='{% url "tickle:area-detail" pk=area.pk %}'>{{ area.name }}</a>
+ {% else %}
+ {{ area.name }}
+ {% endif %}
{% else %}
- <a href='{% url "tickle:area-list" %}'>All</a> >
+ <a href='{% url "tickle:area-list" %}'>All</a>
{% endif %}
-
-<a href='{% url "tickle:area-detail" pk=area.pk %}'>{{ area.name }}</a>
-<html>
- <head></head>
- <body>
- {% if area.parent %}
- {% include 'tickle/area_breadcrumb.html' with area=area.parent %}
- {% endif %}
+{% extends 'tickle/base.html' %}
- <h1>{{ area.name }}</h1>
+{% block tickle_title_name %}{{ area.name }}{% endblock %}
+{% block tickle_header_name %}{{ area.name }}{% endblock %}
- {% if area.children.count > 0 %}
- <ul>
- {% for child in area.children.all %}
- {% include 'tickle/area_list_item.html' with area=child %}
- {% endfor %}
- </ul>
- {% endif %}
+{% block tickle_nav %}
+ {% include 'tickle/area_breadcrumb.html' %}
+{% endblock %}
- <div>
- {{ area.notes }}
- </div>
+{% block tickle_main %}
+ {% if area.children.count > 0 %}
+ <ul>
+ {% for child in area.children.all %}
+ {% include 'tickle/area_list_item.html' with area=child %}
+ {% endfor %}
+ </ul>
+ {% endif %}
- {% if area.boulders.count > 0 %}
- Boulders
- <ul>
- {% for boulder in area.boulders.all %}
- <li>{% include 'tickle/boulder_list_item.html' %}</li>
- {% endfor %}
- </ul>
- {% endif %}
+ <div>
+ {{ area.notes }}
+ </div>
- {% if area.routes.count > 0 %}
- Routes
- <ul>
- {% for route in area.routes.all %}
- <li>{% include 'tickle/route_list_item.html' %}</li>
- {% endfor %}
- </ul>
- {% endif %}
- </body>
-</html>
+ {% if area.boulders.count > 0 %}
+ Boulders
+ <ul>
+ {% for boulder in area.boulders.all %}
+ <li>{% include 'tickle/boulder_list_item.html' %}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
+ {% if area.routes.count > 0 %}
+ Routes
+ <ul>
+ {% for route in area.routes.all %}
+ <li>{% include 'tickle/route_list_item.html' %}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+{% endblock %}
-<html>
- <head></head>
- <body>
- <h1>All Areas</h1>
- <ul>
- {% for area in area_list %}
- {% include 'tickle/area_list_item.html' %}
- {% endfor %}
- </ul>
- </body>
-</html>
+{% extends 'tickle/base.html' %}
+
+{% block tickle_title_name %}All Areas{% endblock %}
+{% block tickle_header_name %}All Areas{% endblock %}
+
+{% block tickle_main %}
+ <ul>
+ {% for area in area_list %}
+ {% include 'tickle/area_list_item.html' %}
+ {% endfor %}
+ </ul>
+{% endblock %}
--- /dev/null
+<!doctype html>
+
+<html lang='en'>
+ <head>
+ <meta charset='utf-8'>
+ <meta name='viewport' content='width=device-width, initial-scale=1'>
+
+ <title>{% block tickle_title_name %}{% endblock %}</title>
+ </head>
+
+ <body>
+ <nav>
+ {% block tickle_nav %}{% endblock %}
+ </nav>
+
+ <header>
+ <h1>{% block tickle_header_name %}{% endblock %}</h1>
+ {% block tickle_extra_header %}{% endblock %}
+ </header>
+
+ <main>
+ {% block tickle_main %}{% endblock %}
+ </main>
+
+ <footer>
+ </footer>
+ </body>
+</html>
-<html>
- <head></head>
-
- <body>
- {% include 'tickle/area_breadcrumb.html' with area=boulder.area %}
- <header>
- <h1>{{ boulder.name }}</h1>
- <div>{{ boulder.difficulty }}</div>
- <div>{{ boulder.notes }}</div>
- </header>
- </body>
-</html>
+{% extends 'tickle/base.html' %}
+
+{% block tickle_title_name %}{{ boulder.name }}{% endblock %}
+{% block tickle_header_name %}{{ boulder.name }}{% endblock %}
+
+{% block tickle_nav %}
+ {% include 'tickle/area_breadcrumb.html' with area=boulder.area is_parent=True %}
+{% endblock %}
+
+{% block tickle_extra_header %}
+ <h2>{{ boulder.difficulty }}</h2>
+{% endblock %}
+
+{% block tickle_main %}
+ <div>{{ boulder.notes }}</div>
+{% endblock %}
-<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 %}