defra_ruby_template 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +20 -0
- data/README.md +71 -0
- data/Rakefile +50 -0
- data/app/views/layouts/defra_ruby_template.html.erb +83 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/defra_ruby_template.gemspec +24 -0
- data/lib/defra_ruby_template.rb +23 -0
- data/lib/defra_ruby_template/version.rb +3 -0
- data/node_modules/govuk-frontend/README.md +91 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +14 -0
- data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
- data/node_modules/govuk-frontend/govuk/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/govuk/all.js +2616 -0
- data/node_modules/govuk-frontend/govuk/all.scss +9 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/govuk/common.js +39 -0
- data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1011 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +250 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +76 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +27 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +62 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +193 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +52 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +24 -0
- data/node_modules/govuk-frontend/govuk/components/button/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
- data/node_modules/govuk-frontend/govuk/components/button/button.js +724 -0
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +318 -0
- data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +74 -0
- data/node_modules/govuk-frontend/govuk/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1194 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +240 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +111 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +37 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1192 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1189 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +161 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +119 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +443 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +73 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +549 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +117 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +97 -0
- data/node_modules/govuk-frontend/govuk/components/details/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
- data/node_modules/govuk-frontend/govuk/components/details/details.js +828 -0
- data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +103 -0
- data/node_modules/govuk-frontend/govuk/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +50 -0
- data/node_modules/govuk-frontend/govuk/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +77 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +38 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +6 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +853 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +242 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +70 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +103 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +70 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +22 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +198 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +73 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/template.njk +44 -0
- data/node_modules/govuk-frontend/govuk/components/footer/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +501 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +118 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/footer/template.njk +87 -0
- data/node_modules/govuk-frontend/govuk/components/header/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +378 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +1066 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +106 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +79 -0
- data/node_modules/govuk-frontend/govuk/components/hint/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +59 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/govuk/components/input/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
- data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +628 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +167 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/input/template.njk +65 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +58 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/govuk/components/label/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
- data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +38 -0
- data/node_modules/govuk-frontend/govuk/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
- data/node_modules/govuk-frontend/govuk/components/panel/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +91 -0
- data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/panel/template.njk +13 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +76 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +33 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/template.njk +15 -0
- data/node_modules/govuk-frontend/govuk/components/radios/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1183 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +143 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1148 -0
- data/node_modules/govuk-frontend/govuk/components/radios/template.njk +116 -0
- data/node_modules/govuk-frontend/govuk/components/select/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +327 -0
- data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +105 -0
- data/node_modules/govuk-frontend/govuk/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/select/template.njk +51 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +1084 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +113 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +47 -0
- data/node_modules/govuk-frontend/govuk/components/table/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
- data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +538 -0
- data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +132 -0
- data/node_modules/govuk-frontend/govuk/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/table/template.njk +45 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +286 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1347 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +32 -0
- data/node_modules/govuk-frontend/govuk/components/tag/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +131 -0
- data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +26 -0
- data/node_modules/govuk-frontend/govuk/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +250 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +91 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +45 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +73 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/govuk/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +25 -0
- data/node_modules/govuk-frontend/govuk/core/_links.scss +41 -0
- data/node_modules/govuk-frontend/govuk/core/_lists.scss +72 -0
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +62 -0
- data/node_modules/govuk-frontend/govuk/core/_template.scss +36 -0
- data/node_modules/govuk-frontend/govuk/core/_typography.scss +192 -0
- data/node_modules/govuk-frontend/govuk/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +95 -0
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +61 -0
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +427 -0
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
- data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +153 -0
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +207 -0
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
- data/node_modules/govuk-frontend/govuk/objects/_all.scss +5 -0
- data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +23 -0
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +24 -0
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +68 -0
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +88 -0
- data/node_modules/govuk-frontend/govuk/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +30 -0
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +64 -0
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +27 -0
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +52 -0
- data/node_modules/govuk-frontend/govuk/settings/_all.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +139 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +108 -0
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +74 -0
- data/node_modules/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +105 -0
- data/node_modules/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +89 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +183 -0
- data/node_modules/govuk-frontend/govuk/template.njk +60 -0
- data/node_modules/govuk-frontend/govuk/tools/_all.scss +8 -0
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/govuk/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +25 -0
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/govuk/tools/_iff.scss +17 -0
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +25 -0
- data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
- data/node_modules/govuk-frontend/govuk/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +589 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +54 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +31 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +254 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +254 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +28 -0
- data/node_modules/govuk-frontend/package.json +56 -0
- data/package-lock.json +13 -0
- data/package.json +29 -0
- data/vendor/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/vendor/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/vendor/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/vendor/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/vendor/assets/images/favicon.ico +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon.png +0 -0
- data/vendor/assets/images/govuk-crest-2x.png +0 -0
- data/vendor/assets/images/govuk-crest.png +0 -0
- data/vendor/assets/images/govuk-logotype-crown.png +0 -0
- data/vendor/assets/images/govuk-mask-icon.svg +7 -0
- data/vendor/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/javascripts/defra_ruby_template.js +2616 -0
- data/vendor/assets/stylesheets/_base.scss +3 -0
- data/vendor/assets/stylesheets/all-ie8.scss +6 -0
- data/vendor/assets/stylesheets/all.scss +9 -0
- data/vendor/assets/stylesheets/components/_all.scss +33 -0
- data/vendor/assets/stylesheets/components/accordion/_accordion.scss +2 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +197 -0
- data/vendor/assets/stylesheets/components/back-link/_back-link.scss +2 -0
- data/vendor/assets/stylesheets/components/back-link/_index.scss +99 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +138 -0
- data/vendor/assets/stylesheets/components/button/_button.scss +2 -0
- data/vendor/assets/stylesheets/components/button/_index.scss +288 -0
- data/vendor/assets/stylesheets/components/character-count/_character-count.scss +2 -0
- data/vendor/assets/stylesheets/components/character-count/_index.scss +25 -0
- data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +2 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +320 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +51 -0
- data/vendor/assets/stylesheets/components/date-input/_date-input.scss +2 -0
- data/vendor/assets/stylesheets/components/date-input/_index.scss +26 -0
- data/vendor/assets/stylesheets/components/details/_details.scss +2 -0
- data/vendor/assets/stylesheets/components/details/_index.scss +87 -0
- data/vendor/assets/stylesheets/components/error-message/_error-message.scss +2 -0
- data/vendor/assets/stylesheets/components/error-message/_index.scss +11 -0
- data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +2 -0
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +43 -0
- data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +2 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.scss +64 -0
- data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +2 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +49 -0
- data/vendor/assets/stylesheets/components/footer/_footer.scss +2 -0
- data/vendor/assets/stylesheets/components/footer/_index.scss +241 -0
- data/vendor/assets/stylesheets/components/header/_header.scss +2 -0
- data/vendor/assets/stylesheets/components/header/_index.scss +331 -0
- data/vendor/assets/stylesheets/components/hint/_hint.scss +2 -0
- data/vendor/assets/stylesheets/components/hint/_index.scss +44 -0
- data/vendor/assets/stylesheets/components/input/_index.scss +191 -0
- data/vendor/assets/stylesheets/components/input/_input.scss +2 -0
- data/vendor/assets/stylesheets/components/inset-text/_index.scss +24 -0
- data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +2 -0
- data/vendor/assets/stylesheets/components/label/_index.scss +41 -0
- data/vendor/assets/stylesheets/components/label/_label.scss +2 -0
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
- data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/panel/_index.scss +44 -0
- data/vendor/assets/stylesheets/components/panel/_panel.scss +2 -0
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +27 -0
- data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/radios/_index.scss +342 -0
- data/vendor/assets/stylesheets/components/radios/_radios.scss +2 -0
- data/vendor/assets/stylesheets/components/select/_index.scss +49 -0
- data/vendor/assets/stylesheets/components/select/_select.scss +2 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +36 -0
- data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +2 -0
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +145 -0
- data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +2 -0
- data/vendor/assets/stylesheets/components/table/_index.scss +71 -0
- data/vendor/assets/stylesheets/components/table/_table.scss +2 -0
- data/vendor/assets/stylesheets/components/tabs/_index.scss +130 -0
- data/vendor/assets/stylesheets/components/tabs/_tabs.scss +2 -0
- data/vendor/assets/stylesheets/components/tag/_index.scss +86 -0
- data/vendor/assets/stylesheets/components/tag/_tag.scss +2 -0
- data/vendor/assets/stylesheets/components/textarea/_index.scss +47 -0
- data/vendor/assets/stylesheets/components/textarea/_textarea.scss +2 -0
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +66 -0
- data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +2 -0
- data/vendor/assets/stylesheets/core/_all.scss +6 -0
- data/vendor/assets/stylesheets/core/_global-styles.scss +25 -0
- data/vendor/assets/stylesheets/core/_links.scss +41 -0
- data/vendor/assets/stylesheets/core/_lists.scss +72 -0
- data/vendor/assets/stylesheets/core/_section-break.scss +62 -0
- data/vendor/assets/stylesheets/core/_template.scss +36 -0
- data/vendor/assets/stylesheets/core/_typography.scss +192 -0
- data/vendor/assets/stylesheets/defra_ruby_template.scss +16 -0
- data/vendor/assets/stylesheets/helpers/_all.scss +12 -0
- data/vendor/assets/stylesheets/helpers/_clearfix.scss +15 -0
- data/vendor/assets/stylesheets/helpers/_colour.scss +95 -0
- data/vendor/assets/stylesheets/helpers/_device-pixels.scss +37 -0
- data/vendor/assets/stylesheets/helpers/_focused.scss +28 -0
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +41 -0
- data/vendor/assets/stylesheets/helpers/_grid.scss +61 -0
- data/vendor/assets/stylesheets/helpers/_links.scss +427 -0
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +91 -0
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +80 -0
- data/vendor/assets/stylesheets/helpers/_spacing.scss +153 -0
- data/vendor/assets/stylesheets/helpers/_typography.scss +207 -0
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +84 -0
- data/vendor/assets/stylesheets/objects/_all.scss +5 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +101 -0
- data/vendor/assets/stylesheets/objects/_form-group.scss +23 -0
- data/vendor/assets/stylesheets/objects/_grid.scss +24 -0
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +68 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +88 -0
- data/vendor/assets/stylesheets/overrides/_all.scss +4 -0
- data/vendor/assets/stylesheets/overrides/_display.scss +30 -0
- data/vendor/assets/stylesheets/overrides/_spacing.scss +64 -0
- data/vendor/assets/stylesheets/overrides/_typography.scss +27 -0
- data/vendor/assets/stylesheets/overrides/_width.scss +52 -0
- data/vendor/assets/stylesheets/settings/_all.scss +23 -0
- data/vendor/assets/stylesheets/settings/_assets.scss +82 -0
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +155 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +139 -0
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +108 -0
- data/vendor/assets/stylesheets/settings/_compatibility.scss +74 -0
- data/vendor/assets/stylesheets/settings/_global-styles.scss +13 -0
- data/vendor/assets/stylesheets/settings/_ie8.scss +18 -0
- data/vendor/assets/stylesheets/settings/_links.scss +62 -0
- data/vendor/assets/stylesheets/settings/_measurements.scss +105 -0
- data/vendor/assets/stylesheets/settings/_media-queries.scss +23 -0
- data/vendor/assets/stylesheets/settings/_spacing.scss +80 -0
- data/vendor/assets/stylesheets/settings/_typography-font-families.scss +32 -0
- data/vendor/assets/stylesheets/settings/_typography-font.scss +89 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +183 -0
- data/vendor/assets/stylesheets/tools/_all.scss +8 -0
- data/vendor/assets/stylesheets/tools/_compatibility.scss +36 -0
- data/vendor/assets/stylesheets/tools/_exports.scss +33 -0
- data/vendor/assets/stylesheets/tools/_font-url.scss +25 -0
- data/vendor/assets/stylesheets/tools/_ie8.scss +51 -0
- data/vendor/assets/stylesheets/tools/_iff.scss +17 -0
- data/vendor/assets/stylesheets/tools/_image-url.scss +25 -0
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +20 -0
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +20 -0
- data/vendor/assets/stylesheets/utilities/_all.scss +2 -0
- data/vendor/assets/stylesheets/utilities/_clearfix.scss +5 -0
- data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +9 -0
- data/vendor/assets/stylesheets/vendor/_sass-mq.scss +347 -0
- metadata +520 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ad9f467369f4c3257b5fcd8377979b9abe00379cc0301089e936449d82e67b84
|
4
|
+
data.tar.gz: a55c17283f7109eaf083d5950ef7674ce5c0d9a78598ad138a9aa7c3ea95fc26
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eabaf004406d88814f2b9ef1a8f248e6e6f890198ecd4eb0d976a82c0c6dc17412631799fd192d27f651e584552fb4999f07b8b3e6a15ed1fc521b60d8e99695
|
7
|
+
data.tar.gz: 61a989ec0cff7c8b46941789582b4475682af4d06f6517c1e81c7528f3ff7859ff77e366a1217c8406f8f8d25436a3307eb4e1af6f5b2e3451e3a22e11e8c739
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
defra_ruby_template (3.13.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
rake (12.3.3)
|
10
|
+
|
11
|
+
PLATFORMS
|
12
|
+
ruby
|
13
|
+
x86_64-linux
|
14
|
+
|
15
|
+
DEPENDENCIES
|
16
|
+
defra_ruby_template!
|
17
|
+
rake (~> 12.0)
|
18
|
+
|
19
|
+
BUNDLED WITH
|
20
|
+
2.2.20
|
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# Defra Ruby Template
|
2
|
+
|
3
|
+
## About
|
4
|
+
|
5
|
+
Adds a GOV.UK-ready layout template and the [govuk_frontend assets](https://github.com/alphagov/govuk-frontend) to a Rails application.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to the application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'defra-ruby-template'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
The Rails application will need to have SCSS enabled (e.g. `sass-rails`).
|
22
|
+
|
23
|
+
This gem includes the `defra_ruby_template` layout, and can be included in a Rails project by adding the following to the default layout (e.g. `application.html.erb`)
|
24
|
+
|
25
|
+
```
|
26
|
+
|
27
|
+
<% content_for :page_title do %>
|
28
|
+
Page title or defaults to the i18n `global_proposition_header`
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<% content_for :head do %>
|
32
|
+
Stylesheets, Analytics, etc.
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% content_for :header_content do %>
|
36
|
+
Application name and top-level links
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<% content_for :phase_banner do %>
|
40
|
+
Phase banner, e.g Alpha, Beta, etc
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<% content_for :back_link do %>
|
44
|
+
Link to go back
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<% content_for :footer do %>
|
48
|
+
Application specific footer links
|
49
|
+
<% end %>
|
50
|
+
|
51
|
+
<%= render template: "layouts/defra_ruby_template" %>
|
52
|
+
|
53
|
+
```
|
54
|
+
|
55
|
+
|
56
|
+
## Updating the govuk-frontend
|
57
|
+
|
58
|
+
To update to the latest govuk-frontend files:
|
59
|
+
|
60
|
+
```
|
61
|
+
$ npm install govuk-frontend --save
|
62
|
+
$ rake
|
63
|
+
```
|
64
|
+
|
65
|
+
Then update the [`DefraRubyTemplate::Version`](https://github.com/DEFRA/defra-ruby-template/blob/main/lib/defra_ruby_template/version.rb) so that it matches the `govuk-frontend` [version](https://github.com/alphagov/govuk-frontend/tags).
|
66
|
+
|
67
|
+
|
68
|
+
## Contributing
|
69
|
+
|
70
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/DEFRA/defra-ruby-template.
|
71
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'defra_ruby_template/version'
|
5
|
+
|
6
|
+
task default: :assets
|
7
|
+
|
8
|
+
task 'assets' do
|
9
|
+
Rake::Task['stylesheets'].execute
|
10
|
+
Rake::Task['fonts'].execute
|
11
|
+
Rake::Task['images'].execute
|
12
|
+
Rake::Task['javascripts'].execute
|
13
|
+
end
|
14
|
+
|
15
|
+
task 'stylesheets' do
|
16
|
+
Rake::FileList['node_modules/govuk-frontend/govuk/**/*.scss'].each do |source|
|
17
|
+
target = source.sub('node_modules/govuk-frontend/govuk', 'vendor/assets/stylesheets')
|
18
|
+
mkdir_p(File.dirname(target))
|
19
|
+
copy_file source, target
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
task 'fonts' do
|
24
|
+
Rake::FileList[
|
25
|
+
'node_modules/govuk-frontend/govuk/assets/fonts/*.{eot,woff,woff2,ico,svg}'
|
26
|
+
].each do |source|
|
27
|
+
target = source.sub('node_modules/govuk-frontend/govuk', 'vendor')
|
28
|
+
mkdir_p(File.dirname(target))
|
29
|
+
copy_file source, target
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
task 'images' do
|
34
|
+
Rake::FileList[
|
35
|
+
'node_modules/govuk-frontend/govuk/assets/images/*.{png,gif,jpg,ico,svg}'
|
36
|
+
].each do |source|
|
37
|
+
target = source.sub('node_modules/govuk-frontend/govuk', 'vendor')
|
38
|
+
mkdir_p(File.dirname(target))
|
39
|
+
copy_file source, target
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
task 'javascripts' do
|
44
|
+
files = Rake::FileList['node_modules/govuk-frontend/govuk/all.js'].each do |source|
|
45
|
+
target = source.sub('node_modules/govuk-frontend/govuk', 'vendor/assets/javascripts')
|
46
|
+
target = target.sub('all.js', 'defra_ruby_template.js')
|
47
|
+
mkdir_p(File.dirname(target))
|
48
|
+
copy_file source, target
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en" class="govuk-template ">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title><%= content_for?(:page_title) ? yield(:page_title) : t(:global_proposition_header) %></title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
7
|
+
<meta name="theme-color" content="#0b0c0c">
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
9
|
+
|
10
|
+
<link rel="shortcut icon" href="<%= asset_path "favicon.ico" %>" type="image/x-icon" />
|
11
|
+
<link rel="mask-icon" href="<%= asset_path "govuk-logotype-crown.png" %>">
|
12
|
+
<link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path "govuk-apple-touch-icon-180x180.png" %>">
|
13
|
+
<link rel="apple-touch-icon" sizes="167x167" href="<%= asset_path "govuk-apple-touch-icon-167x167.png" %>">
|
14
|
+
<link rel="apple-touch-icon" sizes="152x152" href="<%= asset_path "govuk-apple-touch-icon-152x152.png" %>">
|
15
|
+
<link rel="apple-touch-icon" href="<%= asset_path "govuk-apple-touch-icon.png" %>">
|
16
|
+
|
17
|
+
<%= yield :head %>
|
18
|
+
<meta property="og:image" content="<%= asset_path "govuk-opengraph-image.png" %>">
|
19
|
+
</head>
|
20
|
+
|
21
|
+
<body class="govuk-template__body ">
|
22
|
+
<script>
|
23
|
+
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
|
24
|
+
</script>
|
25
|
+
|
26
|
+
<%= yield :cookies_banner %>
|
27
|
+
|
28
|
+
<a href="#main-content" class="govuk-skip-link">Skip to main content</a>
|
29
|
+
|
30
|
+
<header class="govuk-header " role="banner" data-module="govuk-header">
|
31
|
+
<div class="govuk-header__container govuk-width-container">
|
32
|
+
<div class="govuk-header__logo">
|
33
|
+
<a href="https://www.gov.uk" class="govuk-header__link govuk-header__link--homepage" title="Go to the GOV.UK homepage">
|
34
|
+
<span class="govuk-header__logotype">
|
35
|
+
<svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 97" height="30" width="36">
|
36
|
+
<path fill="currentColor" fill-rule="evenodd" 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.1l8.8-4.7c.3.3.6.7.9.9l-5 15.4v.1c-.2.8-.4 1.6-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-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"></path>
|
37
|
+
</svg>
|
38
|
+
<span class="govuk-header__logotype-text">
|
39
|
+
GOV.UK
|
40
|
+
</span>
|
41
|
+
</span>
|
42
|
+
</a>
|
43
|
+
</div>
|
44
|
+
<div class="govuk-header__content">
|
45
|
+
<%= yield :header_content %>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</header>
|
49
|
+
|
50
|
+
<div class="govuk-width-container app-width-container">
|
51
|
+
<%= yield :phase_banner %>
|
52
|
+
|
53
|
+
<%= yield :back_link %>
|
54
|
+
|
55
|
+
<main class="govuk-main-wrapper " id="main-content" role="main">
|
56
|
+
<%= yield %>
|
57
|
+
</main>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<footer class="govuk-footer " role="contentinfo">
|
61
|
+
<div class="govuk-width-container ">
|
62
|
+
<div class="govuk-footer__meta">
|
63
|
+
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
64
|
+
|
65
|
+
<%= yield :footer %>
|
66
|
+
|
67
|
+
<svg aria-hidden="true" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
|
68
|
+
<path fill="currentColor" 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" />
|
69
|
+
</svg>
|
70
|
+
<span class="govuk-footer__licence-description">
|
71
|
+
All content is available under the
|
72
|
+
<a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated
|
73
|
+
</span>
|
74
|
+
</div>
|
75
|
+
<div class="govuk-footer__meta-item">
|
76
|
+
<a class="govuk-footer__link govuk-footer__copyright-logo" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">© Crown copyright</a>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</footer>
|
81
|
+
<%= javascript_include_tag "application" %>
|
82
|
+
</body>
|
83
|
+
</html>
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "defra_ruby_template"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'lib/defra_ruby_template/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "defra_ruby_template"
|
5
|
+
spec.version = DefraRubyTemplate::VERSION
|
6
|
+
spec.authors = ["Toby Privett"]
|
7
|
+
spec.email = ["toby@snaplab.co.uk"]
|
8
|
+
|
9
|
+
spec.summary = "DEFRA Ruby Template"
|
10
|
+
spec.description = "Adds the GOVUK frontend to a Rails application that uses the Asset Pipeline."
|
11
|
+
spec.homepage = "https://github.com/DEFRA/defra-ruby-template"
|
12
|
+
spec.license = "The Open Government Licence (OGL) Version 3"
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
|
+
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "defra_ruby_template/version"
|
2
|
+
|
3
|
+
module DefraRubyTemplate
|
4
|
+
module Rails
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
initializer 'defra_ruby_template.assets.precompile' do |app|
|
7
|
+
app.config.assets.precompile <<
|
8
|
+
[
|
9
|
+
"favicon.ico",
|
10
|
+
"govuk-apple-touch-icon-152x152.png",
|
11
|
+
"govuk-apple-touch-icon-167x167.png",
|
12
|
+
"govuk-apple-touch-icon-180x180.png",
|
13
|
+
"govuk-apple-touch-icon.png",
|
14
|
+
"govuk-crest-2x.png",
|
15
|
+
"govuk-crest.png",
|
16
|
+
"govuk-logotype-crown.png",
|
17
|
+
"govuk-mask-icon.svg",
|
18
|
+
"govuk-opengraph-image.png",
|
19
|
+
]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# GOV.UK Frontend
|
2
|
+
|
3
|
+
GOV.UK Frontend contains the code you need to start building a user interface
|
4
|
+
for government platforms and services.
|
5
|
+
|
6
|
+
See live examples of GOV.UK Frontend components, and guidance on when to use
|
7
|
+
them in your service, in the [GOV.UK Design System](https://www.gov.uk/design-system).
|
8
|
+
|
9
|
+
## Contact the team
|
10
|
+
|
11
|
+
GOV.UK Frontend is maintained by a team at Government Digital Service. If you want to know more about GOV.UK Frontend, please email the [Design System
|
12
|
+
team](mailto:govuk-design-system-support@digital.cabinet-office.gov.uk) or get in touch with them on [Slack](https://ukgovernmentdigital.slack.com/messages/govuk-design-system).
|
13
|
+
|
14
|
+
## Quick start
|
15
|
+
|
16
|
+
There are 2 ways to start using GOV.UK Frontend in your app.
|
17
|
+
|
18
|
+
Once installed, you will be able to use the code from the examples in the
|
19
|
+
[GOV.UK Design System](https://www.gov.uk/design-system) in your service.
|
20
|
+
|
21
|
+
### 1. Install with npm (recommended)
|
22
|
+
|
23
|
+
We recommend [installing GOV.UK Frontend using node package manager
|
24
|
+
(npm)](https://frontend.design-system.service.gov.uk/installing-with-npm/).
|
25
|
+
|
26
|
+
### 2. Install by using compiled files
|
27
|
+
|
28
|
+
You can also [download the compiled and minified assets (CSS, JavaScript) from
|
29
|
+
GitHub](https://frontend.design-system.service.gov.uk/installing-from-dist/).
|
30
|
+
|
31
|
+
## Importing styles
|
32
|
+
|
33
|
+
You need to import the GOV.UK Frontend styles into the main Sass file in your
|
34
|
+
project. You should place the below code before your own Sass rules (or Sass
|
35
|
+
imports) if you want to override GOV.UK Frontend with your own styles.
|
36
|
+
|
37
|
+
To import add the below to your Sass file:
|
38
|
+
|
39
|
+
```scss
|
40
|
+
@import "node_modules/govuk-frontend/govuk/all";
|
41
|
+
```
|
42
|
+
|
43
|
+
[More details on importing styles](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#css)
|
44
|
+
|
45
|
+
## Importing JavaScript
|
46
|
+
|
47
|
+
Some of the JavaScript included in GOV.UK Frontend improves the usability and
|
48
|
+
accessibility of the components. You should make sure that you are importing and
|
49
|
+
initialising Javascript in your application to ensure that all users can use it successfully.
|
50
|
+
|
51
|
+
You can include Javascript for all components either by copying the `all.js` from `node_modules/govuk-frontend/govuk/` into your application or referencing the file directly:
|
52
|
+
|
53
|
+
```html
|
54
|
+
<script src="<path-to-govuk-frontend-all-file>/all.js"></script>
|
55
|
+
```
|
56
|
+
Next you need to initialise the script by adding:
|
57
|
+
|
58
|
+
```html
|
59
|
+
<script>window.GOVUKFrontend.initAll()</script>
|
60
|
+
```
|
61
|
+
|
62
|
+
[More details on importing Javascript and advanced options](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#javascript)
|
63
|
+
|
64
|
+
|
65
|
+
## Importing assets
|
66
|
+
|
67
|
+
In order to import GOV.UK Frontend images and fonts to your project, you should configure your application to reference or copy the relevant GOV.UK Frontend assets.
|
68
|
+
|
69
|
+
[More details on importing assets](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#font-and-image-assets)
|
70
|
+
|
71
|
+
|
72
|
+
## Getting updates
|
73
|
+
|
74
|
+
To be notified when there’s a new release, you can either:
|
75
|
+
|
76
|
+
- [watch the govuk-frontend Github repository](https://help.github.com/en/articles/watching-and-unwatching-repositories)
|
77
|
+
- join the [#govuk-design-system channel on cross-government Slack](https://ukgovernmentdigital.slack.com/app_redirect?channel=govuk-design-system)
|
78
|
+
|
79
|
+
Find out how to [update with npm](https://frontend.design-system.service.gov.uk/updating-with-npm/).
|
80
|
+
|
81
|
+
## Licence
|
82
|
+
|
83
|
+
Unless stated otherwise, the codebase is released under the MIT License. This
|
84
|
+
covers both the codebase and any sample code in the documentation. The
|
85
|
+
documentation is © Crown copyright and available under the terms of the
|
86
|
+
Open Government 3.0 licence.
|
87
|
+
|
88
|
+
## Contribution guidelines
|
89
|
+
|
90
|
+
If you want to help us build GOV.UK Frontend, view our [contribution
|
91
|
+
guidelines](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md).
|