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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17673b0fafadbf9937d4a6df90dfe194a19c8a83a7a0a8c2dbe65be551402f64
|
4
|
+
data.tar.gz: 5146a665a20166d526cb1a6b4f78dc333800d0e421a847515e3f1574d7f43784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a95e67dc05e77c76c2d537330a94884fc5feced188d3e0fefac35c2e130fa6a239ec7235cc6374be4907e84bed6cf2e8006b2ace9fd4f4e06ba24ccfb0a58a09
|
7
|
+
data.tar.gz: f1ae0591b02e3a4ddca6ee7a45e47cb44c62322eabe5ca9292162cd73db19368fdc81d7ccf225628b9396512933261a127b1bb2af8bf47bb20c9e7c050e8dd18
|
data/README.md
CHANGED
@@ -30,6 +30,19 @@ There are 2 types of helper classes in this app:
|
|
30
30
|
- [AppHelpers](lib/govuk_publishing_components/app_helpers). Are exposed to the applications using this gem. They should be documented using RDoc.
|
31
31
|
- [Component Presenters](lib/govuk_publishing_components/presenters). Anything in these classes is only for use within the components. They should be marked `@private`.
|
32
32
|
|
33
|
+
## GOV.UK Frontend
|
34
|
+
|
35
|
+
This gem is the way GOV.UK consumes [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend), part of the GOV.UK Design System.
|
36
|
+
|
37
|
+
We use NPM to pull in the GOV.UK Frontend styles and Javascript, but we don't commit
|
38
|
+
the `node_modules` directory. To install GOV.UK Frontend on your machine, run:
|
39
|
+
|
40
|
+
```
|
41
|
+
npm install
|
42
|
+
```
|
43
|
+
|
44
|
+
You'll need to have installed Node and NPM for this.
|
45
|
+
|
33
46
|
## Documentation
|
34
47
|
|
35
48
|
[See the rubydoc.info documentation](http://www.rubydoc.info/gems/govuk_publishing_components)
|
@@ -50,6 +50,16 @@ $border-color: #ccc;
|
|
50
50
|
}
|
51
51
|
}
|
52
52
|
|
53
|
+
.component-warning {
|
54
|
+
border: 3px solid $orange;
|
55
|
+
margin: 0 0 $gutter;
|
56
|
+
padding: $gutter $gutter 0 $gutter;
|
57
|
+
|
58
|
+
.component-warning__title {
|
59
|
+
@include bold-24;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
53
63
|
.component-doc-h2 {
|
54
64
|
@include bold-27;
|
55
65
|
margin: ($gutter * 1.5) 0 $gutter;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Include all of the GOV.UK Frontend styles. This includes global styles, fonts,
|
2
|
+
// and individual components.
|
3
|
+
$govuk-global-styles: true;
|
4
|
+
$govuk-image-url-function: 'image-url';
|
5
|
+
$govuk-font-url-function: 'font-url';
|
6
|
+
|
7
|
+
@import "../../../node_modules/govuk-frontend/all";
|
8
|
+
|
9
|
+
// Include our GOV.UK components
|
10
|
+
@import "govuk_publishing_components/all_components";
|
11
|
+
|
12
|
+
// Components that are only available inside the admin layout
|
13
|
+
@import "govuk_publishing_components/components/layout-footer";
|
@@ -0,0 +1,66 @@
|
|
1
|
+
.gem-c-highlight-boxes {
|
2
|
+
display: flex;
|
3
|
+
flex-wrap: wrap;
|
4
|
+
margin-top: $gutter-half;
|
5
|
+
|
6
|
+
@include media(tablet) {
|
7
|
+
margin-right: -25px;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
.gem-c-highlight-boxes__item-wrapper {
|
12
|
+
@include core-19;
|
13
|
+
@include box-sizing(border-box);
|
14
|
+
list-style-type: none;
|
15
|
+
padding: ($gutter / 6) $gutter-one-third ($gutter-half + $gutter-one-third) 0;
|
16
|
+
width: 100%;
|
17
|
+
|
18
|
+
@include media(tablet) {
|
19
|
+
width: 50%;
|
20
|
+
padding: ($gutter / 6) ($gutter-half + $gutter-one-third) ($gutter-half + $gutter-one-third) 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
@include media(desktop) {
|
24
|
+
width: (1 / 3) * 100%;
|
25
|
+
padding: ($gutter / 6) ($gutter-half + $gutter-one-third) ($gutter-half + $gutter-one-third) 0;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
.gem-c-highlight-boxes__item {
|
30
|
+
@include box-sizing(border-box);
|
31
|
+
border: 1px solid $grey-2;
|
32
|
+
padding: $gutter-half * 1.5;
|
33
|
+
height: 100%;
|
34
|
+
box-shadow: 7px 7px 0 $white, 8px 8px 0 $grey-2;
|
35
|
+
}
|
36
|
+
|
37
|
+
.gem-c-highlight-boxes--inverse {
|
38
|
+
background-color: $govuk-blue;
|
39
|
+
border: 0;
|
40
|
+
color: $white;
|
41
|
+
}
|
42
|
+
|
43
|
+
.gem-c-highlight-boxes--inverse .gem-c-highlight-boxes__title {
|
44
|
+
color: $white;
|
45
|
+
}
|
46
|
+
|
47
|
+
.gem-c-highlight-boxes__title {
|
48
|
+
@include bold-19;
|
49
|
+
display: block;
|
50
|
+
text-decoration: underline;
|
51
|
+
margin-bottom: 5px;
|
52
|
+
}
|
53
|
+
|
54
|
+
.gem-c-highlight-boxes__title--featured {
|
55
|
+
@include bold-24;
|
56
|
+
}
|
57
|
+
|
58
|
+
.gem-c-highlight-boxes__description {
|
59
|
+
margin-bottom: $gutter-one-third;
|
60
|
+
}
|
61
|
+
|
62
|
+
.gem-c-highlight-boxes__metadata {
|
63
|
+
@include core-16;
|
64
|
+
display: inline-block;
|
65
|
+
margin-right: $gutter-half;
|
66
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
// This component relies on styles from GOV.UK Frontend
|
@@ -0,0 +1 @@
|
|
1
|
+
// This component relies on styles from GOV.UK Frontend
|
@@ -42,6 +42,14 @@ module GovukPublishingComponents
|
|
42
42
|
component[:display_html]
|
43
43
|
end
|
44
44
|
|
45
|
+
def display_preview?
|
46
|
+
component[:display_preview].nil? ? true : component[:display_preview]
|
47
|
+
end
|
48
|
+
|
49
|
+
def part_of_admin_layout?
|
50
|
+
component[:part_of_admin_layout]
|
51
|
+
end
|
52
|
+
|
45
53
|
def html_body
|
46
54
|
govspeak_to_html(body) if body.present?
|
47
55
|
end
|
@@ -58,6 +66,10 @@ module GovukPublishingComponents
|
|
58
66
|
end
|
59
67
|
end
|
60
68
|
|
69
|
+
def govuk_frontend_components
|
70
|
+
component[:govuk_frontend_components].to_a
|
71
|
+
end
|
72
|
+
|
61
73
|
def github_search_url
|
62
74
|
params = { q: "org:alphagov #{partial_path}", type: "Code" }
|
63
75
|
"https://github.com/search?#{params.to_query}"
|
@@ -1,8 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% if component_doc.display_preview? %>
|
2
|
+
<div data-module="test-a11y" data-excluded-rules="<%= @component_doc.accessibility_excluded_rules %>">
|
3
|
+
<%= render "govuk_publishing_components/component_guide/component_doc/component", component_doc: @component_doc, example: example, preview_page: false %>
|
4
|
+
<div class="component-guide-preview component-guide-preview--violation" data-module="test-a11y-violation" data-content="Accessibility Issues"></div>
|
5
|
+
<div class="component-guide-preview component-guide-preview--warning" data-module="test-a11y-warning" data-content="Potential accessibility issues: need manual check"></div>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
6
8
|
|
7
9
|
<% if component_doc.display_html? %>
|
8
10
|
<div class="component-guide-preview component-call component-highlight component-output" data-content="HTML OUTPUT">
|
@@ -1,6 +1,15 @@
|
|
1
1
|
<% content_for :title, "#{@component_doc.name} component" %>
|
2
2
|
<%= render 'govuk_publishing_components/components/title', title: @component_doc.name, context: "Component" %>
|
3
3
|
|
4
|
+
<% if @component_doc.part_of_admin_layout? %>
|
5
|
+
<div class="component-warning">
|
6
|
+
<h2 class="component-warning__title">Admin layout only</h2>
|
7
|
+
<p>
|
8
|
+
This component uses the Design System, so only works inside the <%= link_to "admin layout", "/component-guide/layout_for_admin" %>
|
9
|
+
</p>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
|
4
13
|
<div class="component-show">
|
5
14
|
<div class="grid-row">
|
6
15
|
<div class="column-two-thirds">
|
@@ -28,6 +37,19 @@
|
|
28
37
|
|
29
38
|
<%= render "govuk_publishing_components/component_guide/component_doc/preview", component_doc: @component_doc, example: @component_doc.example %>
|
30
39
|
|
40
|
+
<% if @component_doc.govuk_frontend_components.any? %>
|
41
|
+
<h2 class="component-doc-h2">GOV.UK Design System</h2>
|
42
|
+
<%= render 'govuk_publishing_components/components/govspeak' do %>
|
43
|
+
<p>This component incorporates components from the <%= link_to "GOV.UK Design System", "https://design-system.service.gov.uk" %>:</p>
|
44
|
+
|
45
|
+
<ul>
|
46
|
+
<% @component_doc.govuk_frontend_components.each do |component| %>
|
47
|
+
<li><%= link_to component.humanize, "https://design-system.service.gov.uk/components/#{component}" %></li>
|
48
|
+
<% end %>
|
49
|
+
</ul>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
|
31
53
|
<% if @component_doc.accessibility_criteria.present? %>
|
32
54
|
<div class="grid-row component-accessibility-criteria">
|
33
55
|
<div class="column-two-thirds">
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<%
|
2
|
+
items ||= []
|
3
|
+
inverse ||= false
|
4
|
+
inverse_class = "gem-c-highlight-boxes--inverse" if inverse
|
5
|
+
highlight_boxes_helper = GovukPublishingComponents::Presenters::HighlightBoxesHelper.new(local_assigns)
|
6
|
+
%>
|
7
|
+
<% if items.any? %>
|
8
|
+
<ol class="gem-c-highlight-boxes" <%= "data-module=track-click" if highlight_boxes_helper.data_tracking? %>>
|
9
|
+
<% items.each do |content_item| %>
|
10
|
+
<li class="gem-c-highlight-boxes__item-wrapper">
|
11
|
+
<div class="gem-c-highlight-boxes__item <%= inverse_class %>">
|
12
|
+
<%= link_to(
|
13
|
+
content_item[:link].fetch(:text),
|
14
|
+
content_item[:link].fetch(:path),
|
15
|
+
class: "gem-c-highlight-boxes__title #{"gem-c-highlight-boxes__title--featured" if content_item[:link][:featured]}",
|
16
|
+
data: content_item[:link][:data_attributes]
|
17
|
+
)
|
18
|
+
%>
|
19
|
+
|
20
|
+
<% if content_item[:link][:description] %>
|
21
|
+
<p class="gem-c-highlight-boxes__description"><%= content_item[:link][:description] %></p>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if content_item[:metadata] %>
|
25
|
+
<% content_item[:metadata].each do |metadata_key, metadata_value| %>
|
26
|
+
<% if metadata_key.to_s.eql?("public_updated_at") %>
|
27
|
+
<time class="gem-c-highlight-boxes__metadata" datetime="<%= metadata_value.iso8601 %>">
|
28
|
+
<%= l(metadata_value, format: '%e %B %Y') %>
|
29
|
+
</time>
|
30
|
+
<% else %>
|
31
|
+
<p class="gem-c-highlight-boxes__metadata"><%= metadata_value %></p>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
</li>
|
37
|
+
<% end %>
|
38
|
+
</ol>
|
39
|
+
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<footer class="govuk-footer " role="contentinfo">
|
2
|
+
<div class="govuk-width-container ">
|
3
|
+
<div class="govuk-footer__meta">
|
4
|
+
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
5
|
+
|
6
|
+
<svg role="presentation" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 483.2 195.7" height="17" width="41">
|
7
|
+
<path
|
8
|
+
fill="currentColor"
|
9
|
+
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"
|
10
|
+
/>
|
11
|
+
</svg>
|
12
|
+
<span class="govuk-footer__licence-description">
|
13
|
+
All content is available under the
|
14
|
+
<a
|
15
|
+
class="govuk-footer__link"
|
16
|
+
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
|
17
|
+
rel="license"
|
18
|
+
>Open Government Licence v3.0</a>, except where otherwise stated
|
19
|
+
</span>
|
20
|
+
</div>
|
21
|
+
<div class="govuk-footer__meta-item">
|
22
|
+
<a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</footer>
|
@@ -0,0 +1,142 @@
|
|
1
|
+
name: Highlight boxes
|
2
|
+
description: Displays content item details in a grid of highlight boxes, with a max of 3 items per row.
|
3
|
+
body: |
|
4
|
+
The highlight boxes have several optional flags which can be set:
|
5
|
+
|
6
|
+
- Inverse - renders the highlight boxes as white text on a blue background
|
7
|
+
- Featured - renders a specific highlight box with larger font size
|
8
|
+
accessibility_criteria: |
|
9
|
+
The highlight boxes must:
|
10
|
+
|
11
|
+
- be visually distinct from other content on the page
|
12
|
+
- have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
13
|
+
shared_accessibility_criteria:
|
14
|
+
- link
|
15
|
+
examples:
|
16
|
+
default:
|
17
|
+
data:
|
18
|
+
items:
|
19
|
+
- link:
|
20
|
+
text: If your child is taken into care
|
21
|
+
path: /child-into-care
|
22
|
+
metadata:
|
23
|
+
document_type: Detailed guide
|
24
|
+
- link:
|
25
|
+
text: High needs funding
|
26
|
+
path: /high-needs-funding
|
27
|
+
metadata:
|
28
|
+
document_type: Guide
|
29
|
+
- link:
|
30
|
+
text: Joint Statement of the 4th meeting of the UK-China High-Level People to People Dialogue
|
31
|
+
path: /government/publications/joint-statement-of-the-4th-meeting-of-the-uk-china-high-level-people-to-people-dialogue
|
32
|
+
metadata:
|
33
|
+
document_type: Policy paper
|
34
|
+
with_descriptions_and_metadata:
|
35
|
+
data:
|
36
|
+
items:
|
37
|
+
- link:
|
38
|
+
text: Becoming an apprentice
|
39
|
+
path: /becoming-an-apprentice
|
40
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
41
|
+
metadata:
|
42
|
+
document_type: Speech
|
43
|
+
organisation: DfE and Ofqual
|
44
|
+
public_updated_at: 2016-06-27 10:29:44
|
45
|
+
- link:
|
46
|
+
text: Becoming an apprentice
|
47
|
+
path: /becoming-an-apprentice
|
48
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
49
|
+
metadata:
|
50
|
+
document_type: Speech
|
51
|
+
organisation: DfE and Ofqual
|
52
|
+
public_updated_at: 2016-06-27 10:29:44
|
53
|
+
- link:
|
54
|
+
text: Becoming an apprentice
|
55
|
+
path: /becoming-an-apprentice
|
56
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
57
|
+
metadata:
|
58
|
+
document_type: Speech
|
59
|
+
organisation: DfE and Ofqual
|
60
|
+
public_updated_at: 2016-06-27 10:29:44
|
61
|
+
inverse:
|
62
|
+
data:
|
63
|
+
inverse: true
|
64
|
+
items:
|
65
|
+
- link:
|
66
|
+
text: Becoming an apprentice
|
67
|
+
path: /becoming-an-apprentice
|
68
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
69
|
+
metadata:
|
70
|
+
document_type: Speech
|
71
|
+
organisation: DfE and Ofqual
|
72
|
+
public_updated_at: 2016-06-27 10:29:44
|
73
|
+
- link:
|
74
|
+
text: Becoming an apprentice
|
75
|
+
path: /becoming-an-apprentice
|
76
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
77
|
+
metadata:
|
78
|
+
document_type: Speech
|
79
|
+
organisation: DfE and Ofqual
|
80
|
+
public_updated_at: 2016-06-27 10:29:44
|
81
|
+
- link:
|
82
|
+
text: Becoming an apprentice
|
83
|
+
path: /becoming-an-apprentice
|
84
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
85
|
+
metadata:
|
86
|
+
document_type: Speech
|
87
|
+
organisation: DfE and Ofqual
|
88
|
+
public_updated_at: 2016-06-27 10:29:44
|
89
|
+
featured_card:
|
90
|
+
description: "Used to highlight a specific content item within the highlight boxes, e.g: the most popular."
|
91
|
+
data:
|
92
|
+
items:
|
93
|
+
- link:
|
94
|
+
text: Becoming an apprentice
|
95
|
+
path: /becoming-an-apprentice
|
96
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
97
|
+
featured: true
|
98
|
+
metadata:
|
99
|
+
document_type: Speech
|
100
|
+
organisation: DfE and Ofqual
|
101
|
+
public_updated_at: 2016-06-27 10:29:44
|
102
|
+
- link:
|
103
|
+
text: Becoming an apprentice
|
104
|
+
path: /becoming-an-apprentice
|
105
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
106
|
+
metadata:
|
107
|
+
document_type: Speech
|
108
|
+
organisation: DfE and Ofqual
|
109
|
+
public_updated_at: 2016-06-27 10:29:44
|
110
|
+
with_data_tracking_attributes:
|
111
|
+
data:
|
112
|
+
items:
|
113
|
+
- link:
|
114
|
+
text: Becoming an apprentice
|
115
|
+
path: /becoming-an-apprentice
|
116
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
117
|
+
data_attributes: {
|
118
|
+
track_category: "servicesHighlightBoxClicked",
|
119
|
+
track_action: 1,
|
120
|
+
track_label: "/becoming-an-apprentice"
|
121
|
+
}
|
122
|
+
metadata:
|
123
|
+
document_type: Speech
|
124
|
+
organisation: DfE and Ofqual
|
125
|
+
public_updated_at: 2016-06-27 10:29:44
|
126
|
+
- link:
|
127
|
+
text: Becoming an apprentice
|
128
|
+
path: /becoming-an-apprentice
|
129
|
+
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
130
|
+
data_attributes: {
|
131
|
+
track_category: "servicesHighlightBoxClicked",
|
132
|
+
track_action: 2,
|
133
|
+
track_label: "/becoming-an-apprentice",
|
134
|
+
track_options: {
|
135
|
+
dimension28: 2,
|
136
|
+
dimension29: "Becoming an apprentice"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
metadata:
|
140
|
+
document_type: Speech
|
141
|
+
organisation: DfE and Ofqual
|
142
|
+
public_updated_at: 2016-06-27 10:29:44
|