-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathgovuk_template.html.erb
115 lines (91 loc) · 5.96 KB
/
govuk_template.html.erb
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<%= yield :top_of_page %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8" lang="<%= content_for?(:html_lang) ? yield(:html_lang) : "en" %>"><![endif]-->
<!--[if gt IE 8]><!--><html lang="<%= content_for?(:html_lang) ? yield(:html_lang) : "en" %>"><!--<![endif]-->
<head>
<meta charset="utf-8" />
<title><%= content_for?(:page_title) ? yield(:page_title) : "GOV.UK - The best place to find government services and information" %></title>
<!--[if gt IE 8]><!--><%= stylesheet_link_tag "govuk-template.css", integrity: true, crossorigin: "anonymous" %><!--<![endif]-->
<!--[if IE 6]><%= stylesheet_link_tag "govuk-template-ie6.css" %><![endif]-->
<!--[if IE 7]><%= stylesheet_link_tag "govuk-template-ie7.css" %><![endif]-->
<!--[if IE 8]><%= stylesheet_link_tag "govuk-template-ie8.css" %><![endif]-->
<%= stylesheet_link_tag "govuk-template-print.css", media: "print", integrity: true, crossorigin: "anonymous" %>
<%= stylesheet_link_tag "fonts.css", media: "all", integrity: true, crossorigin: "anonymous" %>
<!--[if lt IE 9]><%= javascript_include_tag "ie.js", integrity: true, crossorigin: "anonymous" %><![endif]-->
<link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>" type="image/x-icon" />
<%# the colour used for mask-icon is the standard palette $black from
https://github.com/alphagov/govuk_frontend_toolkit/blob/master/stylesheets/colours/_palette.scss %>
<link rel="mask-icon" href="<%= asset_path 'gov.uk_logotype_crown.svg' %>" color="#0b0c0c">
<link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path "apple-touch-icon-180x180.png" %>">
<link rel="apple-touch-icon" sizes="167x167" href="<%= asset_path "apple-touch-icon-167x167.png" %>">
<link rel="apple-touch-icon" sizes="152x152" href="<%= asset_path "apple-touch-icon-152x152.png" %>">
<link rel="apple-touch-icon" href="<%= asset_path "apple-touch-icon.png" %>">
<%# the colour used for theme-color is the standard palette $black from
https://github.com/alphagov/govuk_frontend_toolkit/blob/master/stylesheets/colours/_palette.scss %>
<meta name="theme-color" content="#0b0c0c" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= yield :head %>
<%# The default og:image is added below :head so that scrapers see any custom metatags first, and this is just a fallback %>
<meta property="og:image" content="<%= asset_path "opengraph-image.png" %>">
</head>
<body<%= content_for?(:body_classes) ? raw(" class=\"#{yield(:body_classes)}\"") : '' %>>
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
<%= yield :body_start %>
<div id="skiplink-container">
<div>
<a href="#content" class="skiplink"><%= content_for?(:skip_link_message) ? yield(:skip_link_message) : "Skip to main content" %></a>
</div>
</div>
<div id="global-cookie-message">
<% if content_for?(:cookie_message) %>
<%= yield :cookie_message %>
<% else %>
<p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner clicked">Find out more about cookies</a></p>
<% end %>
</div>
<% unless @omit_header %>
<header role="banner" id="global-header" class="<%= yield(:header_class) %>">
<div class="header-wrapper">
<div class="header-global">
<div class="header-logo">
<a href="<%= content_for?(:homepage_url) ? yield(:homepage_url) : "https://www.gov.uk/" %>" title="<%= content_for?(:logo_link_title) ? yield(:logo_link_title) : "Go to the GOV.UK homepage" %>" id="logo" class="content" data-module="track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
<img src="<%= asset_path 'gov.uk_logotype_crown_invert_trans.png' %>" width="36" height="32" alt=""> <%= content_for?(:global_header_text) ? yield(:global_header_text) : "GOV.UK" %>
</a>
</div>
<%= yield :inside_header %>
</div>
<%= yield :proposition_header %>
</div>
</header>
<% end %>
<%= yield :after_header %>
<div id="global-header-bar"></div>
<%= content_for?(:content) ? yield(:content) : yield %>
<footer class="group js-footer" id="footer" role="contentinfo">
<div class="footer-wrapper">
<%= yield :footer_top %>
<div class="footer-meta">
<div class="footer-meta-inner">
<%= yield :footer_support_links %>
<div class="open-government-licence">
<p class="logo"><a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a></p>
<% if content_for?(:licence_message) %>
<%= yield :licence_message %>
<% else %>
<p>All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated</p>
<% end %>
</div>
</div>
<div class="copyright">
<a href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"><%= content_for?(:crown_copyright_message) ? yield(:crown_copyright_message) : "© Crown copyright" %></a>
</div>
</div>
</div>
</footer>
<div id="global-app-error" class="app-error hidden"></div>
<%= javascript_include_tag "govuk-template.js", integrity: true, crossorigin: "anonymous" %>
<%= yield :body_end %>
<%# if no GOVUK-namespaced module has loaded we can assume JS has failed and remove the class %>
<script>if (typeof window.GOVUK === 'undefined') document.body.className = document.body.className.replace('js-enabled', '');</script>
</body>
</html>