{% load molly_utils %}{% load compressed %}{% load i18n %}{% get_current_language as LANGUAGE_CODE %} {% comment %} Welcome to Molly's base.html. Virtually all pages in Molly inherit from this page. This page is divided into various blocks so that customisations are easy to override. Because of this, it's rare that you will ever need to touch this file, but you may want to refer to it to identify blocks to override. block list - indentation defines hierarchy ========================================== - whole_title (the entire title) - site_title (name of the site) - title (title of a single page which follows site_title) - extrahead - body - header - site_small_logo - breadcrumb_0 - content - bottom_links {% endcomment %} {% comment %} The 'site_title' is typically over written by local customisations but otherwise defaults to 'molly |' It then is followed by the 'title' which includes the last breadcrumb in a trail. {% endcomment %} {% block whole_title %}{% block site_title %}molly | {% endblock site_title %}{% block title %}{{ breadcrumbs.4 }}{% endblock title %}{% endblock whole_title %} {% comment %} meta name='viewport' defines the viewport for devices which support it. Here we define that the viewport is the width of the device and that the scale is fixed. Fixed (non user-scalable) scaling is important to ensure that horizontal scrolling does not occur, which burdens the UX. However - not all phones that support these tags support them in the same way. E.g. Opera Mobile. {% endcomment %} {# The following stops certain browsers from turning strings of numbers into clickable phone numbers #} {# This is wrapped in an if to stop unit tests (which don't have style_group defined) failing #} {% if style_group %} {# Provide the minified CSS file appropriate to class of device #} {% compressed_css style_group %} {% endif %} {# If the device supports SVGs, add the following CSS file that gives SVG icons rather than .png #} {% if device|device_has_parent:"apple_iphone_ver4" or browser.svgt_1_1 %} {% compressed_css 'svg' %} {% endif %} {% comment %} meta name="apple-mobile-web-app-capable" enables 'web app mode' for Molly when saved as a home screen icon on either an Apple *or* Android. This depends on all requests from the home page onwards being made using AJAX calls. Typically this removes a URL bar in the user's window. apple-touch-icons are different sized icons for home screens on devices e.g. iPad, iPhone 4, iPhone - some of these are also supported by other devices. We have set the size to 144px to match the iPad (3) this means that all devices which use a lower resolution should just resize it down. apple-touch-startup-image is used as a splash screen for when a user clicks on the application's home screen icon. Under Apple's HCI guidelines, this should really be a greyed out screenshot of the first page of the User interface. {% endcomment %} {# Favicon link #} {% if use_slippy_maps %} {# These devices get slippy maps #} {% endif %} {# Include ALL javascript (ignore filename) #} {% include "geolocation/js.html" %} {% comment %} extrahead is used when a particular child page needs extra tags in the head e.g. meta-refresh javascript should *not* be placed here. {% endcomment %} {% block extrahead %}{% endblock extrahead %} {% block body %} {# header consists of the breadcrumb trail #} {% block header %} {# Breadcrumbs for devices that are not featurephones #} {% ifnotequal style_group "dumb" %}
    {# Breadcrumb home logo - override this in your own templates #} {% block site_small_logo %}
  1. {% trans 'Home' %}
  2. {% endblock %} {% if breadcrumbs.parent %}
  3. {{ breadcrumb.index.title }}
  4. {% if not breadcrumbs.parent_is_index %}
  5. {% endif %} {% endif %}
{# Title of the page #}

{{ breadcrumbs.page_title }}

{# Include favourites if appropriate (defined in favourite.html) - a star is placed at the top right if so #} {% include "favourite.html" %}
{# Breadcrumbs for featurephones #} {% else %}
{% block breadcrumb_0 %}{% trans "Home" %}{% endblock %} {% if breadcrumbs.parent %} / {{ breadcrumbs.index.title }} {% if not breadcrumbs.parent_is_index %} / {% endif %}{% endif %}

{{ breadcrumbs.page_title }}

{% include "favourite.html" %}
{% endifnotequal %} {% endblock header %}
{# content block for a child page's content #} {% block content %} {% endblock content %} {% comment %} The bottom_links block - displayed on pages which have not opted out: provides links to 2D barcodes, short URLs, facebook sharing, feedback etc {% endcomment %} {% if not hide_feedback_link %} {% endif %}
{% endblock body %} {% comment %} Send Google Analytics javascript to all devices, if a key is set. GA is more likely to run anywhere than our code, and there's no consequences if it fails, so we include it everywhere {% endcomment %} {% if google_analytics %} {% endif %}