Princeton-CDH/ppa-django

View on GitHub
templates/base.html

Summary

Maintainability
Test Coverage
{% load render_bundle from webpack_loader %}
{% load static wagtailuserbar fullurl %}
{% comment %}
NOTE: This site uses RDFa and schema.org vocabulary.  Every page will be declared as schema:Webpage
by default; use page_rdf_type to override with a webpage subclass.
{% endcomment %}
<!DOCTYPE html>
<html lang="en" xmlns:schema="http://schema.org/" xmlns:og="http://ogp.me/ns#" class="no-js">
<head>
    <!-- metadata -->
    {# html metadata #}
    <title>
        {% block page-title %}
        {% block page-subtitle %}{{ page.meta_title }}{% endblock %}
        Princeton Prosody Archive
        {% endblock %}
    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="apple-touch-icon" sizes="180x180" href="{% static 'apple-touch-icon.png' %}" />
    <link rel="icon" type="image/png" sizes="32x32" href="{% static 'favicon-32x32.png' %}" />
    <link rel="icon" type="image/png" sizes="16x16" href="{% static 'favicon-16x16.png' %}" />
    <link rel="manifest" href="{% static 'manifest.json' %}" />
    {% if request %} {# fullurl requires request, not available on error pages #}
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search PPA" href="{% fullurl 'archive:opensearch-description' %}">
    {% endif %}
    <link rel="mask-icon" href="{% static 'safari-pinned-tab.svg' %}" color="#E9E9E9" />
    <meta name="theme-color" content="#E9E9E9" />
    {% include 'snippets/head_meta.html' %}
    {% block metadata %}{% endblock %}

    <!-- styles -->
    <link rel="stylesheet" type="text/css" href="{% static 'semantic/dist/semantic.min.css' %}">
    {% if SHOW_TEST_WARNING %}
    <link rel="stylesheet" type="text/css" href="{% static 'css/test-banner.css' %}">
    {% endif %}
    {% render_bundle 'main' 'css' %}
    {% render_bundle 'print' 'css' attrs=' media="print" ' %}
    {% block css %}{% endblock %} {# add any additional css here #}

    <!-- scripts -->
    <script
        src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
        integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
        crossorigin="anonymous">
    </script>
    <script src="{% static 'semantic/dist/semantic.min.js' %}" defer></script>
    {% if not request.is_preview and GTAGS_ANALYTICS_ID %}
        {% include 'snippets/analytics.html' %}
    {% endif %}
    {% render_bundle 'main' 'js' %}
    {% block js %}{% endblock %} {# add any additional javascript here #}

    <!-- extra metadata -->
    {% block head_extras %}{% endblock %}
</head>
<body>
    {% include 'snippets/test_banner.html' %}
    {% block page_nav %}
        {% include 'snippets/nav.html' %}
    {% endblock %}
    <div class="pusher"> {# moves page content when mobile menu is clicked #}
        {% block page_header %}
        {% endblock %}
        <main id="{% block page-context-id %}{% endblock %}">
            {% block content %}{% endblock %}
        </main>

        {% block page_footer %}
            {% include 'snippets/footer.html' %}
        {% endblock %}

    </div>
    {% block page-js %}{% endblock %}

    {# enable wagtail quick menu for logged in content editors #}
    {% wagtailuserbar %}
</body>
</html>