govuk_tech_docs 3.5.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yaml +8 -4
- data/.github/workflows/test.yaml +11 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +21 -2
- data/example/.ruby-version +1 -1
- data/example/source/javascripts/govuk_frontend.js +1 -0
- data/govuk_tech_docs.gemspec +17 -11
- data/lib/assets/javascripts/_modules/page-expiry.js +2 -2
- data/lib/assets/javascripts/_modules/table-of-contents.js +48 -2
- data/lib/assets/javascripts/govuk_frontend_all.js +3 -0
- data/lib/assets/javascripts/govuk_tech_docs.js +0 -2
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +4 -10
- data/lib/assets/stylesheets/modules/_page-review.scss +0 -2
- data/lib/assets/stylesheets/modules/_search.scss +0 -4
- data/lib/govuk_tech_docs/meta_tags.rb +1 -1
- data/lib/govuk_tech_docs/redirects.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_builder.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +2 -2
- data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +6 -2
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/govuk_tech_docs.rb +20 -3
- data/lib/source/layouts/_header.erb +8 -12
- data/lib/source/layouts/_page_review.erb +1 -1
- data/lib/source/layouts/_search.erb +2 -2
- data/lib/source/layouts/core.erb +8 -2
- data/lib/source/stylesheets/manifest.css +1 -1
- data/node_modules/govuk-frontend/dist/govuk/_base.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +2554 -0
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +2529 -0
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +18 -0
- data/node_modules/govuk-frontend/dist/govuk/all.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-mask.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs +7 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +4 -0
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +159 -0
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +18 -0
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +31 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk/components/_all.scss → dist/govuk/components/_index.scss} +8 -3
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/accordion/_index.scss +55 -77
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +785 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +777 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +349 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/back-link/_index.scss +12 -36
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/breadcrumbs/_index.scss +11 -36
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/button/_index.scss +30 -103
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +318 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +310 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +73 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/character-count/_index.scss +8 -6
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +761 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +753 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +295 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/checkboxes/_index.scss +108 -132
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +268 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +260 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs +111 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/cookie-banner/_index.scss +19 -15
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/date-input/_index.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +139 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/error-message/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/error-summary/_index.scss +19 -6
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +378 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +370 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +103 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/exit-this-page/_index.scss +5 -10
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +662 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +654 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +226 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/fieldset/_index.scss +20 -15
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/file-upload/_index.scss +11 -15
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/footer/_index.scss +25 -68
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/header/_index.scss +84 -79
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +252 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +244 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +88 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/hint/_hint.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/hint/_index.scss +3 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/input/_index.scss +24 -49
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/input/_input.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/inset-text/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/label/_index.scss +12 -7
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/label/_label.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/notification-banner/_index.scss +11 -7
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +320 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +312 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +51 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/pagination/_index.scss +36 -55
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +58 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/panel/_panel.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +594 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +586 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +154 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/phase-banner/_index.scss +10 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/radios/_index.scss +92 -113
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +245 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +237 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs +88 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/select/_index.scss +9 -16
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +168 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +249 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +241 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +85 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/skip-link/_index.scss +10 -5
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +244 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +236 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +58 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/summary-list/_index.scss +22 -20
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/table/_index.scss +21 -17
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/table/_table.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tabs/_index.scss +13 -9
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tabs/_tabs.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +453 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +445 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +283 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +97 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tag/_tag.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +79 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/textarea/_index.scss +6 -10
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/warning-text/_index.scss +13 -13
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_global-styles.scss +2 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +12 -0
- data/node_modules/govuk-frontend/{govuk/core/_all.scss → dist/govuk/core/_index.scss} +3 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_links.scss +8 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_lists.scss +2 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_section-break.scss +2 -7
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_typography.scss +8 -5
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +57 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs +60 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_clearfix.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +127 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_device-pixels.scss +4 -3
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_focused.scss +22 -6
- data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_grid.scss +3 -1
- data/node_modules/govuk-frontend/{govuk/helpers/_all.scss → dist/govuk/helpers/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_links.scss +38 -76
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_media-queries.scss +3 -12
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_shape-arrow.scss +3 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_spacing.scss +12 -10
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +288 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_visually-hidden.scss +39 -50
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +195 -0
- data/node_modules/govuk-frontend/dist/govuk/index.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +162 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_button-group.scss +7 -12
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_form-group.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_grid.scss +4 -2
- data/node_modules/govuk-frontend/{govuk/objects/_all.scss → dist/govuk/objects/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_main-wrapper.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_template.scss +2 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_width-container.scss +2 -9
- data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +9 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_display.scss +2 -0
- data/node_modules/govuk-frontend/{govuk/overrides/_all.scss → dist/govuk/overrides/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_spacing.scss +3 -19
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_text-align.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +42 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_width.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_assets.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_colours-applied.scss +9 -7
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +378 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +37 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_global-styles.scss +2 -0
- data/node_modules/govuk-frontend/{govuk/settings/_all.scss → dist/govuk/settings/_index.scss} +2 -3
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_links.scss +3 -20
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_measurements.scss +18 -6
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_media-queries.scss +5 -3
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_spacing.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +52 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +322 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_warnings.scss +33 -8
- data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_exports.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_font-url.scss +3 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_image-url.scss +3 -0
- data/node_modules/govuk-frontend/{govuk/tools/_all.scss → dist/govuk/tools/_index.scss} +2 -2
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_px-to-em.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_px-to-rem.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/utilities/_clearfix.scss +2 -0
- data/node_modules/govuk-frontend/{govuk/utilities/_all.scss → dist/govuk/utilities/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/utilities/_visually-hidden.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/vendor/_sass-mq.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.js +15 -0
- data/node_modules/govuk-frontend/{govuk-prototype-kit → dist/govuk-prototype-kit}/init.scss +3 -2
- data/package-lock.json +37 -37
- data/package.json +6 -1
- metadata +316 -206
- data/node_modules/govuk-frontend/govuk/_base.scss +0 -3
- data/node_modules/govuk-frontend/govuk/all-ie8.scss +0 -14
- data/node_modules/govuk-frontend/govuk/all.js +0 -5172
- data/node_modules/govuk-frontend/govuk/all.scss +0 -9
- 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 +0 -7
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +0 -75
- data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +0 -17
- data/node_modules/govuk-frontend/govuk/common/index.js +0 -192
- data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +0 -386
- data/node_modules/govuk-frontend/govuk/common.js +0 -194
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +0 -2386
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/button/button.js +0 -1027
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +0 -2281
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +0 -1277
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -88
- data/node_modules/govuk-frontend/govuk/components/details/details.js +0 -873
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +0 -1189
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +0 -2120
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/header/header.js +0 -794
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +0 -843
- data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +0 -56
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +0 -1222
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +0 -1145
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +0 -1621
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -81
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +0 -2
- data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +0 -5
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +0 -98
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +0 -41
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +0 -214
- data/node_modules/govuk-frontend/govuk/i18n.js +0 -397
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -21
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +0 -146
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +0 -120
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -100
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +0 -34
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +0 -32
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +0 -112
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +0 -195
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +0 -50
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +0 -87
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +0 -274
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +0 -23
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +0 -36
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +0 -597
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +0 -58
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +0 -307
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +0 -33
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +0 -261
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +0 -261
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +0 -151
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +0 -512
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +0 -256
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +0 -96
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +0 -23
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +0 -30
- data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +0 -8
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/bold-affa96571d-v2.woff +0 -0
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- /data/{lib/source → node_modules/govuk-frontend/dist/govuk/assets/images}/favicon.ico +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dc850d9644bdfb68d0604fb1a6b9710e677d10efcb3ad7107b4ac592924931d
|
4
|
+
data.tar.gz: c6cf243d37b9e353ce4400dc2b9a5b521753ff3a56338fcb406f063205a01b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b270f50021512617508ed2204b67b87a5b329baf833ea6c3446eee3918d889c1553c2854faf0fcf250183c1b75d59125c7f325497215a5fd3ebd4670b0acdc6
|
7
|
+
data.tar.gz: 257a1b7a1d73f43ae716986ae98eea6bb8843eb06100a870691d6c3a0e7c26eecba849aef97d8b93c08a899724e8176384f0470b96c77b58b3c1bd8ff099cd2e
|
@@ -16,7 +16,9 @@ jobs:
|
|
16
16
|
go: ${{ steps.gem_version.outputs.new_version }}
|
17
17
|
|
18
18
|
steps:
|
19
|
-
- uses: actions/checkout@
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
with:
|
21
|
+
show-progress: false
|
20
22
|
|
21
23
|
- uses: ruby/setup-ruby@v1
|
22
24
|
with:
|
@@ -43,12 +45,14 @@ jobs:
|
|
43
45
|
contents: write # needed to be able to tag the release
|
44
46
|
runs-on: ubuntu-latest
|
45
47
|
needs: pre
|
46
|
-
if:
|
48
|
+
if: needs.pre.outputs.go == 'true'
|
47
49
|
|
48
50
|
steps:
|
49
|
-
- uses: actions/checkout@
|
51
|
+
- uses: actions/checkout@v4
|
52
|
+
with:
|
53
|
+
show-progress: false
|
50
54
|
|
51
|
-
- uses: actions/setup-node@
|
55
|
+
- uses: actions/setup-node@v4
|
52
56
|
with:
|
53
57
|
node-version-file: '.nvmrc'
|
54
58
|
cache: 'npm'
|
data/.github/workflows/test.yaml
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
name: Test
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
pull_request:
|
8
|
+
workflow_dispatch:
|
4
9
|
|
5
10
|
jobs:
|
6
11
|
test:
|
@@ -9,12 +14,14 @@ jobs:
|
|
9
14
|
|
10
15
|
strategy:
|
11
16
|
matrix:
|
12
|
-
ruby: ['
|
17
|
+
ruby: ['3.1', '3.2', '3.3']
|
13
18
|
|
14
19
|
steps:
|
15
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
21
|
+
with:
|
22
|
+
show-progress: false
|
16
23
|
|
17
|
-
- uses: actions/setup-node@
|
24
|
+
- uses: actions/setup-node@v4
|
18
25
|
with:
|
19
26
|
node-version-file: '.nvmrc'
|
20
27
|
cache: 'npm'
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,26 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
1
|
## Unreleased
|
4
2
|
|
3
|
+
## 4.0.0
|
4
|
+
|
5
|
+
### Breaking
|
6
|
+
- BREAKING: drop support for end-of-life Ruby versions 2.7 and 3.0. The minimum Ruby version is now 3.1.
|
7
|
+
- BREAKING: drop support for IE8
|
8
|
+
- Upgrade to govuk-frontend v5.7.1 and introduce new Javascript entry point
|
9
|
+
|
10
|
+
To upgrade you need to:
|
11
|
+
- create a `govuk_frontend.js` file your project’s `source/assets/javascripts` directory
|
12
|
+
- add `//= require govuk_frontend_all` into it
|
13
|
+
|
14
|
+
### Fixes
|
15
|
+
|
16
|
+
- Update gem dependencies.
|
17
|
+
- Declare some missing indirect dependencies to prepare for Ruby 3.4. This also resolves some warnings about this at build time.
|
18
|
+
- Remove aria-hidden from search label to let assistive technologies see its accessible name
|
19
|
+
- Use hidden attribute to show/hide expiry notices instead of just CSS
|
20
|
+
- Only use dialog role for table of contents when it behaves like one (accessibility fix)
|
21
|
+
- Prevent interactive elements being obscured by sticky table of contents header
|
22
|
+
- Only wrap images with alt text in hyperlinks
|
23
|
+
|
5
24
|
## 3.5.0
|
6
25
|
|
7
26
|
### New features
|
data/example/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.3.0
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require govuk_frontend_all
|
data/govuk_tech_docs.gemspec
CHANGED
@@ -7,7 +7,7 @@ require "govuk_tech_docs/version"
|
|
7
7
|
`npm install`
|
8
8
|
abort "npm install failed" unless $CHILD_STATUS.success?
|
9
9
|
|
10
|
-
unless File.exist?("node_modules/govuk-frontend/govuk/all.scss")
|
10
|
+
unless File.exist?("node_modules/govuk-frontend/dist/govuk/all.scss")
|
11
11
|
abort "govuk-frontend npm package not installed"
|
12
12
|
end
|
13
13
|
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
files_in_git = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
26
|
|
27
27
|
# Include assets from GOV.UK Frontend library in the distributed gem
|
28
|
-
govuk_frontend_assets = Dir["node_modules/govuk-frontend/**/*.{scss,js,woff,woff2,png,svg,ico}"]
|
28
|
+
govuk_frontend_assets = Dir["node_modules/govuk-frontend/**/*.{scss,js,mjs,woff,woff2,png,svg,ico}"]
|
29
29
|
|
30
30
|
spec.files = files_in_git + govuk_frontend_assets
|
31
31
|
|
@@ -33,26 +33,32 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
34
|
spec.require_paths = %w[lib]
|
35
35
|
|
36
|
-
spec.required_ruby_version = ">=
|
36
|
+
spec.required_ruby_version = ">= 3.1.0"
|
37
37
|
|
38
38
|
spec.add_dependency "autoprefixer-rails", "~> 10.2"
|
39
|
+
spec.add_dependency "base64" # TODO: remove once middleman-sprockets declares this itself.
|
40
|
+
spec.add_dependency "bigdecimal" # TODO: remove once activesupport declares this itself.
|
39
41
|
spec.add_dependency "chronic", "~> 0.10.2"
|
40
|
-
spec.add_dependency "
|
42
|
+
spec.add_dependency "csv" # TODO: remove once tilt declares this itself.
|
43
|
+
spec.add_dependency "haml", "~> 6.0"
|
41
44
|
spec.add_dependency "middleman", "~> 4.0"
|
42
|
-
spec.add_dependency "middleman-autoprefixer", "~> 2.10
|
43
|
-
spec.add_dependency "middleman-compass", "
|
45
|
+
spec.add_dependency "middleman-autoprefixer", "~> 2.10"
|
46
|
+
spec.add_dependency "middleman-compass", "~> 4.0"
|
44
47
|
spec.add_dependency "middleman-livereload"
|
45
48
|
spec.add_dependency "middleman-search-gds"
|
46
49
|
spec.add_dependency "middleman-sprockets", "~> 4.0.0"
|
47
|
-
spec.add_dependency "middleman-syntax", "~> 3.
|
50
|
+
spec.add_dependency "middleman-syntax", "~> 3.4"
|
51
|
+
spec.add_dependency "mutex_m" # TODO: remove once activesupport declares this itself.
|
48
52
|
spec.add_dependency "nokogiri"
|
49
53
|
spec.add_dependency "openapi3_parser", "~> 0.9.0"
|
50
|
-
spec.add_dependency "redcarpet", "~> 3.
|
54
|
+
spec.add_dependency "redcarpet", "~> 3.6"
|
55
|
+
spec.add_dependency "terser", "~> 1.2.3"
|
56
|
+
spec.add_dependency "sassc-embedded", "~> 1.78.0"
|
51
57
|
|
52
58
|
spec.add_development_dependency "byebug"
|
53
59
|
spec.add_development_dependency "capybara", "~> 3.32"
|
54
|
-
spec.add_development_dependency "jasmine", "~> 3.5
|
60
|
+
spec.add_development_dependency "jasmine", "~> 3.5"
|
55
61
|
spec.add_development_dependency "rake", "~> 13.0"
|
56
|
-
spec.add_development_dependency "rspec", "~> 3.9
|
57
|
-
spec.add_development_dependency "rubocop-govuk", "~> 4.10
|
62
|
+
spec.add_development_dependency "rspec", "~> 3.9"
|
63
|
+
spec.add_development_dependency "rubocop-govuk", "~> 4.10"
|
58
64
|
end
|
@@ -7,8 +7,8 @@
|
|
7
7
|
var isExpired = Date.parse(rawDate) < new Date()
|
8
8
|
|
9
9
|
if (isExpired) {
|
10
|
-
$element.find('.page-expiry--not-expired').
|
11
|
-
$element.find('.page-expiry--expired').
|
10
|
+
$element.find('.page-expiry--not-expired').attr('hidden', '')
|
11
|
+
$element.find('.page-expiry--expired').removeAttr('hidden')
|
12
12
|
}
|
13
13
|
}
|
14
14
|
}
|
@@ -1,6 +1,41 @@
|
|
1
1
|
(function ($, Modules) {
|
2
2
|
'use strict'
|
3
3
|
|
4
|
+
// Most of the code below is gratefully taken from:
|
5
|
+
// https://www.tpgi.com/prevent-focused-elements-from-being-obscured-by-sticky-headers/
|
6
|
+
var StickyOverlapMonitors = function ($sticky) {
|
7
|
+
this.$sticky = $sticky
|
8
|
+
this.offset = 0
|
9
|
+
this.onFocus = this.showObscured.bind(this)
|
10
|
+
this.isMonitoring = false
|
11
|
+
}
|
12
|
+
StickyOverlapMonitors.prototype.run = function () {
|
13
|
+
var stickyIsVisible = this.$sticky.length > 0 && this.$sticky.is(':visible')
|
14
|
+
if (stickyIsVisible && !this.isMonitoring) {
|
15
|
+
document.addEventListener('focus', this.onFocus, true)
|
16
|
+
this.isMonitoring = true
|
17
|
+
}
|
18
|
+
if (!stickyIsVisible && this.isMonitoring) {
|
19
|
+
document.removeEventListener('focus', this.onFocus, true)
|
20
|
+
this.isMonitoring = false
|
21
|
+
}
|
22
|
+
}
|
23
|
+
StickyOverlapMonitors.prototype.showObscured = function () {
|
24
|
+
var focused = document.activeElement || document.body
|
25
|
+
var applicable = focused !== document.body
|
26
|
+
|
27
|
+
if (!applicable) { return }
|
28
|
+
|
29
|
+
if (this.$sticky && this.$sticky.is(':visible') && this.$sticky.get(0)) {
|
30
|
+
var stickyEdge = this.$sticky.get(0).getBoundingClientRect().bottom + this.offset
|
31
|
+
var diff = focused.getBoundingClientRect().top - stickyEdge
|
32
|
+
|
33
|
+
if (diff < 0) {
|
34
|
+
$(window).scrollTop($(window).scrollTop() + diff)
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
4
39
|
Modules.TableOfContents = function () {
|
5
40
|
var $html = $('html')
|
6
41
|
|
@@ -10,6 +45,8 @@
|
|
10
45
|
var $openButton
|
11
46
|
var $closeButton
|
12
47
|
|
48
|
+
var stickyOverlapMonitors
|
49
|
+
|
13
50
|
this.start = function ($element) {
|
14
51
|
$toc = $element
|
15
52
|
$tocList = $toc.find('.js-toc-list')
|
@@ -19,6 +56,8 @@
|
|
19
56
|
|
20
57
|
fixRubberBandingInIOS()
|
21
58
|
updateAriaAttributes()
|
59
|
+
stickyOverlapMonitors = new StickyOverlapMonitors($('.fixedsticky'))
|
60
|
+
stickyOverlapMonitors.run()
|
22
61
|
|
23
62
|
// Need delegated handler for show link as sticky polyfill recreates element
|
24
63
|
$openButton.on('click.toc', preventingScrolling(openNavigation))
|
@@ -27,7 +66,10 @@
|
|
27
66
|
|
28
67
|
// Allow aria hidden to be updated when resizing from mobile to desktop or
|
29
68
|
// vice versa
|
30
|
-
$(window).on('resize.toc',
|
69
|
+
$(window).on('resize.toc', function () {
|
70
|
+
updateAriaAttributes()
|
71
|
+
stickyOverlapMonitors.run()
|
72
|
+
})
|
31
73
|
|
32
74
|
$(document).on('keydown.toc', function (event) {
|
33
75
|
var ESC_KEY = 27
|
@@ -80,11 +122,15 @@
|
|
80
122
|
|
81
123
|
function updateAriaAttributes () {
|
82
124
|
var tocIsVisible = $toc.is(':visible')
|
125
|
+
var openButtonIsVisible = $openButton.is(':visible')
|
83
126
|
|
84
127
|
$($openButton).add($closeButton)
|
85
128
|
.attr('aria-expanded', tocIsVisible ? 'true' : 'false')
|
86
129
|
|
87
|
-
$toc.attr(
|
130
|
+
$toc.attr({
|
131
|
+
'aria-hidden': tocIsVisible ? 'false' : 'true',
|
132
|
+
role: openButtonIsVisible ? 'dialog' : null
|
133
|
+
})
|
88
134
|
}
|
89
135
|
|
90
136
|
function preventingScrolling (callback) {
|
@@ -11,8 +11,8 @@ $govuk-assets-path: "/assets/govuk/assets/" !default;
|
|
11
11
|
$govuk-new-link-styles: true;
|
12
12
|
@import "govuk/base";
|
13
13
|
|
14
|
-
@import "govuk/core/
|
15
|
-
@import "govuk/objects/
|
14
|
+
@import "govuk/core/index";
|
15
|
+
@import "govuk/objects/index";
|
16
16
|
|
17
17
|
@import "govuk/components/footer/index";
|
18
18
|
@import "govuk/components/header/index";
|
@@ -22,14 +22,8 @@ $govuk-new-link-styles: true;
|
|
22
22
|
@import "govuk/components/skip-link/index";
|
23
23
|
@import "govuk/components/warning-text/index";
|
24
24
|
|
25
|
-
@import "govuk/utilities/
|
26
|
-
@import "govuk/overrides/
|
25
|
+
@import "govuk/utilities/index";
|
26
|
+
@import "govuk/overrides/index";
|
27
27
|
|
28
28
|
@import "core";
|
29
29
|
@import "vendor/fixedsticky";
|
30
|
-
|
31
|
-
// manual Tudor Crown spacing adjustment from govuk-frontend 4.8
|
32
|
-
.govuk-header__logotype-crown[width="32"] {
|
33
|
-
top: -3px;
|
34
|
-
margin-right: 2px;
|
35
|
-
}
|
@@ -45,10 +45,6 @@ $input-size: 40px;
|
|
45
45
|
outline: $govuk-focus-width solid $govuk-focus-colour;
|
46
46
|
outline-offset: 0;
|
47
47
|
box-shadow: inset 0 0 0 $govuk-border-width-form-element * 2 govuk-colour("black");
|
48
|
-
|
49
|
-
@include govuk-if-ie8 {
|
50
|
-
border-width: $govuk-border-width-form-element * 2;
|
51
|
-
}
|
52
48
|
}
|
53
49
|
}
|
54
50
|
|
@@ -12,7 +12,7 @@ module GovukTechDocs
|
|
12
12
|
|
13
13
|
def single_page_table_of_contents(html, url: "", max_level: nil)
|
14
14
|
output = "<ul>\n"
|
15
|
-
output += list_items_from_headings(html, url
|
15
|
+
output += list_items_from_headings(html, url:, max_level:)
|
16
16
|
output += "</ul>\n"
|
17
17
|
|
18
18
|
output
|
@@ -36,7 +36,7 @@ module GovukTechDocs
|
|
36
36
|
end
|
37
37
|
|
38
38
|
tree = HeadingTreeBuilder.new(headings).tree
|
39
|
-
HeadingTreeRenderer.new(tree, max_level:
|
39
|
+
HeadingTreeRenderer.new(tree, max_level:).html
|
40
40
|
end
|
41
41
|
|
42
42
|
def render_page_tree(resources, current_page, config, current_page_html)
|
@@ -19,8 +19,12 @@ module GovukTechDocs
|
|
19
19
|
%(<h#{level} id="#{anchor}">#{text}</h#{level}>\n)
|
20
20
|
end
|
21
21
|
|
22
|
-
def image(link,
|
23
|
-
|
22
|
+
def image(link, title, alt_text)
|
23
|
+
if alt_text && !alt_text.strip.empty?
|
24
|
+
%(<a href="#{link}" rel="noopener noreferrer">#{super}</a>)
|
25
|
+
else
|
26
|
+
super
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
def table(header, body)
|
data/lib/govuk_tech_docs.rb
CHANGED
@@ -10,6 +10,8 @@ require "middleman-search"
|
|
10
10
|
require "nokogiri"
|
11
11
|
require "chronic"
|
12
12
|
require "active_support/all"
|
13
|
+
require "terser"
|
14
|
+
require "sassc-embedded"
|
13
15
|
|
14
16
|
require "govuk_tech_docs/redirects"
|
15
17
|
require "govuk_tech_docs/table_of_contents/helpers"
|
@@ -23,6 +25,18 @@ require "govuk_tech_docs/unique_identifier_generator"
|
|
23
25
|
require "govuk_tech_docs/warning_text_extension"
|
24
26
|
require "govuk_tech_docs/api_reference/api_reference_extension"
|
25
27
|
|
28
|
+
module SassWarningSupressor
|
29
|
+
def warn(message)
|
30
|
+
if message.to_s.match?(/Sass|dart-sass/i)
|
31
|
+
# suppress dart sass warnings
|
32
|
+
else
|
33
|
+
super
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
Warning.extend(SassWarningSupressor)
|
39
|
+
|
26
40
|
module GovukTechDocs
|
27
41
|
# Configure the tech docs template
|
28
42
|
#
|
@@ -32,7 +46,7 @@ module GovukTechDocs
|
|
32
46
|
def self.configure(context, options = {})
|
33
47
|
context.activate :sprockets
|
34
48
|
|
35
|
-
context.sprockets.append_path File.join(__dir__, "../node_modules/govuk-frontend/")
|
49
|
+
context.sprockets.append_path File.join(__dir__, "../node_modules/govuk-frontend/dist")
|
36
50
|
context.sprockets.append_path File.join(__dir__, "./source")
|
37
51
|
|
38
52
|
context.activate :syntax
|
@@ -44,12 +58,15 @@ module GovukTechDocs
|
|
44
58
|
renderer: TechDocsHTMLRenderer.new(
|
45
59
|
with_toc_data: true,
|
46
60
|
api: true,
|
47
|
-
context
|
61
|
+
context:,
|
48
62
|
),
|
49
63
|
fenced_code_blocks: true,
|
50
64
|
tables: true,
|
51
65
|
no_intra_emphasis: true
|
52
66
|
|
67
|
+
# this doesnt seem to work
|
68
|
+
context.set :sass, { output_style: "nested", quiet_deps: true }
|
69
|
+
|
53
70
|
# Reload the browser automatically whenever files change
|
54
71
|
context.configure :development do
|
55
72
|
activate :livereload, options[:livereload].to_h
|
@@ -57,7 +74,7 @@ module GovukTechDocs
|
|
57
74
|
|
58
75
|
context.configure :build do
|
59
76
|
activate :autoprefixer
|
60
|
-
activate :minify_javascript, ignore: ["/raw_assets/*"]
|
77
|
+
activate :minify_javascript, compressor: Terser.new, ignore: ["/raw_assets/*"]
|
61
78
|
end
|
62
79
|
|
63
80
|
config_file = ENV.fetch("CONFIG_FILE", "config/tech-docs.yml")
|
@@ -8,22 +8,18 @@
|
|
8
8
|
<% end %>
|
9
9
|
<% if config[:tech_docs][:show_govuk_logo] %>
|
10
10
|
<svg
|
11
|
-
aria-hidden="true"
|
12
11
|
focusable="false"
|
13
|
-
|
12
|
+
role="img"
|
13
|
+
class="govuk-header__logotype"
|
14
14
|
xmlns="http://www.w3.org/2000/svg"
|
15
|
-
viewBox="0 0
|
15
|
+
viewBox="0 0 148 30"
|
16
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5-.6-1.1-1.1-1.7-1.4-.7-.3-1.5-.5-2.4-.5s-1.7.2-2.4.5-1.3.8-1.7 1.4c-.5.6-.8 1.3-1.1 2.2-.2.8-.4 1.7-.4 2.7v.1c0 1 .1 1.9.4 2.7.2.8.6 1.6 1.1 2.2.5.6 1.1 1.1 1.7 1.4.6.3 1.4.5 2.4.5zM88.9 28 83 7h4.7l4 15.7h.1l4-15.7h4.7l-5.9 21h-5.7zm28.8-3.6c.6 0 1.2-.1 1.7-.3.5-.2 1-.4 1.4-.8.4-.4.7-.8.9-1.4.2-.6.3-1.2.3-2v-13h4.1v13.6c0 1.2-.2 2.2-.6 3.1s-1 1.7-1.8 2.4c-.7.7-1.6 1.2-2.7 1.5-1 .4-2.2.5-3.4.5-1.2 0-2.4-.2-3.4-.5-1-.4-1.9-.9-2.7-1.5-.8-.7-1.3-1.5-1.8-2.4-.4-.9-.6-2-.6-3.1V6.9h4.2v13c0 .8.1 1.4.3 2 .2.6.5 1 .9 1.4.4.4.8.6 1.4.8.6.2 1.1.3 1.8.3zm13-17.4h4.2v9.1l7.4-9.1h5.2l-7.2 8.4L148 28h-4.9l-5.5-9.4-2.7 3V28h-4.2V7zm-27.6 16.1c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7z"></path>
|
22
22
|
</svg>
|
23
|
-
<span class="govuk-header__logotype-text">
|
24
|
-
GOV.UK
|
25
|
-
</span>
|
26
|
-
</span>
|
27
23
|
<% end %>
|
28
24
|
<span class="govuk-header__product-name">
|
29
25
|
<%= config[:tech_docs][:service_name] %>
|
@@ -40,7 +36,7 @@
|
|
40
36
|
<% if config[:tech_docs][:header_links] %>
|
41
37
|
<div class="govuk-header__content">
|
42
38
|
<nav class="govuk-header__navigation govuk-header__navigation--end" aria-label="Menu">
|
43
|
-
<button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation"
|
39
|
+
<button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" hidden>Menu</button>
|
44
40
|
<ul id="navigation" class="govuk-header__navigation-list">
|
45
41
|
<% config[:tech_docs][:header_links].each do |title, path| %>
|
46
42
|
<li class="govuk-header__navigation-item<% if active_page(path) %> govuk-header__navigation-item--active<% end %>">
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<% if current_page_review.show_expiry? %>
|
15
|
-
<div class='page-expiry--expired'>
|
15
|
+
<div class='page-expiry--expired' hidden>
|
16
16
|
This page was set to be reviewed before <%= format_date current_page_review.review_by %><% if current_page_review.owner_slack %>
|
17
17
|
by the page owner <%= link_to current_page_review.owner_slack, current_page_review.owner_slack_url %><% end %>.
|
18
18
|
This might mean the content is out of date.
|
@@ -2,11 +2,11 @@
|
|
2
2
|
<div class="search" data-module="search" data-path-to-site-root="<%= path_to_site_root config, current_page.path %>">
|
3
3
|
<form action="https://www.google.co.uk/search" method="get" role="search" class="search__form govuk-!-margin-bottom-4">
|
4
4
|
<input type="hidden" name="as_sitesearch" value="<%= config[:tech_docs][:host] %>"/>
|
5
|
-
<label class="govuk-label search__label" for="search"
|
5
|
+
<label class="govuk-label search__label" for="search">
|
6
6
|
Search (via Google)
|
7
7
|
</label>
|
8
8
|
<input
|
9
|
-
type="
|
9
|
+
type="search"
|
10
10
|
id="search" name="q"
|
11
11
|
class="govuk-input govuk-!-margin-bottom-0 search__input"
|
12
12
|
aria-controls="search-results"
|
data/lib/source/layouts/core.erb
CHANGED
@@ -10,6 +10,11 @@
|
|
10
10
|
<%= stylesheet_link_tag :manifest %>
|
11
11
|
|
12
12
|
<link rel="canonical" href="<%= meta_tags.canonical_url %>">
|
13
|
+
<link rel="icon" sizes="48x48" href="/assets/govuk/assets/images/favicon.ico">
|
14
|
+
<link rel="icon" sizes="any" href="/assets/govuk/assets/images/favicon.svg" type="image/svg+xml">
|
15
|
+
<link rel="mask-icon" href="/assets/govuk/assets/images/govuk-icon-mask.svg" color="#0b0c0c">
|
16
|
+
<link rel="apple-touch-icon" href="/assets/govuk/assets/images/govuk-icon-180.png">
|
17
|
+
<link rel="manifest" href="/assets/govuk/assets/manifest.json">
|
13
18
|
|
14
19
|
<% meta_tags.tags.each do |name, content| %>
|
15
20
|
<%= tag :meta, name: name, content: content %>
|
@@ -23,7 +28,7 @@
|
|
23
28
|
</head>
|
24
29
|
|
25
30
|
<body class="govuk-template__body">
|
26
|
-
<script>document.body.className
|
31
|
+
<script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script>
|
27
32
|
|
28
33
|
<div class="app-pane">
|
29
34
|
<div class="app-pane__header toc-open-disabled">
|
@@ -43,7 +48,7 @@
|
|
43
48
|
<div class="app-pane__body"<%= " data-module=\"#{yield_content(:toc_module)}\"" if content_for? :toc_module %>>
|
44
49
|
<% if content_for? :sidebar %>
|
45
50
|
<div class="app-pane__toc">
|
46
|
-
<div class="toc" data-module="table-of-contents" tabindex="-1" aria-label="Table of contents"
|
51
|
+
<div class="toc" data-module="table-of-contents" tabindex="-1" aria-label="Table of contents">
|
47
52
|
<%= partial "layouts/search" %>
|
48
53
|
<button type="button" class="toc__close js-toc-close" aria-controls="toc" aria-label="Hide table of contents"></button>
|
49
54
|
<nav id="toc" class="js-toc-list toc__list" aria-labelledby="toc-heading"<%= " data-module=\"collapsible-navigation\"" if config[:tech_docs][:collapsible_nav] %>>
|
@@ -75,6 +80,7 @@
|
|
75
80
|
</div>
|
76
81
|
|
77
82
|
<%= partial 'layouts/analytics' %>
|
83
|
+
<%= javascript_include_tag :govuk_frontend, :type => "module" %>
|
78
84
|
<%= javascript_include_tag :application %>
|
79
85
|
</body>
|
80
86
|
</html>
|