-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbase.html
More file actions
95 lines (73 loc) · 3.77 KB
/
base.html
File metadata and controls
95 lines (73 loc) · 3.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{% load static wagtailuserbar wagtailcore_tags wagtailimages_tags navigation_tags util_tags wagtailaccessibility_tags %}
<!doctype html>
<html
class="
{% block html_class %}template-{{ page.get_verbose_name|slugify }}{% endblock %}
{% if page.theme_class %}{{ page.theme_class }}{% endif %} mode-{{ MODE }}"
data-mode="{{ MODE }}"
lang="en-GB"
>
<head>
{% if request.in_preview_panel %}
<base target="_blank">
{% endif %}
{# TODO fallbacks if page is not defined e.g. for 404 page #}
<meta charset="utf-8" />
{% wagtail_site as current_site %}
<title>{% block title_prefix %}{% if current_site and page.pk == current_site.root_page.pk and current_site.site_name %}{{ current_site.site_name }} | {% endif %}{% endblock %}{% block title %}{% firstof page.seo_title page.title %}{% endblock %}{% block title_suffix %}{% if current_site and page.pk != current_site.root_page.pk and current_site.site_name %} | {{ current_site.site_name }}{% endif %}{% endblock %}</title>
<meta name="description" content="{% if page.search_description %}{{ page.search_description }}{% else %}{{ page.listing_summary }}{% endif %}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% comment %}
Set "noindex" if the site is not being requested on a configured
domain to prevent search engines crawling admin domains.
This ignores ports for simplicity.
{% endcomment %}
{% if SEO_NOINDEX or request.get_host != current_site.hostname or page.slug == 'incident' %}
<meta name="robots" content="noindex">
{% endif %}
{% block meta_tags %}{% endblock %}
{% include "patterns/navigation/components/breadcrumbs-jsonld.html" %}
{% block extra_jsonld %}{% endblock %}
<link rel="stylesheet" type="text/css" href="{% static 'css/main.css' %}">
{# Add syntax highlighting for gists if a gist exists within a raw html streamfield #}
{% if page.body|has_gist_block %}
<link rel="stylesheet" type="text/css" href="{% static 'css/gist.css' %}">
{% endif %}
{# Add syntax highlighting for code snippets within a code block streamfield (aka markdown block) #}
{% if page.body|has_markdown_block %}
<link rel="stylesheet" type="text/css" href="{% static 'css/codehilite.css' %}">
{% endif %}
{# Load the division page js/css in the pattern library #}
{% if pattern_library_rendered_pattern %}
<link rel="stylesheet" type="text/css" href="{% static 'css/division-page.css' %}">
{% endif %}
{% block extra_css %}{% endblock %}
</head>
<body>
{% block body_top %}{% endblock %}
{% include "patterns/atoms/sprites/sprites.html" %}
{% wagtailuserbar %}
{% block header %}{% endblock %}
{% block breadcrumbs %}{% endblock %}
<main {% if not pattern_library_rendered_pattern %}class="page"{% endif %} id="main-content">
{% block content %}
{{ pattern_library_rendered_pattern }}
{% endblock %}
</main>
{% block footer %}{% endblock %}
<script>
// global variables
window.GLOBALS = {
ALLOWED_MODES: {{ ALLOWED_MODES|safe }},
BASE_DOMAIN: "{{ BASE_DOMAIN }}",
}
</script>
<script src="{% static 'js/main.js' %}"></script>
{# Load the division page js/css in the pattern library #}
{% if pattern_library_rendered_pattern %}
<script src="{% static 'js/division-page.js' %}"></script>
{% endif %}
{% tota11y %}
{% block extra_js %}{% endblock %}
</body>
</html>