govuk_publishing_components 23.3.0 → 23.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/copy-to-clipboard.js +16 -14
- data/app/assets/javascripts/govuk_publishing_components/components/details.js +38 -34
- data/app/assets/javascripts/govuk_publishing_components/components/print-link.js +8 -7
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +10 -9
- data/app/assets/javascripts/govuk_publishing_components/lib/initial-focus.js +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +0 -46
- data/app/assets/stylesheets/govuk_publishing_components/components/_transition-countdown.scss +125 -0
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +5 -4
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +14 -1
- data/app/views/govuk_publishing_components/components/_input.html.erb +6 -6
- data/app/views/govuk_publishing_components/components/_transition_countdown.html.erb +34 -0
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +10 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -1
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +55 -0
- data/app/views/govuk_publishing_components/components/docs/transition_countdown.yml +17 -0
- data/config/locales/cy.yml +9 -1
- data/config/locales/en.yml +7 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/app_helpers/countdown_helper.rb +33 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/govuk/all.js +31 -37
- data/node_modules/govuk-frontend/govuk/components/accordion/README.md +1 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +235 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +56 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +172 -0
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -3
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +275 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +170 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +13 -13
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1015 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +499 -0
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +83 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +66 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +181 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +1 -1
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +93 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +6 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +5 -1
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +151 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +482 -0
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +2 -5
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +360 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +13 -1
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +9 -5
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +50 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +91 -0
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +538 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +64 -0
- data/node_modules/govuk-frontend/govuk/components/input/template.njk +17 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +49 -0
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +75 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +6 -2
- data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +74 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +65 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +13 -13
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1066 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +248 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +72 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +1 -1
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +2 -10
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +991 -0
- data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +468 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +3 -6
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +229 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +117 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +199 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +0 -1
- data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +68 -0
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -3
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -5
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +2 -1
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +7 -6
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +0 -1
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +2 -3
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +0 -1
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +1 -1
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +1 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +0 -3
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +9 -2
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +0 -4
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +11 -5
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +0 -3
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +0 -3
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
- data/node_modules/govuk-frontend/package.json +1 -1
- metadata +36 -3
- data/app/assets/javascripts/govuk_publishing_components/components/initial-focus.js +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a97fad3ed17572d72aa4904dec96a13f48732b2c740f017dd8ac3a8c9ef9d93
|
4
|
+
data.tar.gz: 429048afab20b2b89b342024d4681ccccfb4c7706d1e09051cfdf6c47af1066d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f51d92a980b602c69168a506866f2a496c4ea85558de991083ba09a3c7c054a50486dd8169bcb74f61ffa279066bbbf0e6d2a367c6d457f1f89ede11fff78423
|
7
|
+
data.tar.gz: d32c3132330f198be910b85ca88fdbf96c061a5fb5e2520eedd741ff03ea1af0072823e45d654ade08a84ae8a9ac9aedfbea80bc1a41156dda99d987a6fbd638
|
@@ -2,22 +2,24 @@ window.GOVUK = window.GOVUK || {}
|
|
2
2
|
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
3
3
|
|
4
4
|
(function (Modules) {
|
5
|
-
|
5
|
+
function CopyToClipboard () { }
|
6
6
|
|
7
|
-
|
8
|
-
this
|
9
|
-
var input = element[0].querySelector('.gem-c-input')
|
10
|
-
var copyButton = element[0].querySelector('.gem-c-button')
|
7
|
+
CopyToClipboard.prototype.start = function ($module) {
|
8
|
+
this.$module = $module[0]
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
})
|
10
|
+
var input = this.$module.querySelector('.gem-c-input')
|
11
|
+
var copyButton = this.$module.querySelector('.gem-c-button')
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
input.addEventListener('click', function () {
|
14
|
+
input.select()
|
15
|
+
})
|
16
|
+
|
17
|
+
copyButton.addEventListener('click', function (event) {
|
18
|
+
event.preventDefault()
|
19
|
+
input.select()
|
20
|
+
document.execCommand('copy')
|
21
|
+
})
|
22
22
|
}
|
23
|
+
|
24
|
+
Modules.CopyToClipboard = CopyToClipboard
|
23
25
|
})(window.GOVUK.Modules)
|
@@ -4,47 +4,51 @@ window.GOVUK = window.GOVUK || {}
|
|
4
4
|
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
5
5
|
|
6
6
|
(function (Modules) {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
this
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
})
|
27
|
-
}
|
7
|
+
function GovukDetails () { }
|
8
|
+
|
9
|
+
GovukDetails.prototype.start = function ($module) {
|
10
|
+
this.$module = $module[0]
|
11
|
+
|
12
|
+
var customTrackLabel = this.$module.getAttribute('data-track-label')
|
13
|
+
|
14
|
+
// If a custom label has been provided, we can simply call the tracking module
|
15
|
+
if (customTrackLabel) {
|
16
|
+
var trackDetails = new window.GOVUK.Modules.TrackClick()
|
17
|
+
trackDetails.start($module)
|
18
|
+
} else {
|
19
|
+
// If no custom label is set, we use the open/close status as the label
|
20
|
+
var detailsClick = this.$module.querySelector('[data-details-track-click]')
|
21
|
+
|
22
|
+
if (detailsClick) {
|
23
|
+
detailsClick.addEventListener('click', function (event) {
|
24
|
+
this.trackDefault(this.$module)
|
25
|
+
}.bind(this))
|
28
26
|
}
|
29
27
|
}
|
28
|
+
}
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
30
|
+
GovukDetails.prototype.trackDefault = function (element) {
|
31
|
+
if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
|
32
|
+
var componentStatus = (element.getAttribute('open') == null) ? 'open' : 'closed'
|
33
|
+
var trackCategory = element.getAttribute('data-track-category')
|
34
|
+
var trackAction = element.getAttribute('data-track-action')
|
35
|
+
var trackOptions = element.getAttribute('data-track-options')
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
if (trackOptions) {
|
38
|
+
trackOptions = JSON.parse(trackOptions)
|
39
|
+
}
|
40
|
+
|
41
|
+
if (typeof trackOptions !== 'object' || trackOptions === null) {
|
42
|
+
trackOptions = {}
|
43
|
+
}
|
41
44
|
|
42
|
-
|
45
|
+
trackOptions.label = componentStatus
|
43
46
|
|
44
|
-
|
45
|
-
|
46
|
-
}
|
47
|
+
if (trackAction && trackCategory) {
|
48
|
+
window.GOVUK.analytics.trackEvent(trackCategory, trackAction, trackOptions)
|
47
49
|
}
|
48
50
|
}
|
49
51
|
}
|
52
|
+
|
53
|
+
Modules.GovukDetails = GovukDetails
|
50
54
|
})(window.GOVUK.Modules)
|
@@ -2,13 +2,14 @@ window.GOVUK = window.GOVUK || {}
|
|
2
2
|
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
3
3
|
|
4
4
|
(function (Modules) {
|
5
|
-
|
5
|
+
function PrintLink () { }
|
6
6
|
|
7
|
-
|
8
|
-
this
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
7
|
+
PrintLink.prototype.start = function ($module) {
|
8
|
+
this.$module = $module[0]
|
9
|
+
this.$module.addEventListener('click', function () {
|
10
|
+
window.print()
|
11
|
+
})
|
13
12
|
}
|
13
|
+
|
14
|
+
Modules.PrintLink = PrintLink
|
14
15
|
})(window.GOVUK.Modules)
|
@@ -49,8 +49,9 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
49
49
|
|
50
50
|
// true if it's a 'multiple' table
|
51
51
|
// this means multiple bars per rows, but not stacked.
|
52
|
-
var
|
53
|
-
|
52
|
+
var moreThanTwoCells = this.$table.querySelectorAll('tbody tr')[0].querySelectorAll('th, td').length > 2
|
53
|
+
|
54
|
+
this.options.multiple = !this.options.stacked && (this.$table.classList.contains('mc-multiple') || moreThanTwoCells)
|
54
55
|
|
55
56
|
// set the outdent options
|
56
57
|
// which can be set via classes or overriden by setting the value to true
|
@@ -118,11 +119,11 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
118
119
|
tr.classList.add('mc-tr')
|
119
120
|
|
120
121
|
var output = ''
|
121
|
-
var
|
122
|
+
var allTheTHsInTableHead = this.$table.querySelectorAll('thead th')
|
122
123
|
|
123
|
-
for (var i = 0; i <
|
124
|
+
for (var i = 0; i < allTheTHsInTableHead.length; i++) {
|
124
125
|
output += '<div class="mc-th">'
|
125
|
-
output +=
|
126
|
+
output += allTheTHsInTableHead[i].innerHTML
|
126
127
|
output += '</div>'
|
127
128
|
}
|
128
129
|
|
@@ -143,11 +144,11 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
143
144
|
tr.classList.add('mc-tr')
|
144
145
|
|
145
146
|
var cellsOutput = ''
|
146
|
-
var
|
147
|
+
var allTheTableBodyCells = allTheTbodyTrs[i].querySelectorAll('th, td')
|
147
148
|
|
148
|
-
for (var j = 0; j <
|
149
|
+
for (var j = 0; j < allTheTableBodyCells.length; j++) {
|
149
150
|
cellsOutput += '<div class="mc-td">'
|
150
|
-
cellsOutput +=
|
151
|
+
cellsOutput += allTheTableBodyCells[j].innerHTML
|
151
152
|
cellsOutput += '</div>'
|
152
153
|
}
|
153
154
|
tr.innerHTML = cellsOutput
|
@@ -412,7 +413,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
412
413
|
}
|
413
414
|
} else {
|
414
415
|
// if it's a stacked graph
|
415
|
-
if (spanWidth > cellWidth && cellVal > 0) {
|
416
|
+
if ((spanWidth > cellWidth && cellVal > 0) || (cellVal < 1)) {
|
416
417
|
$cell.classList.add('mc-value-overflow')
|
417
418
|
}
|
418
419
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
window.GOVUK = window.GOVUK || {}
|
2
|
+
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
3
|
+
|
4
|
+
(function (Modules) {
|
5
|
+
function InitialFocus () { }
|
6
|
+
|
7
|
+
InitialFocus.prototype.start = function ($module) {
|
8
|
+
this.$module = $module[0]
|
9
|
+
this.$module.focus()
|
10
|
+
}
|
11
|
+
|
12
|
+
Modules.InitialFocus = InitialFocus
|
13
|
+
})(window.GOVUK.Modules)
|
@@ -18,49 +18,3 @@
|
|
18
18
|
padding-left: govuk-spacing(6);
|
19
19
|
}
|
20
20
|
}
|
21
|
-
|
22
|
-
.gem-c-input__wrapper {
|
23
|
-
display: flex;
|
24
|
-
display: -ms-flexbox;
|
25
|
-
|
26
|
-
.gem-c-input {
|
27
|
-
display: inline-block;
|
28
|
-
flex: 0 1 auto;
|
29
|
-
}
|
30
|
-
|
31
|
-
.gem-c-input:focus {
|
32
|
-
z-index: 1; // increase z-index on focus so it appears over the suffix
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
.gem-c-input__prefix,
|
37
|
-
.gem-c-input__suffix {
|
38
|
-
@include govuk-font($size: 19);
|
39
|
-
|
40
|
-
background-color: govuk-colour("light-grey", $legacy: "grey-3");
|
41
|
-
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
|
42
|
-
box-sizing: border-box;
|
43
|
-
cursor: default; // emphasise non-editable status of prefixes and suffixes
|
44
|
-
display: inline-block;
|
45
|
-
flex: 0 0 auto;
|
46
|
-
height: 40px;
|
47
|
-
margin-top: 0;
|
48
|
-
min-width: 40px;
|
49
|
-
padding: govuk-spacing(1);
|
50
|
-
text-align: center;
|
51
|
-
white-space: nowrap;
|
52
|
-
width: auto;
|
53
|
-
|
54
|
-
@if $govuk-typography-use-rem {
|
55
|
-
height: govuk-px-to-rem(40px);
|
56
|
-
min-width: govuk-px-to-rem(40px);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
.gem-c-input__prefix {
|
61
|
-
border-right: 0;
|
62
|
-
}
|
63
|
-
|
64
|
-
.gem-c-input__suffix {
|
65
|
-
border-left: 0;
|
66
|
-
}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
$transition-campaign-red: #ff003b;
|
2
|
+
$transition-campaign-dark-blue: #1e1348;
|
3
|
+
|
4
|
+
.gem-c-transition-countdown {
|
5
|
+
@include govuk-font(19);
|
6
|
+
margin-bottom: govuk-spacing(6);
|
7
|
+
}
|
8
|
+
|
9
|
+
.gem-c-transition-countdown--cta {
|
10
|
+
background-color: govuk-colour('light-grey', $legacy: 'grey-4');
|
11
|
+
border-top: 4px solid $transition-campaign-red;
|
12
|
+
display: block;
|
13
|
+
padding: govuk-spacing(3);
|
14
|
+
text-decoration: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
.gem-c-transition-countdown__title {
|
18
|
+
@extend %govuk-heading-m;
|
19
|
+
color: $transition-campaign-dark-blue;
|
20
|
+
}
|
21
|
+
|
22
|
+
.gem-c-transition-countdown__countdown {
|
23
|
+
margin-top: 0;
|
24
|
+
margin-bottom: govuk-spacing(2);
|
25
|
+
|
26
|
+
@include govuk-media-query($from: tablet) {
|
27
|
+
margin-bottom: govuk-spacing(0);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.gem-c-transition-countdown__countdown-number {
|
32
|
+
@include govuk-font($size: 80, $weight: bold, $line-height: 60px);
|
33
|
+
|
34
|
+
min-width: 50px;
|
35
|
+
text-align: center;
|
36
|
+
display: inline-block;
|
37
|
+
background: $transition-campaign-dark-blue;
|
38
|
+
color: govuk-colour('white');
|
39
|
+
position: relative;
|
40
|
+
margin-bottom: govuk-spacing(2);
|
41
|
+
|
42
|
+
@include govuk-media-query($from: tablet) {
|
43
|
+
padding: govuk-spacing(2) govuk-spacing(1);
|
44
|
+
}
|
45
|
+
|
46
|
+
&:after {
|
47
|
+
position: absolute;
|
48
|
+
left: 0;
|
49
|
+
top: 50%;
|
50
|
+
margin-top: -1px;
|
51
|
+
height: 3px;
|
52
|
+
background: govuk-colour('white');
|
53
|
+
content: '';
|
54
|
+
width: 100%;
|
55
|
+
display: block;
|
56
|
+
}
|
57
|
+
|
58
|
+
&:first-child {
|
59
|
+
margin-right: 3px;
|
60
|
+
}
|
61
|
+
|
62
|
+
&:nth-child(2) {
|
63
|
+
margin-right: govuk-spacing(2);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
.gem-c-transition-countdown__countdown-text {
|
68
|
+
@extend %govuk-heading-m;
|
69
|
+
|
70
|
+
display: inline-block;
|
71
|
+
margin-bottom: 0;
|
72
|
+
height: 45px;
|
73
|
+
vertical-align: middle;
|
74
|
+
color: $transition-campaign-dark-blue;
|
75
|
+
|
76
|
+
@include govuk-media-query($from: tablet) {
|
77
|
+
height: 80px;
|
78
|
+
}
|
79
|
+
|
80
|
+
&:after {
|
81
|
+
content: '' / '.'; // Wrap up the countdown-text element in a statement for screen readers
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
.gem-c-transition-countdown__text {
|
86
|
+
@extend %govuk-link;
|
87
|
+
|
88
|
+
margin-top: 0;
|
89
|
+
margin-bottom: 0;
|
90
|
+
text-decoration: underline;
|
91
|
+
|
92
|
+
@include govuk-media-query($from: tablet) {
|
93
|
+
margin-bottom: govuk-spacing(2);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
.gem-c-transition-countdown:focus {
|
98
|
+
.gem-c-transition-countdown__countdown-number:after {
|
99
|
+
background-color: $govuk-focus-colour;
|
100
|
+
}
|
101
|
+
|
102
|
+
.gem-c-transition-countdown__text {
|
103
|
+
text-decoration: none;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
@include govuk-compatibility(govuk_template) {
|
108
|
+
.gem-c-transition-countdown__title {
|
109
|
+
margin-bottom: govuk-spacing(3);
|
110
|
+
}
|
111
|
+
|
112
|
+
.gem-c-transition-countdown__countdown-number {
|
113
|
+
padding: govuk-spacing(1) 0 0;
|
114
|
+
|
115
|
+
@include govuk-media-query($from: tablet) {
|
116
|
+
padding: govuk-spacing(3) govuk-spacing(1) govuk-spacing(1);
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
.gem-c-transition-countdown__countdown-text {
|
121
|
+
@include govuk-media-query($from: tablet) {
|
122
|
+
height: 75px;
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
@@ -22,10 +22,9 @@
|
|
22
22
|
<div class="component-markdown">
|
23
23
|
<%= raw(@component_doc.html_body) %>
|
24
24
|
</div>
|
25
|
-
|
26
|
-
<p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %></p>
|
27
25
|
</div>
|
28
26
|
<% end %>
|
27
|
+
<p class="govuk-body"><%= link_to "Search for usage of this component on GitHub", @component_doc.github_search_url, class: "govuk-link" %></p>
|
29
28
|
</div>
|
30
29
|
</div>
|
31
30
|
|
@@ -5,6 +5,7 @@
|
|
5
5
|
hide_order_copy_link ||= false
|
6
6
|
attributes = []
|
7
7
|
data_attributes ||= {}
|
8
|
+
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
8
9
|
|
9
10
|
if attachment.content_type_name
|
10
11
|
content = if attachment.content_type_abbr
|
@@ -50,11 +51,11 @@
|
|
50
51
|
<% end %>
|
51
52
|
|
52
53
|
<%= tag.div class: "gem-c-attachment__details" do %>
|
53
|
-
<%=
|
54
|
+
<%= content_tag(shared_helper.get_heading_level, class: "gem-c-attachment__title") do %>
|
54
55
|
<%= link_to attachment.title, attachment.url,
|
55
|
-
|
56
|
-
|
57
|
-
|
56
|
+
class: "govuk-link gem-c-attachment__link",
|
57
|
+
target: target,
|
58
|
+
data: data_attributes %>
|
58
59
|
<% end %>
|
59
60
|
|
60
61
|
<% if attachment.reference.present? %>
|