govuk_publishing_components 9.3.6 → 9.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/app/assets/stylesheets/component_guide/application.scss +10 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +66 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -0
- data/app/models/govuk_publishing_components/component_doc.rb +12 -0
- data/app/views/govuk_publishing_components/component_guide/component_doc/_preview.html.erb +7 -5
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +22 -0
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +39 -0
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +26 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +10 -0
- data/app/views/govuk_publishing_components/components/docs/highlight_boxes.yml +142 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +28 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -0
- data/app/views/layouts/govuk_publishing_components/application.html.erb +5 -0
- data/config/initializers/assets.rb +12 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb +13 -0
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +96 -0
- data/node_modules/govuk-frontend/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/all.js +1720 -0
- data/node_modules/govuk-frontend/all.scss +11 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
- data/node_modules/govuk-frontend/common.js +39 -0
- data/node_modules/govuk-frontend/components/_all.scss +26 -0
- data/node_modules/govuk-frontend/components/back-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/back-link/_back-link.scss +54 -0
- data/node_modules/govuk-frontend/components/back-link/back-link.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +335 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/_breadcrumbs.scss +119 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +14 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +13 -0
- data/node_modules/govuk-frontend/components/button/README.md +319 -0
- data/node_modules/govuk-frontend/components/button/_button.scss +185 -0
- data/node_modules/govuk-frontend/components/button/button.js +548 -0
- data/node_modules/govuk-frontend/components/button/button.njk +3 -0
- data/node_modules/govuk-frontend/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/button/template.njk +35 -0
- data/node_modules/govuk-frontend/components/checkboxes/README.md +782 -0
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +151 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +730 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +27 -0
- data/node_modules/govuk-frontend/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/checkboxes/template.njk +86 -0
- data/node_modules/govuk-frontend/components/date-input/README.md +640 -0
- data/node_modules/govuk-frontend/components/date-input/_date-input.scss +35 -0
- data/node_modules/govuk-frontend/components/date-input/date-input.njk +23 -0
- data/node_modules/govuk-frontend/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/date-input/template.njk +76 -0
- data/node_modules/govuk-frontend/components/details/README.md +237 -0
- data/node_modules/govuk-frontend/components/details/_details.scss +86 -0
- data/node_modules/govuk-frontend/components/details/details.js +836 -0
- data/node_modules/govuk-frontend/components/details/details.njk +7 -0
- data/node_modules/govuk-frontend/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/components/error-message/README.md +143 -0
- data/node_modules/govuk-frontend/components/error-message/_error-message.scss +15 -0
- data/node_modules/govuk-frontend/components/error-message/error-message.njk +7 -0
- data/node_modules/govuk-frontend/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-message/template.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/README.md +215 -0
- data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +68 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.js +520 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +17 -0
- data/node_modules/govuk-frontend/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/components/fieldset/README.md +213 -0
- data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +58 -0
- data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +13 -0
- data/node_modules/govuk-frontend/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/fieldset/template.njk +17 -0
- data/node_modules/govuk-frontend/components/file-upload/README.md +332 -0
- data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +19 -0
- data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +9 -0
- data/node_modules/govuk-frontend/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/file-upload/template.njk +42 -0
- data/node_modules/govuk-frontend/components/footer/README.md +284 -0
- data/node_modules/govuk-frontend/components/footer/_footer.scss +216 -0
- data/node_modules/govuk-frontend/components/footer/footer.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/template.njk +80 -0
- data/node_modules/govuk-frontend/components/header/README.md +524 -0
- data/node_modules/govuk-frontend/components/header/_header.scss +285 -0
- data/node_modules/govuk-frontend/components/header/header.js +717 -0
- data/node_modules/govuk-frontend/components/header/header.njk +3 -0
- data/node_modules/govuk-frontend/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/header/template.njk +82 -0
- data/node_modules/govuk-frontend/components/hint/README.md +157 -0
- data/node_modules/govuk-frontend/components/hint/_hint.scss +29 -0
- data/node_modules/govuk-frontend/components/hint/hint.njk +7 -0
- data/node_modules/govuk-frontend/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/components/input/README.md +416 -0
- data/node_modules/govuk-frontend/components/input/_input.scss +62 -0
- data/node_modules/govuk-frontend/components/input/input.njk +9 -0
- data/node_modules/govuk-frontend/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/input/template.njk +42 -0
- data/node_modules/govuk-frontend/components/inset-text/README.md +157 -0
- data/node_modules/govuk-frontend/components/inset-text/_inset-text.scss +28 -0
- data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +7 -0
- data/node_modules/govuk-frontend/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/components/label/README.md +193 -0
- data/node_modules/govuk-frontend/components/label/_label.scss +45 -0
- data/node_modules/govuk-frontend/components/label/label.njk +6 -0
- data/node_modules/govuk-frontend/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/components/panel/README.md +151 -0
- data/node_modules/govuk-frontend/components/panel/_panel.scss +42 -0
- data/node_modules/govuk-frontend/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/panel/panel.njk +7 -0
- data/node_modules/govuk-frontend/components/panel/template.njk +12 -0
- data/node_modules/govuk-frontend/components/phase-banner/README.md +152 -0
- data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +31 -0
- data/node_modules/govuk-frontend/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +7 -0
- data/node_modules/govuk-frontend/components/phase-banner/template.njk +17 -0
- data/node_modules/govuk-frontend/components/radios/README.md +686 -0
- data/node_modules/govuk-frontend/components/radios/_radios.scss +157 -0
- data/node_modules/govuk-frontend/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/radios/radios.js +730 -0
- data/node_modules/govuk-frontend/components/radios/radios.njk +27 -0
- data/node_modules/govuk-frontend/components/radios/template.njk +85 -0
- data/node_modules/govuk-frontend/components/select/README.md +387 -0
- data/node_modules/govuk-frontend/components/select/_select.scss +35 -0
- data/node_modules/govuk-frontend/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/select/select.njk +24 -0
- data/node_modules/govuk-frontend/components/select/template.njk +44 -0
- data/node_modules/govuk-frontend/components/skip-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/skip-link/_skip-link.scss +15 -0
- data/node_modules/govuk-frontend/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/components/table/README.md +585 -0
- data/node_modules/govuk-frontend/components/table/_table.scss +50 -0
- data/node_modules/govuk-frontend/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/table/table.njk +45 -0
- data/node_modules/govuk-frontend/components/table/template.njk +39 -0
- data/node_modules/govuk-frontend/components/tabs/README.md +375 -0
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +120 -0
- data/node_modules/govuk-frontend/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.js +1302 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/template.njk +29 -0
- data/node_modules/govuk-frontend/components/tag/README.md +150 -0
- data/node_modules/govuk-frontend/components/tag/_tag.scss +23 -0
- data/node_modules/govuk-frontend/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tag/tag.njk +7 -0
- data/node_modules/govuk-frontend/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/README.md +350 -0
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +31 -0
- data/node_modules/govuk-frontend/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/template.njk +41 -0
- data/node_modules/govuk-frontend/components/textarea/textarea.njk +11 -0
- data/node_modules/govuk-frontend/components/warning-text/README.md +148 -0
- data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +50 -0
- data/node_modules/govuk-frontend/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +9 -0
- data/node_modules/govuk-frontend/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/core/_global-styles.scss +19 -0
- data/node_modules/govuk-frontend/core/_links.scss +40 -0
- data/node_modules/govuk-frontend/core/_lists.scss +63 -0
- data/node_modules/govuk-frontend/core/_section-break.scss +56 -0
- data/node_modules/govuk-frontend/core/_template.scss +16 -0
- data/node_modules/govuk-frontend/core/_typography.scss +186 -0
- data/node_modules/govuk-frontend/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/helpers/_colour.scss +51 -0
- data/node_modules/govuk-frontend/helpers/_device-pixels.scss +38 -0
- data/node_modules/govuk-frontend/helpers/_focusable.scss +34 -0
- data/node_modules/govuk-frontend/helpers/_font-faces.scss +67 -0
- data/node_modules/govuk-frontend/helpers/_grid.scss +100 -0
- data/node_modules/govuk-frontend/helpers/_links.scss +149 -0
- data/node_modules/govuk-frontend/helpers/_media-queries.scss +95 -0
- data/node_modules/govuk-frontend/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/helpers/_spacing.scss +152 -0
- data/node_modules/govuk-frontend/helpers/_typography.scss +153 -0
- data/node_modules/govuk-frontend/helpers/_visually-hidden.scss +76 -0
- data/node_modules/govuk-frontend/objects/_all.scss +4 -0
- data/node_modules/govuk-frontend/objects/_form-group.scss +21 -0
- data/node_modules/govuk-frontend/objects/_grid.scss +10 -0
- data/node_modules/govuk-frontend/objects/_main-wrapper.scss +37 -0
- data/node_modules/govuk-frontend/objects/_width-container.scss +28 -0
- data/node_modules/govuk-frontend/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/overrides/_display.scss +14 -0
- data/node_modules/govuk-frontend/overrides/_spacing.scss +58 -0
- data/node_modules/govuk-frontend/overrides/_typography.scss +21 -0
- data/node_modules/govuk-frontend/overrides/_width.scss +41 -0
- data/node_modules/govuk-frontend/package.json +89 -0
- data/node_modules/govuk-frontend/settings/_all.scss +21 -0
- data/node_modules/govuk-frontend/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/settings/_colours-applied.scss +130 -0
- data/node_modules/govuk-frontend/settings/_colours-organisations.scss +136 -0
- data/node_modules/govuk-frontend/settings/_colours-palette.scss +37 -0
- data/node_modules/govuk-frontend/settings/_compatibility.scss +51 -0
- data/node_modules/govuk-frontend/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/settings/_measurements.scss +85 -0
- data/node_modules/govuk-frontend/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/settings/_typography-font-families.scss +22 -0
- data/node_modules/govuk-frontend/settings/_typography-font.scss +48 -0
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +138 -0
- data/node_modules/govuk-frontend/template.njk +56 -0
- data/node_modules/govuk-frontend/tools/_all.scss +7 -0
- data/node_modules/govuk-frontend/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/tools/_font-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/tools/_iff.scss +15 -0
- data/node_modules/govuk-frontend/tools/_image-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/vendor/_sass-mq.scss +351 -0
- data/node_modules/govuk-frontend/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +449 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Window.js +28 -0
- metadata +249 -2
@@ -0,0 +1,80 @@
|
|
1
|
+
<footer class="govuk-footer {{ params.classes if params.classes }}" role="contentinfo"
|
2
|
+
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
3
|
+
<div class="govuk-width-container {{ params.containerClasses if params.containerClasses }}">
|
4
|
+
{% if params.navigation %}
|
5
|
+
<div class="govuk-footer__navigation">
|
6
|
+
{% for item in params.navigation %}
|
7
|
+
<div class="govuk-footer__section">
|
8
|
+
<h2 class="govuk-footer__heading govuk-heading-m">{{ item.title }}</h2>
|
9
|
+
{% if item.items %}
|
10
|
+
{% set listClasses %}
|
11
|
+
{% if item.columns %}
|
12
|
+
govuk-footer__list--columns-{{ item.columns }}
|
13
|
+
{% endif %}
|
14
|
+
{% endset %}
|
15
|
+
<ul class="govuk-footer__list {{ listClasses | trim }}">
|
16
|
+
{% for item in item.items %}
|
17
|
+
{% if item.href and item.text %}
|
18
|
+
<li class="govuk-footer__list-item">
|
19
|
+
<a class="govuk-footer__link" href="{{ item.href }}">
|
20
|
+
{{ item.text }}
|
21
|
+
</a>
|
22
|
+
</li>
|
23
|
+
{% endif %}
|
24
|
+
{% endfor %}
|
25
|
+
</ul>
|
26
|
+
{% endif %}
|
27
|
+
</div>
|
28
|
+
{% endfor %}
|
29
|
+
</div>
|
30
|
+
<hr class="govuk-footer__section-break">
|
31
|
+
{% endif %}
|
32
|
+
<div class="govuk-footer__meta">
|
33
|
+
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
34
|
+
{% if params.meta and params.meta.items %}
|
35
|
+
<h2 class="govuk-visually-hidden">Support links</h2>
|
36
|
+
<ul class="govuk-footer__inline-list">
|
37
|
+
{% for item in params.meta.items %}
|
38
|
+
<li class="govuk-footer__inline-list-item">
|
39
|
+
<a class="govuk-footer__link" href="{{ item.href }}">
|
40
|
+
{{ item.text }}
|
41
|
+
</a>
|
42
|
+
</li>
|
43
|
+
{% endfor %}
|
44
|
+
</ul>
|
45
|
+
{% endif %}
|
46
|
+
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
|
47
|
+
treat it as an interactive element - without this it will be
|
48
|
+
'focusable' when using the keyboard to navigate. #}
|
49
|
+
<svg
|
50
|
+
role="presentation"
|
51
|
+
focusable="false"
|
52
|
+
class="govuk-footer__licence-logo"
|
53
|
+
xmlns="http://www.w3.org/2000/svg"
|
54
|
+
viewbox="0 0 483.2 195.7"
|
55
|
+
height="17"
|
56
|
+
width="41"
|
57
|
+
>
|
58
|
+
<path
|
59
|
+
fill="currentColor"
|
60
|
+
d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
|
61
|
+
/>
|
62
|
+
</svg>
|
63
|
+
<span class="govuk-footer__licence-description">
|
64
|
+
All content is available under the
|
65
|
+
<a
|
66
|
+
class="govuk-footer__link"
|
67
|
+
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
|
68
|
+
rel="license"
|
69
|
+
>Open Government Licence v3.0</a>, except where otherwise stated
|
70
|
+
</span>
|
71
|
+
</div>
|
72
|
+
<div class="govuk-footer__meta-item">
|
73
|
+
<a
|
74
|
+
class="govuk-footer__link govuk-footer__copyright-logo"
|
75
|
+
href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"
|
76
|
+
>© Crown copyright</a>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</footer>
|
@@ -0,0 +1,524 @@
|
|
1
|
+
# Header
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
The header component is used at the top of every GOV.UK page, to help users navigate.
|
6
|
+
|
7
|
+
## Guidance
|
8
|
+
|
9
|
+
Find out when to use the Header component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/header).
|
10
|
+
|
11
|
+
## Quick start examples
|
12
|
+
|
13
|
+
### Component default
|
14
|
+
|
15
|
+
[Preview the header component](http://govuk-frontend-review.herokuapp.com/components/header/preview)
|
16
|
+
|
17
|
+
#### Markup
|
18
|
+
|
19
|
+
<header class="govuk-header " role="banner" data-module="header">
|
20
|
+
<div class="govuk-header__container govuk-width-container">
|
21
|
+
|
22
|
+
<div class="govuk-header__logo">
|
23
|
+
<a href="/" class="govuk-header__link govuk-header__link--homepage">
|
24
|
+
<span class="govuk-header__logotype">
|
25
|
+
|
26
|
+
<svg
|
27
|
+
role="presentation"
|
28
|
+
focusable="false"
|
29
|
+
class="govuk-header__logotype-crown"
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
31
|
+
viewbox="0 0 132 97"
|
32
|
+
height="32"
|
33
|
+
width="36"
|
34
|
+
>
|
35
|
+
<path
|
36
|
+
fill="currentColor" fill-rule="evenodd"
|
37
|
+
d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8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3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"
|
38
|
+
></path>
|
39
|
+
|
40
|
+
<image src="/assets/images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image"></image>
|
41
|
+
</svg>
|
42
|
+
<span class="govuk-header__logotype-text">
|
43
|
+
GOV.UK
|
44
|
+
</span>
|
45
|
+
</span>
|
46
|
+
|
47
|
+
</a>
|
48
|
+
</div><div class="govuk-header__content">
|
49
|
+
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</header>
|
53
|
+
|
54
|
+
#### Macro
|
55
|
+
|
56
|
+
{% from 'header/macro.njk' import govukHeader %}
|
57
|
+
|
58
|
+
{{ govukHeader({}) }}
|
59
|
+
|
60
|
+
### Header--with-service-name
|
61
|
+
|
62
|
+
[Preview the header--with-service-name example](http://govuk-frontend-review.herokuapp.com/components/header/with-service-name/preview)
|
63
|
+
|
64
|
+
#### Markup
|
65
|
+
|
66
|
+
<header class="govuk-header " role="banner" data-module="header">
|
67
|
+
<div class="govuk-header__container govuk-width-container">
|
68
|
+
|
69
|
+
<div class="govuk-header__logo">
|
70
|
+
<a href="/" class="govuk-header__link govuk-header__link--homepage">
|
71
|
+
<span class="govuk-header__logotype">
|
72
|
+
|
73
|
+
<svg
|
74
|
+
role="presentation"
|
75
|
+
focusable="false"
|
76
|
+
class="govuk-header__logotype-crown"
|
77
|
+
xmlns="http://www.w3.org/2000/svg"
|
78
|
+
viewbox="0 0 132 97"
|
79
|
+
height="32"
|
80
|
+
width="36"
|
81
|
+
>
|
82
|
+
<path
|
83
|
+
fill="currentColor" fill-rule="evenodd"
|
84
|
+
d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1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1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"
|
85
|
+
></path>
|
86
|
+
|
87
|
+
<image src="/assets/images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image"></image>
|
88
|
+
</svg>
|
89
|
+
<span class="govuk-header__logotype-text">
|
90
|
+
GOV.UK
|
91
|
+
</span>
|
92
|
+
</span>
|
93
|
+
|
94
|
+
</a>
|
95
|
+
</div><div class="govuk-header__content">
|
96
|
+
|
97
|
+
<a href="/components/header" class="govuk-header__link govuk-header__link--service-name">
|
98
|
+
Service Name
|
99
|
+
</a>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</header>
|
104
|
+
|
105
|
+
#### Macro
|
106
|
+
|
107
|
+
{% from 'header/macro.njk' import govukHeader %}
|
108
|
+
|
109
|
+
{{ govukHeader({
|
110
|
+
"serviceName": "Service Name",
|
111
|
+
"serviceUrl": "/components/header"
|
112
|
+
}) }}
|
113
|
+
|
114
|
+
### Header--with-navigation
|
115
|
+
|
116
|
+
[Preview the header--with-navigation example](http://govuk-frontend-review.herokuapp.com/components/header/with-navigation/preview)
|
117
|
+
|
118
|
+
#### Markup
|
119
|
+
|
120
|
+
<header class="govuk-header " role="banner" data-module="header">
|
121
|
+
<div class="govuk-header__container govuk-width-container">
|
122
|
+
|
123
|
+
<div class="govuk-header__logo">
|
124
|
+
<a href="/" class="govuk-header__link govuk-header__link--homepage">
|
125
|
+
<span class="govuk-header__logotype">
|
126
|
+
|
127
|
+
<svg
|
128
|
+
role="presentation"
|
129
|
+
focusable="false"
|
130
|
+
class="govuk-header__logotype-crown"
|
131
|
+
xmlns="http://www.w3.org/2000/svg"
|
132
|
+
viewbox="0 0 132 97"
|
133
|
+
height="32"
|
134
|
+
width="36"
|
135
|
+
>
|
136
|
+
<path
|
137
|
+
fill="currentColor" fill-rule="evenodd"
|
138
|
+
d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7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.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"
|
139
|
+
></path>
|
140
|
+
|
141
|
+
<image src="/assets/images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image"></image>
|
142
|
+
</svg>
|
143
|
+
<span class="govuk-header__logotype-text">
|
144
|
+
GOV.UK
|
145
|
+
</span>
|
146
|
+
</span>
|
147
|
+
|
148
|
+
</a>
|
149
|
+
</div><div class="govuk-header__content">
|
150
|
+
|
151
|
+
<button role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
|
152
|
+
<nav>
|
153
|
+
<ul id="navigation" class="govuk-header__navigation " aria-label="Top Level Navigation">
|
154
|
+
|
155
|
+
<li class="govuk-header__navigation-item govuk-header__navigation-item--active">
|
156
|
+
<a class="govuk-header__link" href="#1">
|
157
|
+
Navigation item 1
|
158
|
+
</a>
|
159
|
+
</li>
|
160
|
+
|
161
|
+
<li class="govuk-header__navigation-item">
|
162
|
+
<a class="govuk-header__link" href="#2">
|
163
|
+
Navigation item 2
|
164
|
+
</a>
|
165
|
+
</li>
|
166
|
+
|
167
|
+
<li class="govuk-header__navigation-item">
|
168
|
+
<a class="govuk-header__link" href="#3">
|
169
|
+
Navigation item 3
|
170
|
+
</a>
|
171
|
+
</li>
|
172
|
+
|
173
|
+
<li class="govuk-header__navigation-item">
|
174
|
+
<a class="govuk-header__link" href="#4">
|
175
|
+
Navigation item 4
|
176
|
+
</a>
|
177
|
+
</li>
|
178
|
+
|
179
|
+
</ul>
|
180
|
+
</nav>
|
181
|
+
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
</header>
|
185
|
+
|
186
|
+
#### Macro
|
187
|
+
|
188
|
+
{% from 'header/macro.njk' import govukHeader %}
|
189
|
+
|
190
|
+
{{ govukHeader({
|
191
|
+
"navigation": [
|
192
|
+
{
|
193
|
+
"href": "#1",
|
194
|
+
"text": "Navigation item 1",
|
195
|
+
"active": true
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"href": "#2",
|
199
|
+
"text": "Navigation item 2"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"href": "#3",
|
203
|
+
"text": "Navigation item 3"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"href": "#4",
|
207
|
+
"text": "Navigation item 4"
|
208
|
+
}
|
209
|
+
]
|
210
|
+
}) }}
|
211
|
+
|
212
|
+
### Header--with-service-name-and-navigation
|
213
|
+
|
214
|
+
[Preview the header--with-service-name-and-navigation example](http://govuk-frontend-review.herokuapp.com/components/header/with-service-name-and-navigation/preview)
|
215
|
+
|
216
|
+
#### Markup
|
217
|
+
|
218
|
+
<header class="govuk-header " role="banner" data-module="header">
|
219
|
+
<div class="govuk-header__container govuk-width-container">
|
220
|
+
|
221
|
+
<div class="govuk-header__logo">
|
222
|
+
<a href="/" class="govuk-header__link govuk-header__link--homepage">
|
223
|
+
<span class="govuk-header__logotype">
|
224
|
+
|
225
|
+
<svg
|
226
|
+
role="presentation"
|
227
|
+
focusable="false"
|
228
|
+
class="govuk-header__logotype-crown"
|
229
|
+
xmlns="http://www.w3.org/2000/svg"
|
230
|
+
viewbox="0 0 132 97"
|
231
|
+
height="32"
|
232
|
+
width="36"
|
233
|
+
>
|
234
|
+
<path
|
235
|
+
fill="currentColor" fill-rule="evenodd"
|
236
|
+
d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9.9l-8.8-2.8v13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
></path>
|
238
|
+
|
239
|
+
<image src="/assets/images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image"></image>
|
240
|
+
</svg>
|
241
|
+
<span class="govuk-header__logotype-text">
|
242
|
+
GOV.UK
|
243
|
+
</span>
|
244
|
+
</span>
|
245
|
+
|
246
|
+
</a>
|
247
|
+
</div><div class="govuk-header__content">
|
248
|
+
|
249
|
+
<a href="/components/header" class="govuk-header__link govuk-header__link--service-name">
|
250
|
+
Service Name
|
251
|
+
</a>
|
252
|
+
|
253
|
+
<button role="button" class="govuk-header__menu-button js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
|
254
|
+
<nav>
|
255
|
+
<ul id="navigation" class="govuk-header__navigation " aria-label="Top Level Navigation">
|
256
|
+
|
257
|
+
<li class="govuk-header__navigation-item govuk-header__navigation-item--active">
|
258
|
+
<a class="govuk-header__link" href="#1">
|
259
|
+
Navigation item 1
|
260
|
+
</a>
|
261
|
+
</li>
|
262
|
+
|
263
|
+
<li class="govuk-header__navigation-item">
|
264
|
+
<a class="govuk-header__link" href="#2">
|
265
|
+
Navigation item 2
|
266
|
+
</a>
|
267
|
+
</li>
|
268
|
+
|
269
|
+
<li class="govuk-header__navigation-item">
|
270
|
+
<a class="govuk-header__link" href="#3">
|
271
|
+
Navigation item 3
|
272
|
+
</a>
|
273
|
+
</li>
|
274
|
+
|
275
|
+
<li class="govuk-header__navigation-item">
|
276
|
+
<a class="govuk-header__link" href="#4">
|
277
|
+
Navigation item 4
|
278
|
+
</a>
|
279
|
+
</li>
|
280
|
+
|
281
|
+
</ul>
|
282
|
+
</nav>
|
283
|
+
|
284
|
+
</div>
|
285
|
+
</div>
|
286
|
+
</header>
|
287
|
+
|
288
|
+
#### Macro
|
289
|
+
|
290
|
+
{% from 'header/macro.njk' import govukHeader %}
|
291
|
+
|
292
|
+
{{ govukHeader({
|
293
|
+
"serviceName": "Service Name",
|
294
|
+
"serviceUrl": "/components/header",
|
295
|
+
"navigation": [
|
296
|
+
{
|
297
|
+
"href": "#1",
|
298
|
+
"text": "Navigation item 1",
|
299
|
+
"active": true
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"href": "#2",
|
303
|
+
"text": "Navigation item 2"
|
304
|
+
},
|
305
|
+
{
|
306
|
+
"href": "#3",
|
307
|
+
"text": "Navigation item 3"
|
308
|
+
},
|
309
|
+
{
|
310
|
+
"href": "#4",
|
311
|
+
"text": "Navigation item 4"
|
312
|
+
}
|
313
|
+
]
|
314
|
+
}) }}
|
315
|
+
|
316
|
+
## Requirements
|
317
|
+
|
318
|
+
### Build tool configuration
|
319
|
+
|
320
|
+
When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp
|
321
|
+
|
322
|
+
.pipe(sass({
|
323
|
+
includePaths: 'node_modules/'
|
324
|
+
}))
|
325
|
+
|
326
|
+
### Static asset path configuration
|
327
|
+
|
328
|
+
In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js:
|
329
|
+
|
330
|
+
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
331
|
+
|
332
|
+
## Component arguments
|
333
|
+
|
334
|
+
If you are using Nunjucks,then macros take the following arguments
|
335
|
+
|
336
|
+
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
337
|
+
|
338
|
+
<table class="govuk-table">
|
339
|
+
|
340
|
+
<thead class="govuk-table__head">
|
341
|
+
|
342
|
+
<tr class="govuk-table__row">
|
343
|
+
|
344
|
+
<th class="govuk-table__header" scope="col">Name</th>
|
345
|
+
|
346
|
+
<th class="govuk-table__header" scope="col">Type</th>
|
347
|
+
|
348
|
+
<th class="govuk-table__header" scope="col">Required</th>
|
349
|
+
|
350
|
+
<th class="govuk-table__header" scope="col">Description</th>
|
351
|
+
|
352
|
+
</tr>
|
353
|
+
|
354
|
+
</thead>
|
355
|
+
|
356
|
+
<tbody class="govuk-table__body">
|
357
|
+
|
358
|
+
<tr class="govuk-table__row">
|
359
|
+
|
360
|
+
<th class="govuk-table__header" scope="row">homepageUrl</th>
|
361
|
+
|
362
|
+
<td class="govuk-table__cell ">string</td>
|
363
|
+
|
364
|
+
<td class="govuk-table__cell ">No</td>
|
365
|
+
|
366
|
+
<td class="govuk-table__cell ">The url of the homepage. Defaults to /</td>
|
367
|
+
|
368
|
+
</tr>
|
369
|
+
|
370
|
+
<tr class="govuk-table__row">
|
371
|
+
|
372
|
+
<th class="govuk-table__header" scope="row">assetsPath</th>
|
373
|
+
|
374
|
+
<td class="govuk-table__cell ">string</td>
|
375
|
+
|
376
|
+
<td class="govuk-table__cell ">No</td>
|
377
|
+
|
378
|
+
<td class="govuk-table__cell ">The public path for the assets folder. If not provided it defaults to /assets/images</td>
|
379
|
+
|
380
|
+
</tr>
|
381
|
+
|
382
|
+
<tr class="govuk-table__row">
|
383
|
+
|
384
|
+
<th class="govuk-table__header" scope="row">productName</th>
|
385
|
+
|
386
|
+
<td class="govuk-table__cell ">string</td>
|
387
|
+
|
388
|
+
<td class="govuk-table__cell ">No</td>
|
389
|
+
|
390
|
+
<td class="govuk-table__cell ">Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify)</td>
|
391
|
+
|
392
|
+
</tr>
|
393
|
+
|
394
|
+
<tr class="govuk-table__row">
|
395
|
+
|
396
|
+
<th class="govuk-table__header" scope="row">serviceName</th>
|
397
|
+
|
398
|
+
<td class="govuk-table__cell ">string</td>
|
399
|
+
|
400
|
+
<td class="govuk-table__cell ">No</td>
|
401
|
+
|
402
|
+
<td class="govuk-table__cell ">Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify)</td>
|
403
|
+
|
404
|
+
</tr>
|
405
|
+
|
406
|
+
<tr class="govuk-table__row">
|
407
|
+
|
408
|
+
<th class="govuk-table__header" scope="row">serviceUrl</th>
|
409
|
+
|
410
|
+
<td class="govuk-table__cell ">string</td>
|
411
|
+
|
412
|
+
<td class="govuk-table__cell ">No</td>
|
413
|
+
|
414
|
+
<td class="govuk-table__cell ">Url for the service name anchor.</td>
|
415
|
+
|
416
|
+
</tr>
|
417
|
+
|
418
|
+
<tr class="govuk-table__row">
|
419
|
+
|
420
|
+
<th class="govuk-table__header" scope="row">navigation</th>
|
421
|
+
|
422
|
+
<td class="govuk-table__cell ">array</td>
|
423
|
+
|
424
|
+
<td class="govuk-table__cell ">No</td>
|
425
|
+
|
426
|
+
<td class="govuk-table__cell ">An array of navigation item objects.</td>
|
427
|
+
|
428
|
+
</tr>
|
429
|
+
|
430
|
+
<tr class="govuk-table__row">
|
431
|
+
|
432
|
+
<th class="govuk-table__header" scope="row">navigation.{}.text</th>
|
433
|
+
|
434
|
+
<td class="govuk-table__cell ">string</td>
|
435
|
+
|
436
|
+
<td class="govuk-table__cell ">No</td>
|
437
|
+
|
438
|
+
<td class="govuk-table__cell ">Text of the navigation item.</td>
|
439
|
+
|
440
|
+
</tr>
|
441
|
+
|
442
|
+
<tr class="govuk-table__row">
|
443
|
+
|
444
|
+
<th class="govuk-table__header" scope="row">navigation.{}.href</th>
|
445
|
+
|
446
|
+
<td class="govuk-table__cell ">string</td>
|
447
|
+
|
448
|
+
<td class="govuk-table__cell ">No</td>
|
449
|
+
|
450
|
+
<td class="govuk-table__cell ">Url of the navigation item anchor. Both `href` and `text` attributes for navigation items need to be provided to create an item.</td>
|
451
|
+
|
452
|
+
</tr>
|
453
|
+
|
454
|
+
<tr class="govuk-table__row">
|
455
|
+
|
456
|
+
<th class="govuk-table__header" scope="row">navigationClasses</th>
|
457
|
+
|
458
|
+
<td class="govuk-table__cell ">string</td>
|
459
|
+
|
460
|
+
<td class="govuk-table__cell ">No</td>
|
461
|
+
|
462
|
+
<td class="govuk-table__cell ">Optional classes that can be added to the navigation section of the header.</td>
|
463
|
+
|
464
|
+
</tr>
|
465
|
+
|
466
|
+
<tr class="govuk-table__row">
|
467
|
+
|
468
|
+
<th class="govuk-table__header" scope="row">containerClasses</th>
|
469
|
+
|
470
|
+
<td class="govuk-table__cell ">string</td>
|
471
|
+
|
472
|
+
<td class="govuk-table__cell ">No</td>
|
473
|
+
|
474
|
+
<td class="govuk-table__cell ">Optional classes that can be added to the container, useful if you want to make the header fixed width.</td>
|
475
|
+
|
476
|
+
</tr>
|
477
|
+
|
478
|
+
<tr class="govuk-table__row">
|
479
|
+
|
480
|
+
<th class="govuk-table__header" scope="row">classes</th>
|
481
|
+
|
482
|
+
<td class="govuk-table__cell ">string</td>
|
483
|
+
|
484
|
+
<td class="govuk-table__cell ">No</td>
|
485
|
+
|
486
|
+
<td class="govuk-table__cell ">Optional additional classes to add to the header container.</td>
|
487
|
+
|
488
|
+
</tr>
|
489
|
+
|
490
|
+
<tr class="govuk-table__row">
|
491
|
+
|
492
|
+
<th class="govuk-table__header" scope="row">attributes</th>
|
493
|
+
|
494
|
+
<td class="govuk-table__cell ">object</td>
|
495
|
+
|
496
|
+
<td class="govuk-table__cell ">No</td>
|
497
|
+
|
498
|
+
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the header container.</td>
|
499
|
+
|
500
|
+
</tr>
|
501
|
+
|
502
|
+
</tbody>
|
503
|
+
|
504
|
+
</table>
|
505
|
+
|
506
|
+
**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**
|
507
|
+
|
508
|
+
### Setting up Nunjucks views and paths
|
509
|
+
|
510
|
+
Below is an example setup using express configure views:
|
511
|
+
|
512
|
+
nunjucks.configure('node_modules/govuk-frontend/components', {
|
513
|
+
autoescape: true,
|
514
|
+
cache: false,
|
515
|
+
express: app
|
516
|
+
})
|
517
|
+
|
518
|
+
## Contribution
|
519
|
+
|
520
|
+
Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository")
|
521
|
+
|
522
|
+
## License
|
523
|
+
|
524
|
+
MIT
|