eviltnan/freeturn

View on GitHub
freeturn/templates/base.html

Summary

Maintainability
Test Coverage
{% load static wagtailuserbar %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
{% load google_analytics_js %}

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>
        {% block title %}
        {% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}
        {% endblock %}
        {% block title_suffix %}
        {% with self.get_site.site_name as site_name %}
        {% if site_name %}- {{ site_name }}{% endif %}
        {% endwith %}
        {% endblock %}
    </title>

    <!-- Bootstrap core CSS -->
    {# Global stylesheets #}
    <link rel="stylesheet" type="text/css" href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}">

    <link rel="stylesheet" type="text/css" href="{% static 'css/the-big-picture.css' %}">

    <link rel="stylesheet" type="text/css" href="{% static 'css/freeturn.css' %}">

    <link rel="apple-touch-icon" sizes="57x57" href="{% static 'img/favicon/apple-icon-57x57.png' %}">
    <link rel="apple-touch-icon" sizes="60x60" href="{% static 'img/favicon/apple-icon-60x60.png' %}">
    <link rel="apple-touch-icon" sizes="72x72" href="{% static 'img/favicon/apple-icon-72x72.png' %}">
    <link rel="apple-touch-icon" sizes="76x76" href="{% static 'img/favicon/apple-icon-76x76.png' %}">
    <link rel="apple-touch-icon" sizes="114x114" href="{% static 'img/favicon/apple-icon-114x114.png' %}">
    <link rel="apple-touch-icon" sizes="120x120" href="{% static 'img/favicon/apple-icon-120x120.png' %}">
    <link rel="apple-touch-icon" sizes="144x144" href="{% static 'img/favicon/apple-icon-144x144.png' %}">
    <link rel="apple-touch-icon" sizes="152x152" href="{% static 'img/favicon/apple-icon-152x152.png' %}">
    <link rel="apple-touch-icon" sizes="180x180" href="{% static 'img/favicon/apple-icon-180x180.png' %}">
    <link rel="icon" type="image/png" sizes="192x192" href="{% static 'img/favicon/android-icon-192x192.png' %}">
    <link rel="icon" type="image/png" sizes="32x32" href="{% static 'img/favicon/favicon-32x32.png' %}">
    <link rel="icon" type="image/png" sizes="96x96" href="{% static 'img/favicon/favicon-96x96.png' %}">
    <link rel="icon" type="image/png" sizes="16x16" href="{% static 'img/favicon/favicon-16x16.png' %}">
    <link rel="manifest" href="{% static 'img/favicon/manifest.json' %}">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="{% static 'img/favicon/ms-icon-144x144.png' %}">
    <meta name="theme-color" content="#373a3c">


    {% block extra_css %}
    {# Override this in templates to add extra stylesheets #}
    {% endblock %}
    {% google_analytics_js %}
</head>

{% image page.background fill-1920x1080 as background %}
<body class="{% block body_class %}{% endblock %}" style="padding-bottom: 100px; background: url('{{background.url}}') no-repeat center center fixed;">


<!-- Page Content -->
<section class="background">
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-bottom">
        <div class="container">
            <a class="navbar-brand" href="/">{{footer}}</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"
                    aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarResponsive">
                <ul class="navbar-nav ml-auto">

                    {% for menu_item in menu_items.values %}
                    <li class="nav-item {% if menu_item == page or page.get_parent.id == menu_item.id %}active{% endif %}">
                        <a class="nav-link" href="{% pageurl menu_item %}">
                            {{ menu_item }}
                        </a>
                    </li>
                    {% endfor %}
                    {% wagtailuserbar %}
                </ul>
            </div>
        </div>
    </nav>
    <div class="container">
        <div class="row">
            {% block content %}{% endblock %}
        </div>
    </div>
</section>

<!-- Bootstrap core JavaScript -->
{# Global javascript #}
<script src="{% static 'vendor/jquery/jquery.min.js' %}"></script>
<script src="{% static 'vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>

<script type="text/javascript" src="{% static 'js/freeturn.js' %}"></script>

{% block extra_js %}
{# Override this in templates to add extra javascript #}
{% endblock %}
</body>
</html>