diff --git a/apps/templates/base.html b/apps/templates/base.html index 65cb21f3..9c7cdea3 100644 --- a/apps/templates/base.html +++ b/apps/templates/base.html @@ -1,173 +1,163 @@ {% load static i18n %} - -{% load menu_tags %} {% load sass_tags %} {% load wagtailcore_tags %} {% -wagtail_site as current_site %} + +{% load menu_tags %} +{% load sass_tags %} +{% load wagtailcore_tags %} +{% wagtail_site as current_site %} - {% block title %} {{ request.site.name }} {% endblock title %} + {% block title %} + {{ request.site.name }} + {% endblock title %} {% block extra_head %} - - + + {% endblock extra_head %} {% if collection.label %} - - - - - - - + + + + + + + {% elif volume.label %} - - - - - - - - - - - - {% for lang in volume.languages.all %} - - {% endfor %} - + + + + + + + + + + + + {% for lang in volume.languages.all %} + + {% endfor %} + - {% for page in volume.canvas_set.all %} {% if forloop.first %} - - - - {% if "/cantaloupe/iiif/2" in page.social_media %} - + {% with first_page=volume.canvas_set.first %} + {% if first_page %} + + + + {% if "/cantaloupe/iiif/2" in first_page.social_media %} + + {% else %} + + {% endif %} + + {% endif %} + {% endwith %} + {% elif page.title %} + + + + + {% else %} - + + + + + + {% endif %} - - {% endif %} {% endfor %} {% elif page.title %} - - - - - - {% else %} - - - - - - - {% endif %} - + {% block css %} - - - - {% endblock css %} {% block extra_css %} {% endblock extra_css %} + + + + {% endblock css %} + {% block extra_css %} + {% endblock extra_css %} + {# NOTE: Jump to main content required for accessibility #} Jump to main content - {# Primary container; host for Vue application #} {% block nav %} {% - endblock nav %} + {# Primary container; host for Vue application #} + {% block nav %} + {% endblock nav %}
+ {# Content container #}
- {# Django errors and alerts #} {% if messages %} {% for message in - messages %} -
- -

{{ message }}

-
- {% endfor %} {% endif %} {% block modal %} {% endblock modal %} {% block - wrapper %} {% block content %} {% endblock content %} {% endblock - wrapper %} {# IIIF viewer #} {% block viewer %} {% endblock viewer %} + {# Django errors and alerts #} + {% if messages %} + {% for message in messages %} +
+ +

{{ message }}

+
+ {% endfor %} + {% endif %} + + {% block modal %} + {% endblock modal %} + + {% block wrapper %} + {% block content %} + {% endblock content %} + {% endblock wrapper %} + {# IIIF viewer #} + {% block viewer %} + {% endblock viewer %}
- {# prevent duplicate footer on homepage bug #} {% if request.path != '/' - %} {% include "_home/_footer.html" %} {% endif %} + {# prevent duplicate footer on homepage bug #} + {% if request.path != '/' %} + {% include "_home/_footer.html" %} + {% endif %}
- + {% block javascript %} - - {% if has_ga_tracking_id %} - - - - - {% endif %} {% endblock javascript %} {% block extra_javascript %} {% - endblock extra_javascript %} {% csrf_token %} + + {% if has_ga_tracking_id %} + + + + + {% endif %} + {% endblock javascript %} + {% block extra_javascript %} + {% endblock extra_javascript %} + {% csrf_token %}