govuk_publishing_components 27.18.0 → 28.1.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/images/govuk_publishing_components/image-card-srcset/cop26-170.jpg +0 -0
- data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-240.jpg +0 -0
- data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-320.jpg +0 -0
- data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-480.jpg +0 -0
- data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26.jpg +0 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js +2 -20
- data/app/assets/javascripts/govuk_publishing_components/analytics/download-link-tracker.js +21 -16
- data/app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js +46 -32
- data/app/assets/javascripts/govuk_publishing_components/analytics/google-analytics-universal-tracker.js +20 -7
- data/app/assets/javascripts/govuk_publishing_components/analytics/mailto-link-tracker.js +22 -17
- data/app/assets/javascripts/govuk_publishing_components/analytics/static-analytics.js +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +18 -18
- data/app/assets/javascripts/govuk_publishing_components/components/metadata.js +27 -0
- data/app/assets/javascripts/govuk_publishing_components/lib/extend-object.js +22 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +19 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +6 -35
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +17 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss +34 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +7 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +6 -0
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +5 -1
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_intervention.html.erb +10 -1
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_signup_link.html.erb +30 -0
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +3 -3
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb +27 -0
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +31 -25
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +15 -87
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +5 -0
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +29 -0
- data/app/views/govuk_publishing_components/components/docs/input.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/intervention.yml +9 -0
- data/app/views/govuk_publishing_components/components/docs/signup_link.yml +39 -0
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/tabs.yml +2 -2
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +9 -6
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +4 -3
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +4 -4
- data/config/locales/ar.yml +0 -8
- data/config/locales/az.yml +0 -8
- data/config/locales/be.yml +0 -8
- data/config/locales/bg.yml +0 -8
- data/config/locales/bn.yml +0 -8
- data/config/locales/cs.yml +0 -8
- data/config/locales/cy.yml +0 -8
- data/config/locales/da.yml +0 -8
- data/config/locales/de.yml +0 -8
- data/config/locales/dr.yml +0 -8
- data/config/locales/el.yml +0 -8
- data/config/locales/en.yml +4 -10
- data/config/locales/es-419.yml +0 -8
- data/config/locales/es.yml +0 -8
- data/config/locales/et.yml +0 -8
- data/config/locales/fa.yml +0 -8
- data/config/locales/fi.yml +0 -8
- data/config/locales/fr.yml +0 -8
- data/config/locales/gd.yml +0 -8
- data/config/locales/gu.yml +0 -8
- data/config/locales/he.yml +0 -8
- data/config/locales/hi.yml +0 -8
- data/config/locales/hr.yml +0 -8
- data/config/locales/hu.yml +0 -8
- data/config/locales/hy.yml +0 -8
- data/config/locales/id.yml +0 -8
- data/config/locales/is.yml +0 -8
- data/config/locales/it.yml +0 -8
- data/config/locales/ja.yml +0 -8
- data/config/locales/ka.yml +0 -8
- data/config/locales/kk.yml +0 -8
- data/config/locales/ko.yml +0 -8
- data/config/locales/lt.yml +0 -8
- data/config/locales/lv.yml +0 -8
- data/config/locales/ms.yml +0 -8
- data/config/locales/mt.yml +0 -8
- data/config/locales/nl.yml +0 -8
- data/config/locales/no.yml +0 -8
- data/config/locales/pa-pk.yml +0 -8
- data/config/locales/pa.yml +0 -8
- data/config/locales/pl.yml +0 -8
- data/config/locales/ps.yml +0 -8
- data/config/locales/pt.yml +0 -8
- data/config/locales/ro.yml +0 -8
- data/config/locales/ru.yml +0 -8
- data/config/locales/si.yml +0 -8
- data/config/locales/sk.yml +0 -8
- data/config/locales/sl.yml +0 -8
- data/config/locales/so.yml +0 -8
- data/config/locales/sq.yml +0 -8
- data/config/locales/sr.yml +0 -8
- data/config/locales/sv.yml +0 -8
- data/config/locales/sw.yml +0 -8
- data/config/locales/ta.yml +0 -8
- data/config/locales/th.yml +0 -8
- data/config/locales/tk.yml +0 -8
- data/config/locales/tr.yml +0 -8
- data/config/locales/uk.yml +0 -8
- data/config/locales/ur.yml +0 -8
- data/config/locales/uz.yml +0 -8
- data/config/locales/vi.yml +0 -8
- data/config/locales/zh-hk.yml +0 -8
- data/config/locales/zh-tw.yml +0 -8
- data/config/locales/zh.yml +0 -8
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +42 -170
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +11 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +0 -2
- metadata +13 -15
- data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +0 -237
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +0 -84
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +0 -21
- data/app/views/govuk_publishing_components/components/_admin_analytics.html.erb +0 -20
- data/app/views/govuk_publishing_components/components/_government_navigation.html.erb +0 -86
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +0 -47
- data/app/views/govuk_publishing_components/components/_taxonomy_list.html.erb +0 -30
- data/app/views/govuk_publishing_components/components/docs/admin_analytics.yml +0 -10
- data/app/views/govuk_publishing_components/components/docs/government_navigation.yml +0 -20
- data/app/views/govuk_publishing_components/components/docs/highlight_boxes.yml +0 -171
- data/app/views/govuk_publishing_components/components/docs/taxonomy_list.yml +0 -112
- data/lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb +0 -13
- data/lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb +0 -23
@@ -1,237 +0,0 @@
|
|
1
|
-
/* global GOVUK, $ */
|
2
|
-
|
3
|
-
(function () {
|
4
|
-
'use strict'
|
5
|
-
|
6
|
-
window.GOVUK = window.GOVUK || {}
|
7
|
-
|
8
|
-
var percentages = [
|
9
|
-
['Percent', 20],
|
10
|
-
['Percent', 40],
|
11
|
-
['Percent', 60],
|
12
|
-
['Percent', 80],
|
13
|
-
['Percent', 100]
|
14
|
-
]
|
15
|
-
|
16
|
-
var CONFIG = {
|
17
|
-
'/brexit': percentages,
|
18
|
-
'/government/publications/the-essential-trustee-what-you-need-to-know-cc3/the-essential-trustee-what-you-need-to-know-what-you-need-to-do': [
|
19
|
-
['Heading', '1. About this guidance'],
|
20
|
-
['Heading', '2. Trustees’ duties at a glance'],
|
21
|
-
['Heading', '3. Who can be a trustee and how trustees are appointed'],
|
22
|
-
['Heading', '4. Ensure your charity is carrying out its purposes for the public benefit'],
|
23
|
-
['Heading', '5. Comply with your charity’s governing document and the law'],
|
24
|
-
['Heading', '6. Act in your charity’s best interests'],
|
25
|
-
['Heading', '7. Manage your charity’s resources responsibly'],
|
26
|
-
['Heading', '8. Act with reasonable care and skill'],
|
27
|
-
['Heading', '9. Ensure your charity is accountable'],
|
28
|
-
['Heading', '10. Reduce the risk of liability'],
|
29
|
-
['Heading', '11. Your charity’s legal structure and what it means'],
|
30
|
-
['Heading', '12. Charity officers - the chair and treasurer'],
|
31
|
-
['Heading', '13. Technical terms used in this guidance']
|
32
|
-
],
|
33
|
-
'/guidance/universal-credit-how-it-helps-you-into-work': [
|
34
|
-
['Heading', 'Support from your work coach'],
|
35
|
-
['Heading', 'Help available for parents'],
|
36
|
-
['Heading', 'When you can claim Universal Credit'],
|
37
|
-
['Heading', 'More detailed advice']
|
38
|
-
],
|
39
|
-
'/government/publications/spring-budget-2017-documents/spring-budget-2017': [
|
40
|
-
['Heading', '1. Executive summary'],
|
41
|
-
['Heading', '2. Economic context and public finances'],
|
42
|
-
['Heading', '3. Policy decisions'],
|
43
|
-
['Heading', '4. Tax'],
|
44
|
-
['Heading', '5. Productivity'],
|
45
|
-
['Heading', '6. Public services and markets'],
|
46
|
-
['Heading', '7. Annex A: Financing'],
|
47
|
-
['Heading', '8. Annex B: Office for Budget Responsibility\'s Economic and fiscal outlook']
|
48
|
-
],
|
49
|
-
'/settled-status-eu-citizens-families': [
|
50
|
-
['Heading', 'When you can apply']
|
51
|
-
],
|
52
|
-
'/guidance/returning-to-the-uk': [
|
53
|
-
['Heading', 'Ending your time living abroad']
|
54
|
-
],
|
55
|
-
'/council-housing': [
|
56
|
-
['Heading', 'Choice-based lettings']
|
57
|
-
],
|
58
|
-
'/guidance/foreign-travel-insurance': [
|
59
|
-
['Heading', 'What your travel insurance policy should cover']
|
60
|
-
],
|
61
|
-
'/guidance/living-in-france': [
|
62
|
-
['Heading', 'Passports and travel']
|
63
|
-
],
|
64
|
-
'/family-permit': [
|
65
|
-
['Heading', 'EEA family permit']
|
66
|
-
],
|
67
|
-
'/guidance/healthcare-for-eu-and-efta-citizens-visiting-the-uk': [
|
68
|
-
['Heading', 'Travel insurance']
|
69
|
-
],
|
70
|
-
'/driving-abroad': [
|
71
|
-
['Heading', 'Check your insurance if you’re taking your own vehicle']
|
72
|
-
],
|
73
|
-
'/get-a-passport-urgently': [
|
74
|
-
['Heading', 'Ways to apply']
|
75
|
-
],
|
76
|
-
'/driving-abroad/international-driving-permit': [
|
77
|
-
['Heading', 'Check which IDP you need']
|
78
|
-
],
|
79
|
-
'/guidance/guidance-for-suppliers-of-cattle-sheep-and-goat-ear-tags': [
|
80
|
-
['Heading', 'Tagging information for livestock keepers']
|
81
|
-
],
|
82
|
-
'/guidance/how-to-move-goods-between-or-through-common-transit-countries-including-the-eu': [
|
83
|
-
['Heading', 'Start moving your goods']
|
84
|
-
],
|
85
|
-
'/guidance/ecmt-international-road-haulage-permits': [
|
86
|
-
['Heading', 'Apply for permits']
|
87
|
-
],
|
88
|
-
'/taking-goods-out-uk-temporarily/get-an-ata-carnet': [
|
89
|
-
['Heading', 'Using an ATA Carnet']
|
90
|
-
],
|
91
|
-
'/wood-packaging-import-export': [
|
92
|
-
['Heading', 'Export solid wood packaging']
|
93
|
-
],
|
94
|
-
'/coronavirus': percentages,
|
95
|
-
'/coronavirus/education-and-childcare': percentages,
|
96
|
-
'/coronavirus/worker-support': percentages,
|
97
|
-
'/coronavirus/business-support': percentages,
|
98
|
-
'/get-coronavirus-test': percentages,
|
99
|
-
'/next-steps-for-your-business/results': [
|
100
|
-
['Heading', 'Things you need to do next'],
|
101
|
-
['Heading', 'Rules to follow'],
|
102
|
-
['Heading', 'Good to know'],
|
103
|
-
['Heading', 'Change your answers']
|
104
|
-
],
|
105
|
-
'/guidance/brexit-guidance-for-businesses': percentages,
|
106
|
-
'/guidance/brexit-guidance-for-businesses.cy': percentages,
|
107
|
-
'/guidance/brexit-guidance-for-individuals-and-families': percentages,
|
108
|
-
'/guidance/brexit-guidance-for-individuals-and-families.cy': percentages,
|
109
|
-
'/guidance/import-and-export-goods-using-preference-agreements': percentages,
|
110
|
-
'/guidance/travel-abroad-from-england-during-coronavirus-covid-19': [
|
111
|
-
['Heading', 'Before you travel abroad'],
|
112
|
-
['Heading', '1. Check the rules for the country you’re going to'],
|
113
|
-
['Heading', '2. Find out what you need to do when you return'],
|
114
|
-
['Heading', '3. Book any COVID-19 tests or quarantine hotel packages you need for your return'],
|
115
|
-
['Heading', 'Before you return'],
|
116
|
-
['Heading', 'After you return'],
|
117
|
-
['Heading', 'Travelling with children'],
|
118
|
-
['Heading', 'Ireland, the UK, the Channel Islands and the Isle of Man'],
|
119
|
-
['Heading', 'Exemptions for work, medical or compassionate reasons']
|
120
|
-
],
|
121
|
-
'/guidance/travel-to-england-from-another-country-during-coronavirus-covid-19': [
|
122
|
-
['Heading', 'Before you travel'],
|
123
|
-
['Heading', '1. Check the rules for the country you’re coming from or have travelled through'],
|
124
|
-
['Heading', '2. Book any COVID-19 tests or quarantine hotel packages you need for your arrival'],
|
125
|
-
['Heading', '3. Get tested and complete documents'],
|
126
|
-
['Heading', 'When you arrive in England'],
|
127
|
-
['Heading', 'Leaving England'],
|
128
|
-
['Heading', 'Travelling with children'],
|
129
|
-
['Heading', 'Ireland, the UK, the Channel Islands and the Isle of Man'],
|
130
|
-
['Heading', 'Exemptions for work, medical or compassionate reasons']
|
131
|
-
],
|
132
|
-
'/find-travel-test-provider': percentages
|
133
|
-
}
|
134
|
-
|
135
|
-
function ScrollTracker (sitewideConfig) {
|
136
|
-
this.config = this.getConfigForCurrentPath(sitewideConfig)
|
137
|
-
this.SCROLL_TIMEOUT_DELAY = 10
|
138
|
-
|
139
|
-
if (!this.config) {
|
140
|
-
this.enabled = false
|
141
|
-
return
|
142
|
-
}
|
143
|
-
this.enabled = true
|
144
|
-
|
145
|
-
this.trackedNodes = this.buildNodes(this.config)
|
146
|
-
|
147
|
-
$(window).scroll($.proxy(this.onScroll, this))
|
148
|
-
this.trackVisibleNodes()
|
149
|
-
};
|
150
|
-
|
151
|
-
ScrollTracker.prototype.getConfigForCurrentPath = function (sitewideConfig) {
|
152
|
-
for (var path in sitewideConfig) {
|
153
|
-
if (this.normalisePath(window.location.pathname) === this.normalisePath(path)) {
|
154
|
-
return sitewideConfig[path]
|
155
|
-
}
|
156
|
-
}
|
157
|
-
}
|
158
|
-
|
159
|
-
ScrollTracker.prototype.buildNodes = function (config) {
|
160
|
-
var nodes = []
|
161
|
-
var NodeConstructor, nodeData
|
162
|
-
|
163
|
-
for (var i = 0; i < config.length; i++) {
|
164
|
-
NodeConstructor = ScrollTracker[config[i][0] + 'Node']
|
165
|
-
nodeData = config[i][1]
|
166
|
-
nodes.push(new NodeConstructor(nodeData))
|
167
|
-
}
|
168
|
-
|
169
|
-
return nodes
|
170
|
-
}
|
171
|
-
|
172
|
-
ScrollTracker.prototype.normalisePath = function (path) {
|
173
|
-
return path.split('/').join('')
|
174
|
-
}
|
175
|
-
|
176
|
-
ScrollTracker.prototype.onScroll = function () {
|
177
|
-
clearTimeout(this.scrollTimeout)
|
178
|
-
this.scrollTimeout = setTimeout($.proxy(this.trackVisibleNodes, this), this.SCROLL_TIMEOUT_DELAY)
|
179
|
-
}
|
180
|
-
|
181
|
-
ScrollTracker.prototype.trackVisibleNodes = function () {
|
182
|
-
for (var i = 0; i < this.trackedNodes.length; i++) {
|
183
|
-
if (this.trackedNodes[i].isVisible() && !this.trackedNodes[i].alreadySeen) {
|
184
|
-
this.trackedNodes[i].alreadySeen = true
|
185
|
-
|
186
|
-
var action = this.trackedNodes[i].eventData.action
|
187
|
-
var label = this.trackedNodes[i].eventData.label
|
188
|
-
|
189
|
-
GOVUK.analytics.trackEvent('ScrollTo', action, { label: label, nonInteraction: true })
|
190
|
-
}
|
191
|
-
}
|
192
|
-
}
|
193
|
-
|
194
|
-
ScrollTracker.PercentNode = function (percentage) {
|
195
|
-
this.percentage = percentage
|
196
|
-
this.eventData = { action: 'Percent', label: String(percentage) }
|
197
|
-
}
|
198
|
-
|
199
|
-
ScrollTracker.PercentNode.prototype.isVisible = function () {
|
200
|
-
return this.currentScrollPercent() >= this.percentage
|
201
|
-
}
|
202
|
-
|
203
|
-
ScrollTracker.PercentNode.prototype.currentScrollPercent = function () {
|
204
|
-
var $document = $(document)
|
205
|
-
var $window = $(window)
|
206
|
-
return (($window.scrollTop() / ($document.height() - $window.height())) * 100.0)
|
207
|
-
}
|
208
|
-
|
209
|
-
ScrollTracker.HeadingNode = function (headingText) {
|
210
|
-
this.$element = getHeadingElement(headingText)
|
211
|
-
this.eventData = { action: 'Heading', label: headingText }
|
212
|
-
|
213
|
-
function getHeadingElement (headingText) {
|
214
|
-
var $headings = $('h1, h2, h3, h4, h5, h6')
|
215
|
-
for (var i = 0; i < $headings.length; i++) {
|
216
|
-
if ($.trim($headings.eq(i).text()).replace(/\s/g, ' ') === headingText) return $headings.eq(i)
|
217
|
-
}
|
218
|
-
}
|
219
|
-
}
|
220
|
-
|
221
|
-
ScrollTracker.HeadingNode.prototype.isVisible = function () {
|
222
|
-
if (!this.$element) return false
|
223
|
-
return this.elementIsVisible(this.$element)
|
224
|
-
}
|
225
|
-
|
226
|
-
ScrollTracker.HeadingNode.prototype.elementIsVisible = function ($element) {
|
227
|
-
var $window = $(window)
|
228
|
-
var positionTop = $element.offset().top
|
229
|
-
return (positionTop > $window.scrollTop() && positionTop < ($window.scrollTop() + $window.height()))
|
230
|
-
}
|
231
|
-
|
232
|
-
$().ready(function () {
|
233
|
-
window.GOVUK.scrollTracker = new ScrollTracker(CONFIG)
|
234
|
-
})
|
235
|
-
|
236
|
-
window.GOVUK.ScrollTracker = ScrollTracker
|
237
|
-
}())
|
@@ -1,84 +0,0 @@
|
|
1
|
-
.gem-c-highlight-boxes {
|
2
|
-
@include govuk-text-colour;
|
3
|
-
display: flex;
|
4
|
-
flex-wrap: wrap;
|
5
|
-
margin: govuk-spacing(3) 0 0 0;
|
6
|
-
padding: 0;
|
7
|
-
|
8
|
-
@include govuk-media-query($from: tablet) {
|
9
|
-
margin-right: -25px;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
.gem-c-highlight-boxes__item-wrapper {
|
14
|
-
@include govuk-font(19);
|
15
|
-
box-sizing: border-box;
|
16
|
-
list-style-type: none;
|
17
|
-
padding: govuk-spacing(1) govuk-spacing(2) govuk-spacing(5) 0;
|
18
|
-
width: 100%;
|
19
|
-
|
20
|
-
@include govuk-media-query($from: tablet) {
|
21
|
-
width: 50%;
|
22
|
-
padding: govuk-spacing(1) govuk-spacing(5) govuk-spacing(5) 0;
|
23
|
-
}
|
24
|
-
|
25
|
-
@include govuk-media-query($from: desktop) {
|
26
|
-
width: (1 / 3) * 100%;
|
27
|
-
padding: govuk-spacing(1) govuk-spacing(5) govuk-spacing(5) 0;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
.gem-c-highlight-boxes__item-wrapper--half-width {
|
32
|
-
@include govuk-media-query($from: desktop) {
|
33
|
-
width: 50%;
|
34
|
-
padding: govuk-spacing(1) govuk-spacing(5) govuk-spacing(5) 0;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
.gem-c-highlight-boxes__item {
|
39
|
-
box-sizing: border-box;
|
40
|
-
border: 1px solid govuk-colour("mid-grey", $legacy: "grey-2");
|
41
|
-
padding: govuk-spacing(3) * 1.5;
|
42
|
-
height: 100%;
|
43
|
-
box-shadow: 7px 7px 0 govuk-colour("white"), 8px 8px 0 govuk-colour("mid-grey", $legacy: "grey-2");
|
44
|
-
}
|
45
|
-
|
46
|
-
.gem-c-highlight-boxes--inverse {
|
47
|
-
background-color: govuk-colour("blue");
|
48
|
-
border: 0;
|
49
|
-
color: govuk-colour("white");
|
50
|
-
}
|
51
|
-
|
52
|
-
.gem-c-highlight-boxes__title {
|
53
|
-
@include govuk-font(19, $weight: bold);
|
54
|
-
display: block;
|
55
|
-
text-decoration: underline;
|
56
|
-
margin-bottom: govuk-spacing(1);
|
57
|
-
}
|
58
|
-
|
59
|
-
.gem-c-highlight-boxes--inverse .gem-c-highlight-boxes__title {
|
60
|
-
&:link,
|
61
|
-
&:visited,
|
62
|
-
&:hover {
|
63
|
-
color: govuk-colour("white");
|
64
|
-
}
|
65
|
-
|
66
|
-
&:active,
|
67
|
-
&:focus {
|
68
|
-
color: $govuk-focus-text-colour;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
.gem-c-highlight-boxes__title--featured {
|
73
|
-
@include govuk-font(24, $weight: bold);
|
74
|
-
}
|
75
|
-
|
76
|
-
.gem-c-highlight-boxes__description {
|
77
|
-
margin: 0 0 govuk-spacing(2) 0;
|
78
|
-
}
|
79
|
-
|
80
|
-
.gem-c-highlight-boxes__metadata {
|
81
|
-
margin: 0 govuk-spacing(3) 0 0;
|
82
|
-
@include govuk-font(16);
|
83
|
-
display: inline-block;
|
84
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
.gem-c-taxonomy-list {
|
2
|
-
display: flex;
|
3
|
-
flex-wrap: wrap;
|
4
|
-
margin: govuk-spacing(3) 0 0 0;
|
5
|
-
padding: 0;
|
6
|
-
|
7
|
-
@include govuk-media-query($from: tablet) {
|
8
|
-
margin-right: -25px;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
.gem-c-taxonomy-list__item {
|
13
|
-
list-style: none;
|
14
|
-
|
15
|
-
@include govuk-media-query($from: tablet) {
|
16
|
-
box-sizing: border-box;
|
17
|
-
width: 33%;
|
18
|
-
padding-right: govuk-spacing(2);
|
19
|
-
vertical-align: top;
|
20
|
-
}
|
21
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
warn('DEPRECATION WARNING: admin_analytics component is deprecated and will be removed in a future major release of govuk_publishing_components')
|
3
|
-
user_organisation ||= nil
|
4
|
-
%>
|
5
|
-
|
6
|
-
<script class="analytics">
|
7
|
-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
8
|
-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
9
|
-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
10
|
-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
11
|
-
|
12
|
-
ga('create', 'UA-26179049-6', '<%= ENV['GOVUK_APP_DOMAIN'] %>');
|
13
|
-
ga('set', 'anonymizeIp', true);
|
14
|
-
|
15
|
-
<% if user_organisation %>
|
16
|
-
ga('set', 'dimension8', "<%= user_organisation.presence || '(not set)' %>");
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
ga('send', 'pageview');
|
20
|
-
</script>
|
@@ -1,86 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
warn('DEPRECATION WARNING: government_navigation component is deprecated and will be removed in a future major release of govuk_publishing_components')
|
3
|
-
active ||= nil
|
4
|
-
%>
|
5
|
-
|
6
|
-
<nav id="proposition-menu" class="no-proposition-name gem-c-government-navigation" aria-label="Departments and policy navigation">
|
7
|
-
<ul id="proposition-links" data-module="gem-track-click">
|
8
|
-
<li>
|
9
|
-
<a class="<%= 'active' if active == 'departments' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
10
|
-
data-track-category="headerClicked"
|
11
|
-
data-track-action="departmentsLink"
|
12
|
-
data-track-label="/government/organisations"
|
13
|
-
data-track-dimension="<%= t("components.government_navigation.departments") %>"
|
14
|
-
data-track-dimension-index="29"
|
15
|
-
href="/government/organisations">
|
16
|
-
<%= t("components.government_navigation.departments") %>
|
17
|
-
</a>
|
18
|
-
</li>
|
19
|
-
<li>
|
20
|
-
<a class="<%= 'active' if active == 'worldwide' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
21
|
-
data-track-category="headerClicked"
|
22
|
-
data-track-action="worldwideLink"
|
23
|
-
data-track-label="/world"
|
24
|
-
data-track-dimension="<%= t("components.government_navigation.worldwide") %>"
|
25
|
-
data-track-dimension-index="29"
|
26
|
-
href="/world">
|
27
|
-
<%= t("components.government_navigation.worldwide") %>
|
28
|
-
</a>
|
29
|
-
</li>
|
30
|
-
<li>
|
31
|
-
<a class="<%= 'active' if active == 'how-government-works' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
32
|
-
data-track-category="headerClicked"
|
33
|
-
data-track-action="governmentactivityLink"
|
34
|
-
data-track-label="/government/how-government-works"
|
35
|
-
data-track-dimension="<%= t("components.government_navigation.how-government-works") %>"
|
36
|
-
data-track-dimension-index="29"
|
37
|
-
href="/government/how-government-works">
|
38
|
-
<%= t("components.government_navigation.how-government-works") %>
|
39
|
-
</a>
|
40
|
-
</li>
|
41
|
-
<li>
|
42
|
-
<a class="<%= 'active' if active == 'get-involved' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
43
|
-
data-track-category="headerClicked"
|
44
|
-
data-track-action="governmentactivityLink"
|
45
|
-
data-track-label="/government/get-involved"
|
46
|
-
data-track-dimension="<%= t("components.government_navigation.get-involved") %>"
|
47
|
-
data-track-dimension-index="29"
|
48
|
-
href="/government/get-involved">
|
49
|
-
<%= t("components.government_navigation.get-involved") %>
|
50
|
-
</a>
|
51
|
-
</li>
|
52
|
-
<li class="clear-child">
|
53
|
-
<a class="<%= 'active' if active == 'consultations' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
54
|
-
data-track-category="headerClicked"
|
55
|
-
data-track-action="governmentactivityLink"
|
56
|
-
data-track-label="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>"
|
57
|
-
data-track-dimension="<%= t("components.government_navigation.consultations") %>"
|
58
|
-
data-track-dimension-index="29"
|
59
|
-
href="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>">
|
60
|
-
<%= t("components.government_navigation.consultations") %>
|
61
|
-
</a>
|
62
|
-
</li>
|
63
|
-
<li>
|
64
|
-
<a class="<%= 'active' if active == 'statistics' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
65
|
-
data-track-category="headerClicked"
|
66
|
-
data-track-action="governmentactivityLink"
|
67
|
-
data-track-label="/search/research-and-statistics"
|
68
|
-
data-track-dimension="<%= t("components.government_navigation.statistics") %>"
|
69
|
-
data-track-dimension-index="29"
|
70
|
-
href="/search/research-and-statistics">
|
71
|
-
<%= t("components.government_navigation.statistics") %>
|
72
|
-
</a>
|
73
|
-
</li>
|
74
|
-
<li>
|
75
|
-
<a class="<%= 'active' if active == 'announcements' %> govuk-link govuk-link--no-underline govuk-link--inverse"
|
76
|
-
data-track-category="headerClicked"
|
77
|
-
data-track-action="governmentactivityLink"
|
78
|
-
data-track-label="/search/news-and-communications"
|
79
|
-
data-track-dimension="<%= t("components.government_navigation.news_and_communications") %>"
|
80
|
-
data-track-dimension-index="29"
|
81
|
-
href="/search/news-and-communications">
|
82
|
-
<%= t("components.government_navigation.news_and_communications") %>
|
83
|
-
</a>
|
84
|
-
</li>
|
85
|
-
</ul>
|
86
|
-
</nav>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
warn('DEPRECATION WARNING: highlight_boxes component is deprecated and will be removed in a future major release of govuk_publishing_components')
|
3
|
-
items ||= []
|
4
|
-
inverse ||= false
|
5
|
-
half_width ||= false
|
6
|
-
within_multitype_list ||= false
|
7
|
-
half_width_class = "gem-c-highlight-boxes__item-wrapper--half-width" if half_width
|
8
|
-
inverse_class = "gem-c-highlight-boxes--inverse" if inverse
|
9
|
-
highlight_boxes_helper = GovukPublishingComponents::Presenters::HighlightBoxesHelper.new(local_assigns)
|
10
|
-
%>
|
11
|
-
<% if items.any? %>
|
12
|
-
<% unless within_multitype_list %>
|
13
|
-
<ol class="gem-c-highlight-boxes" <%= "data-module=gem-track-click" if highlight_boxes_helper.data_tracking? %>>
|
14
|
-
<% end %>
|
15
|
-
<% items.each do |content_item| %>
|
16
|
-
<li class="gem-c-highlight-boxes__item-wrapper <%= half_width_class %>">
|
17
|
-
<div class="gem-c-highlight-boxes__item <%= inverse_class %>">
|
18
|
-
<%= link_to(
|
19
|
-
content_item[:link].fetch(:text),
|
20
|
-
content_item[:link].fetch(:path),
|
21
|
-
class: "govuk-link gem-c-highlight-boxes__title #{"gem-c-highlight-boxes__title--featured" if content_item[:link][:featured]}",
|
22
|
-
data: content_item[:link][:data_attributes]
|
23
|
-
)
|
24
|
-
%>
|
25
|
-
|
26
|
-
<% if content_item[:link][:description] %>
|
27
|
-
<p class="gem-c-highlight-boxes__description"><%= content_item[:link][:description] %></p>
|
28
|
-
<% end %>
|
29
|
-
|
30
|
-
<% if content_item[:metadata] %>
|
31
|
-
<% content_item[:metadata].each do |metadata_key, metadata_value| %>
|
32
|
-
<% if metadata_key.to_s.eql?("public_updated_at") %>
|
33
|
-
<time class="gem-c-highlight-boxes__metadata" datetime="<%= metadata_value.iso8601 %>">
|
34
|
-
<%= l(metadata_value, format: '%e %B %Y') %>
|
35
|
-
</time>
|
36
|
-
<% else %>
|
37
|
-
<p class="gem-c-highlight-boxes__metadata"><%= metadata_value %></p>
|
38
|
-
<% end %>
|
39
|
-
<% end %>
|
40
|
-
<% end %>
|
41
|
-
</div>
|
42
|
-
</li>
|
43
|
-
<% end %>
|
44
|
-
<% unless within_multitype_list %>
|
45
|
-
</ol>
|
46
|
-
<% end %>
|
47
|
-
<% end %>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
warn('DEPRECATION WARNING: taxonomy_list component is deprecated and will be removed in a future major release of govuk_publishing_components')
|
3
|
-
highlight_box ||= false
|
4
|
-
document_list ||= false
|
5
|
-
image_cards ||= false
|
6
|
-
|
7
|
-
highlight_box.merge!({within_multitype_list: true}) if highlight_box
|
8
|
-
document_list.merge!({within_multitype_list: true}) if document_list
|
9
|
-
|
10
|
-
taxonomy_list_helper = GovukPublishingComponents::Presenters::TaxonomyListHelper.new(image_cards)
|
11
|
-
%>
|
12
|
-
<% if highlight_box || document_list || image_cards %>
|
13
|
-
<ul class="gem-c-taxonomy-list" data-module="gem-track-click">
|
14
|
-
<% if image_cards %>
|
15
|
-
<% taxonomy_list_helper.image_card_data.each do |image_card| %>
|
16
|
-
<li class="gem-c-taxonomy-list__item">
|
17
|
-
<%= render "govuk_publishing_components/components/image_card", image_card %>
|
18
|
-
</li>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
|
22
|
-
<% if highlight_box %>
|
23
|
-
<%= render "govuk_publishing_components/components/highlight_boxes", highlight_box %>
|
24
|
-
<% end %>
|
25
|
-
|
26
|
-
<% if document_list %>
|
27
|
-
<%= render "govuk_publishing_components/components/document_list", document_list %>
|
28
|
-
<% end %>
|
29
|
-
</ul>
|
30
|
-
<% end %>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
name: Admin Analytics
|
2
|
-
description: |
|
3
|
-
Google Analytics script for tracking user interaction in admin (backend) apps.
|
4
|
-
accessibility_criteria: |
|
5
|
-
The component should not be visible to any users.
|
6
|
-
display_html: true
|
7
|
-
examples:
|
8
|
-
default:
|
9
|
-
data:
|
10
|
-
user_organisation: "HMRC"
|
@@ -1,20 +0,0 @@
|
|
1
|
-
name: Government navigation
|
2
|
-
description: Navigation placed in the header by Slimmer and used by pages which sit
|
3
|
-
under the /government path. This is a markup only component and is not available
|
4
|
-
for preview here. It can be passed a string to mark a link as being active.
|
5
|
-
body: |
|
6
|
-
Please note: because the markup on this component is currently tied to styles that aren't present in the components gem, they will appear "broken". This is because they are intended to be used in the [header component](/component-guide/layout_header/with_left_search_and_navigation) as white links against a black background. You can see a styled example of this component in use on the ['Counter-Fraud Standards and Profession' page](https://www.gov.uk/government/groups/counter-fraud-standards-and-profession).
|
7
|
-
accessibility_criteria: |
|
8
|
-
The government navigation component must:
|
9
|
-
|
10
|
-
- Be identified as a [navigation landmark](https://www.w3.org/TR/wai-aria-practices-1.1/#aria_lh_navigation)
|
11
|
-
shared_accessibility_criteria:
|
12
|
-
- link
|
13
|
-
accessibility_excluded_rules:
|
14
|
-
- 'duplicate-id' # ids used in this component are for slimmer to use when moving this component into the header
|
15
|
-
examples:
|
16
|
-
default:
|
17
|
-
data: {}
|
18
|
-
with_active_item:
|
19
|
-
data:
|
20
|
-
active: departments
|