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
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="132" height="97" viewBox="0 0 132 97" version="1.1">
|
2
|
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
3
|
+
<g fill="#000000">
|
4
|
+
<path d="M25 30.2C28.5 31.7 32.7 30 34.1 26.5 35.6 22.9 33.9 18.7 30.2 17.3 26.6 15.9 22.6 17.6 21.1 21.2 19.7 24.7 21.4 28.7 25 30.2L25 30.2ZM9 39.5C12.6 41 16.8 39.3 18.2 35.8 19.7 32.2 18 28 14.3 26.7 10.7 25.2 6.7 26.9 5.2 30.5 3.8 34 5.5 38 9 39.5L9 39.5ZM4.4 57.2C7.9 58.7 12.1 57 13.5 53.4 15 49.8 13.3 45.7 9.6 44.3 6.1 42.8 2 44.6 0.5 48.1 -0.9 51.6 0.8 55.7 4.4 57.2L4.4 57.2ZM42.7 35.8C46.2 37.3 50.4 35.6 51.8 32 53.3 28.4 51.6 24.3 47.9 22.9 44.3 21.4 40.3 23.2 38.8 26.7 37.5 30.3 39.2 34.4 42.7 35.8L42.7 35.8ZM107.1 30.2C103.5 31.7 99.3 30 98 26.5 96.5 22.9 98.2 18.7 101.8 17.3 105.4 15.9 109.5 17.6 111 21.2 112.3 24.7 110.6 28.7 107.1 30.2L107.1 30.2ZM123 39.5C119.4 41 115.3 39.3 113.9 35.8 112.4 32.2 114.1 28 117.6 26.7 121.2 25.2 125.3 26.9 126.8 30.5 128.3 34 126.5 38 123 39.5L123 39.5ZM127.7 57.2C124.1 58.7 119.9 57 118.5 53.4 117 49.8 118.7 45.7 122.4 44.3 126 42.8 130.1 44.6 131.6 48.1 132.9 51.6 131.2 55.7 127.7 57.2L127.7 57.2ZM89.3 35.8C85.7 37.3 81.5 35.6 80.1 32 78.7 28.4 80.3 24.3 84 22.9 87.6 21.4 91.7 23.2 93.2 26.7 94.6 30.3 92.9 34.4 89.3 35.8L89.3 35.8ZM69.7 17.7L69.7 17.7 78.6 22.4 78.6 9.3 69.7 12.1 69.7 12.1C69.5 11.8 69.2 11.5 68.8 11.2L68.8 11.2 72.4 0 66 0 59.6 0 63.1 11.2 63.1 11.2C62.8 11.5 62.5 11.7 62.2 12.1L62.2 12.1 53.4 9.3 53.4 22.4 62.2 17.7 62.2 17.7C62.5 18 62.8 18.4 63.1 18.6L58.1 34C58.1 34 58.1 34 58.1 34.1L58.1 34.1 58.1 34.1C57.9 34.9 57.7 35.7 57.7 36.5 57.7 40.6 60.8 44 64.7 44.6L64.9 44.6C65.2 44.6 65.6 44.7 65.9 44.7 66.3 44.7 66.6 44.7 66.9 44.6L67.1 44.6C71.1 44 74.2 40.5 74.2 36.5 74.2 35.7 74.1 34.8 73.8 34.1L73.8 34.1 73.8 34.1C73.8 34.1 73.8 34.1 73.8 34L68.7 18.6C69.1 18.4 69.4 18 69.7 17.7L69.7 17.7ZM66 92.8C82.9 92.8 98.8 93.9 113.1 96 117.1 79.1 122 69.3 127.1 62.5L117.5 59.1C118.5 64 118.6 66.3 117.5 69.3 116 67.9 114.5 65 113.3 60.6L108.6 76C111.4 74 113.6 72.8 116.1 72.7 111.7 82.1 106.1 84.6 102.5 83.9 98.2 83.1 96.2 79.3 96.9 76 97.9 71.3 102.6 70.1 104.9 75.5 109.2 66.8 101.9 64.1 97.3 66.7 104.4 59.5 105.2 53.2 99.4 45.6 91.4 51.7 91.3 57.9 94.9 66.4 90.2 61 82.8 63.9 85.4 72.6 88.8 67.4 93.3 70.6 92.6 75.7 92 80 86.2 83.5 79.1 82.9 68.8 82 68.2 74.9 67.9 69.1 70.4 68.6 75 70.9 78.9 76.4L80.2 60C76.1 64.4 72.2 65.3 67.9 65.4 69.3 61 75.9 53.8 75.9 53.8L66.4 53.8 66.4 53.8 66.4 53.8 55.5 53.8C55.5 53.8 61.9 61 63.4 65.4 59.2 65.3 55.4 64.4 51.1 60L52.5 76.4C56.4 70.9 61 68.7 63.4 69.1 63.1 74.9 62.5 81.9 52.3 82.9 45.1 83.5 39.4 80 38.8 75.7 38.1 70.7 42.6 67.4 45.9 72.6 48.6 63.9 41.3 61 36.5 66.4 40.2 57.9 40.1 51.7 31.9 45.6 26.1 53.2 26.9 59.5 34.1 66.7 29.4 64.1 22.2 66.8 26.4 75.5 28.7 70 33.5 71.3 34.5 76 35.2 79.3 33.2 83.1 28.8 83.9 25.3 84.6 19.8 82.1 15.3 72.7 17.8 72.8 20 74 22.8 76L18.1 60.6C16.9 65 15.4 67.8 13.8 69.3 12.7 66.3 12.9 64 13.8 59.1L4.3 62.5C9.3 69.4 14.2 79.2 18.3 96 33.1 93.9 49.1 92.8 66 92.8L66 92.8Z"/>
|
5
|
+
</g>
|
6
|
+
</g>
|
7
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
3
|
+
typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) :
|
4
|
+
(factory((global.GOVUKFrontend = {})));
|
5
|
+
}(this, (function (exports) { 'use strict';
|
6
|
+
|
7
|
+
/**
|
8
|
+
* TODO: Ideally this would be a NodeList.prototype.forEach polyfill
|
9
|
+
* This seems to fail in IE8, requires more investigation.
|
10
|
+
* See: https://github.com/imagitama/nodelist-foreach-polyfill
|
11
|
+
*/
|
12
|
+
function nodeListForEach (nodes, callback) {
|
13
|
+
if (window.NodeList.prototype.forEach) {
|
14
|
+
return nodes.forEach(callback)
|
15
|
+
}
|
16
|
+
for (var i = 0; i < nodes.length; i++) {
|
17
|
+
callback.call(window, nodes[i], i, nodes);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
// Used to generate a unique string, allows multiple instances of the component without
|
22
|
+
// Them conflicting with each other.
|
23
|
+
// https://stackoverflow.com/a/8809472
|
24
|
+
function generateUniqueID () {
|
25
|
+
var d = new Date().getTime();
|
26
|
+
if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') {
|
27
|
+
d += window.performance.now(); // use high-precision timer if available
|
28
|
+
}
|
29
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
30
|
+
var r = (d + Math.random() * 16) % 16 | 0;
|
31
|
+
d = Math.floor(d / 16);
|
32
|
+
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
|
33
|
+
})
|
34
|
+
}
|
35
|
+
|
36
|
+
exports.nodeListForEach = nodeListForEach;
|
37
|
+
exports.generateUniqueID = generateUniqueID;
|
38
|
+
|
39
|
+
})));
|
@@ -0,0 +1,26 @@
|
|
1
|
+
@import "back-link/back-link";
|
2
|
+
@import "breadcrumbs/breadcrumbs";
|
3
|
+
@import "button/button";
|
4
|
+
@import "checkboxes/checkboxes";
|
5
|
+
@import "date-input/date-input";
|
6
|
+
@import "details/details";
|
7
|
+
@import "error-message/error-message";
|
8
|
+
@import "error-summary/error-summary";
|
9
|
+
@import "fieldset/fieldset";
|
10
|
+
@import "file-upload/file-upload";
|
11
|
+
@import "footer/footer";
|
12
|
+
@import "hint/hint";
|
13
|
+
@import "header/header";
|
14
|
+
@import "input/input";
|
15
|
+
@import "inset-text/inset-text";
|
16
|
+
@import "label/label";
|
17
|
+
@import "panel/panel";
|
18
|
+
@import "phase-banner/phase-banner";
|
19
|
+
@import "tabs/tabs";
|
20
|
+
@import "tag/tag";
|
21
|
+
@import "radios/radios";
|
22
|
+
@import "select/select";
|
23
|
+
@import "skip-link/skip-link";
|
24
|
+
@import "table/table";
|
25
|
+
@import "textarea/textarea";
|
26
|
+
@import "warning-text/warning-text";
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# Back link
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
Link back component, to go back a page.
|
6
|
+
|
7
|
+
## Guidance
|
8
|
+
|
9
|
+
Find out when to use the Back link component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/back-link).
|
10
|
+
|
11
|
+
## Quick start examples
|
12
|
+
|
13
|
+
### Component default
|
14
|
+
|
15
|
+
[Preview the back-link component](http://govuk-frontend-review.herokuapp.com/components/back-link/preview)
|
16
|
+
|
17
|
+
#### Markup
|
18
|
+
|
19
|
+
<a href="https://gov.uk" class="govuk-back-link">Back</a>
|
20
|
+
|
21
|
+
#### Macro
|
22
|
+
|
23
|
+
{% from 'back-link/macro.njk' import govukBackLink %}
|
24
|
+
|
25
|
+
{{ govukBackLink({
|
26
|
+
"href": "https://gov.uk",
|
27
|
+
"text": "Back"
|
28
|
+
}) }}
|
29
|
+
|
30
|
+
## Requirements
|
31
|
+
|
32
|
+
### Build tool configuration
|
33
|
+
|
34
|
+
When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp
|
35
|
+
|
36
|
+
.pipe(sass({
|
37
|
+
includePaths: 'node_modules/'
|
38
|
+
}))
|
39
|
+
|
40
|
+
### Static asset path configuration
|
41
|
+
|
42
|
+
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:
|
43
|
+
|
44
|
+
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
45
|
+
|
46
|
+
## Component arguments
|
47
|
+
|
48
|
+
If you are using Nunjucks,then macros take the following arguments
|
49
|
+
|
50
|
+
**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).**
|
51
|
+
|
52
|
+
<table class="govuk-table">
|
53
|
+
|
54
|
+
<thead class="govuk-table__head">
|
55
|
+
|
56
|
+
<tr class="govuk-table__row">
|
57
|
+
|
58
|
+
<th class="govuk-table__header" scope="col">Name</th>
|
59
|
+
|
60
|
+
<th class="govuk-table__header" scope="col">Type</th>
|
61
|
+
|
62
|
+
<th class="govuk-table__header" scope="col">Required</th>
|
63
|
+
|
64
|
+
<th class="govuk-table__header" scope="col">Description</th>
|
65
|
+
|
66
|
+
</tr>
|
67
|
+
|
68
|
+
</thead>
|
69
|
+
|
70
|
+
<tbody class="govuk-table__body">
|
71
|
+
|
72
|
+
<tr class="govuk-table__row">
|
73
|
+
|
74
|
+
<th class="govuk-table__header" scope="row">text (or) html</th>
|
75
|
+
|
76
|
+
<td class="govuk-table__cell ">string</td>
|
77
|
+
|
78
|
+
<td class="govuk-table__cell ">Yes</td>
|
79
|
+
|
80
|
+
<td class="govuk-table__cell ">Text or HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored.</td>
|
81
|
+
|
82
|
+
</tr>
|
83
|
+
|
84
|
+
<tr class="govuk-table__row">
|
85
|
+
|
86
|
+
<th class="govuk-table__header" scope="row">href</th>
|
87
|
+
|
88
|
+
<td class="govuk-table__cell ">string</td>
|
89
|
+
|
90
|
+
<td class="govuk-table__cell ">Yes</td>
|
91
|
+
|
92
|
+
<td class="govuk-table__cell ">The value of the link href attribute</td>
|
93
|
+
|
94
|
+
</tr>
|
95
|
+
|
96
|
+
<tr class="govuk-table__row">
|
97
|
+
|
98
|
+
<th class="govuk-table__header" scope="row">classes</th>
|
99
|
+
|
100
|
+
<td class="govuk-table__cell ">string</td>
|
101
|
+
|
102
|
+
<td class="govuk-table__cell ">No</td>
|
103
|
+
|
104
|
+
<td class="govuk-table__cell ">Optional additional classes to add to the anchor tag.</td>
|
105
|
+
|
106
|
+
</tr>
|
107
|
+
|
108
|
+
<tr class="govuk-table__row">
|
109
|
+
|
110
|
+
<th class="govuk-table__header" scope="row">attributes</th>
|
111
|
+
|
112
|
+
<td class="govuk-table__cell ">object</td>
|
113
|
+
|
114
|
+
<td class="govuk-table__cell ">No</td>
|
115
|
+
|
116
|
+
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the anchor tag.</td>
|
117
|
+
|
118
|
+
</tr>
|
119
|
+
|
120
|
+
</tbody>
|
121
|
+
|
122
|
+
</table>
|
123
|
+
|
124
|
+
**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).**
|
125
|
+
|
126
|
+
### Setting up Nunjucks views and paths
|
127
|
+
|
128
|
+
Below is an example setup using express configure views:
|
129
|
+
|
130
|
+
nunjucks.configure('node_modules/govuk-frontend/components', {
|
131
|
+
autoescape: true,
|
132
|
+
cache: false,
|
133
|
+
express: app
|
134
|
+
})
|
135
|
+
|
136
|
+
## Contribution
|
137
|
+
|
138
|
+
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")
|
139
|
+
|
140
|
+
## License
|
141
|
+
|
142
|
+
MIT
|
@@ -0,0 +1,54 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@include govuk-exports("govuk/component/back-link") {
|
6
|
+
|
7
|
+
.govuk-back-link {
|
8
|
+
@include govuk-typography-responsive($size: 16);
|
9
|
+
@include govuk-link-common;
|
10
|
+
@include govuk-link-style-text;
|
11
|
+
|
12
|
+
display: inline-block;
|
13
|
+
position: relative;
|
14
|
+
|
15
|
+
margin-top: govuk-spacing(3);
|
16
|
+
margin-bottom: govuk-spacing(3);
|
17
|
+
|
18
|
+
// Allow space for the arrow
|
19
|
+
padding-left: 14px;
|
20
|
+
|
21
|
+
// Use border-bottom rather than text-decoration so that the arrow is
|
22
|
+
// underlined as well.
|
23
|
+
border-bottom: 1px solid govuk-colour("black");
|
24
|
+
|
25
|
+
// Underline is provided by a bottom border
|
26
|
+
text-decoration: none;
|
27
|
+
|
28
|
+
// Prepend left pointing arrow
|
29
|
+
&:before {
|
30
|
+
@include govuk-shape-arrow($direction: left, $base: 10px, $height: 6px);
|
31
|
+
|
32
|
+
content: "";
|
33
|
+
|
34
|
+
// Vertically align with the parent element
|
35
|
+
position: absolute;
|
36
|
+
|
37
|
+
top: -1px;
|
38
|
+
bottom: 1px;
|
39
|
+
left: 0;
|
40
|
+
|
41
|
+
margin: auto;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
// Begin adjustments for font baseline offset
|
46
|
+
// These should be removed when the font is updated with the correct baseline
|
47
|
+
|
48
|
+
.govuk-back-link:before {
|
49
|
+
$offset: 1px;
|
50
|
+
|
51
|
+
top: $offset * -1;
|
52
|
+
bottom: $offset;
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<a href="{%- if params.href %}{{ params.href }}{% else %}#{% endif -%}" class="govuk-back-link{%- if params.classes %} {{ params.classes }}{% endif -%}"
|
2
|
+
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ (params.html | safe if params.html else (params.text if params.text else 'Back')) }}</a>
|
@@ -0,0 +1,335 @@
|
|
1
|
+
# Breadcrumbs
|
2
|
+
|
3
|
+
## Introduction
|
4
|
+
|
5
|
+
The Breadcrumbs component helps users to understand where they are within a website’s structure and move between levels.
|
6
|
+
|
7
|
+
## Guidance
|
8
|
+
|
9
|
+
Find out when to use the Breadcrumbs component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/breadcrumbs).
|
10
|
+
|
11
|
+
## Quick start examples
|
12
|
+
|
13
|
+
### Component default
|
14
|
+
|
15
|
+
[Preview the breadcrumbs component](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/preview)
|
16
|
+
|
17
|
+
#### Markup
|
18
|
+
|
19
|
+
<div class="govuk-breadcrumbs">
|
20
|
+
<ol class="govuk-breadcrumbs__list">
|
21
|
+
|
22
|
+
<li class="govuk-breadcrumbs__list-item">
|
23
|
+
<a class="govuk-breadcrumbs__link" href="/section">Section 1</a>
|
24
|
+
</li>
|
25
|
+
|
26
|
+
<li class="govuk-breadcrumbs__list-item">
|
27
|
+
<a class="govuk-breadcrumbs__link" href="/section/sub-section">Sub-section</a>
|
28
|
+
</li>
|
29
|
+
|
30
|
+
</ol>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
#### Macro
|
34
|
+
|
35
|
+
{% from 'breadcrumbs/macro.njk' import govukBreadcrumbs %}
|
36
|
+
|
37
|
+
{{ govukBreadcrumbs({
|
38
|
+
"items": [
|
39
|
+
{
|
40
|
+
"text": "Section 1",
|
41
|
+
"href": "/section"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"text": "Sub-section",
|
45
|
+
"href": "/section/sub-section"
|
46
|
+
}
|
47
|
+
]
|
48
|
+
}) }}
|
49
|
+
|
50
|
+
### Breadcrumbs--single-section
|
51
|
+
|
52
|
+
[Preview the breadcrumbs--single-section example](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/single-section/preview)
|
53
|
+
|
54
|
+
#### Markup
|
55
|
+
|
56
|
+
<div class="govuk-breadcrumbs">
|
57
|
+
<ol class="govuk-breadcrumbs__list">
|
58
|
+
|
59
|
+
<li class="govuk-breadcrumbs__list-item">
|
60
|
+
<a class="govuk-breadcrumbs__link" href="/section">Section 1</a>
|
61
|
+
</li>
|
62
|
+
|
63
|
+
</ol>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
#### Macro
|
67
|
+
|
68
|
+
{% from 'breadcrumbs/macro.njk' import govukBreadcrumbs %}
|
69
|
+
|
70
|
+
{{ govukBreadcrumbs({
|
71
|
+
"items": [
|
72
|
+
{
|
73
|
+
"text": "Section 1",
|
74
|
+
"href": "/section"
|
75
|
+
}
|
76
|
+
]
|
77
|
+
}) }}
|
78
|
+
|
79
|
+
### Breadcrumbs--many-breadcrumbs
|
80
|
+
|
81
|
+
[Preview the breadcrumbs--many-breadcrumbs example](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/many-breadcrumbs/preview)
|
82
|
+
|
83
|
+
#### Markup
|
84
|
+
|
85
|
+
<div class="govuk-breadcrumbs">
|
86
|
+
<ol class="govuk-breadcrumbs__list">
|
87
|
+
|
88
|
+
<li class="govuk-breadcrumbs__list-item">
|
89
|
+
<a class="govuk-breadcrumbs__link" href="/">Home</a>
|
90
|
+
</li>
|
91
|
+
|
92
|
+
<li class="govuk-breadcrumbs__list-item">
|
93
|
+
<a class="govuk-breadcrumbs__link" href="/section">Section 3</a>
|
94
|
+
</li>
|
95
|
+
|
96
|
+
<li class="govuk-breadcrumbs__list-item">
|
97
|
+
<a class="govuk-breadcrumbs__link" href="/section/sub-section">Sub-section 1</a>
|
98
|
+
</li>
|
99
|
+
|
100
|
+
<li class="govuk-breadcrumbs__list-item">
|
101
|
+
<a class="govuk-breadcrumbs__link" href="/section/sub-section/sub-sub-section">Sub Sub-section 1</a>
|
102
|
+
</li>
|
103
|
+
|
104
|
+
</ol>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
#### Macro
|
108
|
+
|
109
|
+
{% from 'breadcrumbs/macro.njk' import govukBreadcrumbs %}
|
110
|
+
|
111
|
+
{{ govukBreadcrumbs({
|
112
|
+
"items": [
|
113
|
+
{
|
114
|
+
"text": "Home",
|
115
|
+
"href": "/"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"text": "Section 3",
|
119
|
+
"href": "/section"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"text": "Sub-section 1",
|
123
|
+
"href": "/section/sub-section"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"text": "Sub Sub-section 1",
|
127
|
+
"href": "/section/sub-section/sub-sub-section"
|
128
|
+
}
|
129
|
+
]
|
130
|
+
}) }}
|
131
|
+
|
132
|
+
### Breadcrumbs--no-home-section
|
133
|
+
|
134
|
+
[Preview the breadcrumbs--no-home-section example](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/no-home-section/preview)
|
135
|
+
|
136
|
+
#### Markup
|
137
|
+
|
138
|
+
<div class="govuk-breadcrumbs">
|
139
|
+
<ol class="govuk-breadcrumbs__list">
|
140
|
+
|
141
|
+
<li class="govuk-breadcrumbs__list-item">
|
142
|
+
<a class="govuk-breadcrumbs__link" href="/service-manual">Service Manual</a>
|
143
|
+
</li>
|
144
|
+
|
145
|
+
<li class="govuk-breadcrumbs__list-item">
|
146
|
+
<a class="govuk-breadcrumbs__link" href="/service-manual/agile-delivery">Agile Delivery</a>
|
147
|
+
</li>
|
148
|
+
|
149
|
+
</ol>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
#### Macro
|
153
|
+
|
154
|
+
{% from 'breadcrumbs/macro.njk' import govukBreadcrumbs %}
|
155
|
+
|
156
|
+
{{ govukBreadcrumbs({
|
157
|
+
"items": [
|
158
|
+
{
|
159
|
+
"text": "Service Manual",
|
160
|
+
"href": "/service-manual"
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"text": "Agile Delivery",
|
164
|
+
"href": "/service-manual/agile-delivery"
|
165
|
+
}
|
166
|
+
]
|
167
|
+
}) }}
|
168
|
+
|
169
|
+
### Breadcrumbs--last-breadcrumb-is-current-page
|
170
|
+
|
171
|
+
[Preview the breadcrumbs--last-breadcrumb-is-current-page example](http://govuk-frontend-review.herokuapp.com/components/breadcrumbs/last-breadcrumb-is-current-page/preview)
|
172
|
+
|
173
|
+
#### Markup
|
174
|
+
|
175
|
+
<div class="govuk-breadcrumbs">
|
176
|
+
<ol class="govuk-breadcrumbs__list">
|
177
|
+
|
178
|
+
<li class="govuk-breadcrumbs__list-item">
|
179
|
+
<a class="govuk-breadcrumbs__link" href="/">Home</a>
|
180
|
+
</li>
|
181
|
+
|
182
|
+
<li class="govuk-breadcrumbs__list-item">
|
183
|
+
<a class="govuk-breadcrumbs__link" href="/browse/abroad">Passports, travel and living abroad</a>
|
184
|
+
</li>
|
185
|
+
|
186
|
+
<li class="govuk-breadcrumbs__list-item" aria-current="page">Travel abroad</li>
|
187
|
+
|
188
|
+
</ol>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
#### Macro
|
192
|
+
|
193
|
+
{% from 'breadcrumbs/macro.njk' import govukBreadcrumbs %}
|
194
|
+
|
195
|
+
{{ govukBreadcrumbs({
|
196
|
+
"items": [
|
197
|
+
{
|
198
|
+
"text": "Home",
|
199
|
+
"href": "/"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"text": "Passports, travel and living abroad",
|
203
|
+
"href": "/browse/abroad"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"text": "Travel abroad"
|
207
|
+
}
|
208
|
+
]
|
209
|
+
}) }}
|
210
|
+
|
211
|
+
## Requirements
|
212
|
+
|
213
|
+
### Build tool configuration
|
214
|
+
|
215
|
+
When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp
|
216
|
+
|
217
|
+
.pipe(sass({
|
218
|
+
includePaths: 'node_modules/'
|
219
|
+
}))
|
220
|
+
|
221
|
+
### Static asset path configuration
|
222
|
+
|
223
|
+
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:
|
224
|
+
|
225
|
+
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets')))
|
226
|
+
|
227
|
+
## Component arguments
|
228
|
+
|
229
|
+
If you are using Nunjucks,then macros take the following arguments
|
230
|
+
|
231
|
+
**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).**
|
232
|
+
|
233
|
+
<table class="govuk-table">
|
234
|
+
|
235
|
+
<thead class="govuk-table__head">
|
236
|
+
|
237
|
+
<tr class="govuk-table__row">
|
238
|
+
|
239
|
+
<th class="govuk-table__header" scope="col">Name</th>
|
240
|
+
|
241
|
+
<th class="govuk-table__header" scope="col">Type</th>
|
242
|
+
|
243
|
+
<th class="govuk-table__header" scope="col">Required</th>
|
244
|
+
|
245
|
+
<th class="govuk-table__header" scope="col">Description</th>
|
246
|
+
|
247
|
+
</tr>
|
248
|
+
|
249
|
+
</thead>
|
250
|
+
|
251
|
+
<tbody class="govuk-table__body">
|
252
|
+
|
253
|
+
<tr class="govuk-table__row">
|
254
|
+
|
255
|
+
<th class="govuk-table__header" scope="row">items</th>
|
256
|
+
|
257
|
+
<td class="govuk-table__cell ">array</td>
|
258
|
+
|
259
|
+
<td class="govuk-table__cell ">Yes</td>
|
260
|
+
|
261
|
+
<td class="govuk-table__cell ">Array of breadcrumbs item objects.</td>
|
262
|
+
|
263
|
+
</tr>
|
264
|
+
|
265
|
+
<tr class="govuk-table__row">
|
266
|
+
|
267
|
+
<th class="govuk-table__header" scope="row">items.{}.text (or) items.{}.html</th>
|
268
|
+
|
269
|
+
<td class="govuk-table__cell ">string</td>
|
270
|
+
|
271
|
+
<td class="govuk-table__cell ">Yes</td>
|
272
|
+
|
273
|
+
<td class="govuk-table__cell ">Text or HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored.</td>
|
274
|
+
|
275
|
+
</tr>
|
276
|
+
|
277
|
+
<tr class="govuk-table__row">
|
278
|
+
|
279
|
+
<th class="govuk-table__header" scope="row">items.{}.href</th>
|
280
|
+
|
281
|
+
<td class="govuk-table__cell ">string</td>
|
282
|
+
|
283
|
+
<td class="govuk-table__cell ">no</td>
|
284
|
+
|
285
|
+
<td class="govuk-table__cell ">Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item</td>
|
286
|
+
|
287
|
+
</tr>
|
288
|
+
|
289
|
+
<tr class="govuk-table__row">
|
290
|
+
|
291
|
+
<th class="govuk-table__header" scope="row">classes</th>
|
292
|
+
|
293
|
+
<td class="govuk-table__cell ">string</td>
|
294
|
+
|
295
|
+
<td class="govuk-table__cell ">No</td>
|
296
|
+
|
297
|
+
<td class="govuk-table__cell ">Optional additional classes to add to the breadcrumbs container.</td>
|
298
|
+
|
299
|
+
</tr>
|
300
|
+
|
301
|
+
<tr class="govuk-table__row">
|
302
|
+
|
303
|
+
<th class="govuk-table__header" scope="row">attributes</th>
|
304
|
+
|
305
|
+
<td class="govuk-table__cell ">object</td>
|
306
|
+
|
307
|
+
<td class="govuk-table__cell ">No</td>
|
308
|
+
|
309
|
+
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the breadcrumbs container.</td>
|
310
|
+
|
311
|
+
</tr>
|
312
|
+
|
313
|
+
</tbody>
|
314
|
+
|
315
|
+
</table>
|
316
|
+
|
317
|
+
**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).**
|
318
|
+
|
319
|
+
### Setting up Nunjucks views and paths
|
320
|
+
|
321
|
+
Below is an example setup using express configure views:
|
322
|
+
|
323
|
+
nunjucks.configure('node_modules/govuk-frontend/components', {
|
324
|
+
autoescape: true,
|
325
|
+
cache: false,
|
326
|
+
express: app
|
327
|
+
})
|
328
|
+
|
329
|
+
## Contribution
|
330
|
+
|
331
|
+
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")
|
332
|
+
|
333
|
+
## License
|
334
|
+
|
335
|
+
MIT
|