{% load i18n compress %} {% load staticfiles %} {% if display_version %}[{% trans "Build" %} {{ version }}] {% endif %}{% block title %}{{ shop_name }} - {{ shop_tagline }}{% endblock %} {% block favicon %} {% endblock %} {% block mainstyles %} {% comment %} We use an inner block to work-around the fact that django-compressor doesn't work with template inheritance. Ie, we can't just wrap the {% block mainstyles %} with compress tags and expect it to compress CSS files added in child templates. {% endcomment %} {% block styles %} {% comment %} If you are developing Oscar's CSS, or overriding Oscar's CSS files in your project, then set USE_LESS = True in your settings file. You will also need to ensure that the 'lessc' executable is available and you have COMPRESS_PRECOMPILERS specified correctly. {% endcomment %} {% compress css %} {% if use_less %} {% else %} {% endif %} {% endcompress %} {% endblock %} {% endblock %} {# Additional CSS - specific to certain pages #} {% block extrastyles %}{% endblock %} {% block extrahead %}{% endblock %} {# Main content goes in this 'layout' block #} {% block layout %}{% endblock %} {% block tracking %} {# Default to using Google analytics #} {% if google_analytics_id %} {% include 'partials/google_analytics.html' %} {% endif %} {% endblock %} {% comment %} Scripts loaded from a CDN. These can't be wrapped by the 'compress' tag and so we use a separate block for them. {% endcomment %} {% block cdn_scripts %} {% endblock %} {# Local scripts #} {% block scripts %} {% compress js %} {% endcompress %} {% endblock %} {# Additional JS scripts #} {% block extrascripts %}{% endblock %} {# Block for body onload functions #} {# Page meta-data - this is populated by the 'metadata' template context processor #}