govuk_publishing_components 27.20.0 → 28.3.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/analytics/auto-scroll-tracker.js +2 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js +22 -22
- 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/pii.js +9 -5
- data/app/assets/javascripts/govuk_publishing_components/analytics/static-analytics.js +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js +4 -3
- data/app/assets/javascripts/govuk_publishing_components/analytics.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +0 -1
- data/app/assets/javascripts/govuk_publishing_components/components/details.js +2 -3
- 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/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +5 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +8 -37
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +67 -21
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +6 -0
- data/app/views/govuk_publishing_components/components/_big_number.html.erb +19 -9
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +22 -18
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_share_links.html.erb +25 -22
- data/app/views/govuk_publishing_components/components/docs/accordion.yml +31 -25
- data/app/views/govuk_publishing_components/components/docs/big_number.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +5 -0
- data/app/views/govuk_publishing_components/components/docs/input.yml +1 -1
- 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 +35 -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 +19 -11
- 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 +0 -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/big_number_helper.rb +30 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -2
- metadata +5 -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,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
|
@@ -1,171 +0,0 @@
|
|
1
|
-
name: Highlight boxes
|
2
|
-
description: Displays content item details in a grid of highlight boxes, with a max of 3 items per row.
|
3
|
-
body: |
|
4
|
-
The highlight boxes have several optional flags which can be set:
|
5
|
-
|
6
|
-
- Inverse - renders the highlight boxes as white text on a blue background
|
7
|
-
- Featured - renders a specific highlight box with larger font size
|
8
|
-
accessibility_criteria: |
|
9
|
-
The highlight boxes must:
|
10
|
-
|
11
|
-
- be visually distinct from other content on the page
|
12
|
-
- have a text contrast ratio higher than 4.5:1 against the background colour to meet WCAG AA
|
13
|
-
shared_accessibility_criteria:
|
14
|
-
- link
|
15
|
-
examples:
|
16
|
-
default:
|
17
|
-
data:
|
18
|
-
items:
|
19
|
-
- link:
|
20
|
-
text: If your child is taken into care
|
21
|
-
path: /child-into-care
|
22
|
-
metadata:
|
23
|
-
document_type: Detailed guide
|
24
|
-
- link:
|
25
|
-
text: High needs funding
|
26
|
-
path: /high-needs-funding
|
27
|
-
metadata:
|
28
|
-
document_type: Guide
|
29
|
-
- link:
|
30
|
-
text: Joint Statement of the 4th meeting of the UK-China High-Level People to People Dialogue
|
31
|
-
path: /government/publications/joint-statement-of-the-4th-meeting-of-the-uk-china-high-level-people-to-people-dialogue
|
32
|
-
metadata:
|
33
|
-
document_type: Policy paper
|
34
|
-
with_descriptions_and_metadata:
|
35
|
-
data:
|
36
|
-
items:
|
37
|
-
- link:
|
38
|
-
text: Becoming an apprentice
|
39
|
-
path: /becoming-an-apprentice
|
40
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
41
|
-
metadata:
|
42
|
-
document_type: Speech
|
43
|
-
organisation: DfE and Ofqual
|
44
|
-
public_updated_at: 2016-06-27 10:29:44
|
45
|
-
- link:
|
46
|
-
text: Becoming an apprentice
|
47
|
-
path: /becoming-an-apprentice
|
48
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
49
|
-
metadata:
|
50
|
-
document_type: Speech
|
51
|
-
organisation: DfE and Ofqual
|
52
|
-
public_updated_at: 2016-06-27 10:29:44
|
53
|
-
- link:
|
54
|
-
text: Becoming an apprentice
|
55
|
-
path: /becoming-an-apprentice
|
56
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
57
|
-
metadata:
|
58
|
-
document_type: Speech
|
59
|
-
organisation: DfE and Ofqual
|
60
|
-
public_updated_at: 2016-06-27 10:29:44
|
61
|
-
inverse:
|
62
|
-
data:
|
63
|
-
inverse: true
|
64
|
-
items:
|
65
|
-
- link:
|
66
|
-
text: Becoming an apprentice
|
67
|
-
path: /becoming-an-apprentice
|
68
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
69
|
-
metadata:
|
70
|
-
document_type: Speech
|
71
|
-
organisation: DfE and Ofqual
|
72
|
-
public_updated_at: 2016-06-27 10:29:44
|
73
|
-
- link:
|
74
|
-
text: Becoming an apprentice
|
75
|
-
path: /becoming-an-apprentice
|
76
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
77
|
-
metadata:
|
78
|
-
document_type: Speech
|
79
|
-
organisation: DfE and Ofqual
|
80
|
-
public_updated_at: 2016-06-27 10:29:44
|
81
|
-
- link:
|
82
|
-
text: Becoming an apprentice
|
83
|
-
path: /becoming-an-apprentice
|
84
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
85
|
-
metadata:
|
86
|
-
document_type: Speech
|
87
|
-
organisation: DfE and Ofqual
|
88
|
-
public_updated_at: 2016-06-27 10:29:44
|
89
|
-
featured_card:
|
90
|
-
description: "Used to highlight a specific content item within the highlight boxes, e.g: the most popular."
|
91
|
-
data:
|
92
|
-
items:
|
93
|
-
- link:
|
94
|
-
text: Becoming an apprentice
|
95
|
-
path: /becoming-an-apprentice
|
96
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
97
|
-
featured: true
|
98
|
-
metadata:
|
99
|
-
document_type: Speech
|
100
|
-
organisation: DfE and Ofqual
|
101
|
-
public_updated_at: 2016-06-27 10:29:44
|
102
|
-
- link:
|
103
|
-
text: Becoming an apprentice
|
104
|
-
path: /becoming-an-apprentice
|
105
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
106
|
-
metadata:
|
107
|
-
document_type: Speech
|
108
|
-
organisation: DfE and Ofqual
|
109
|
-
public_updated_at: 2016-06-27 10:29:44
|
110
|
-
half_width:
|
111
|
-
description: The default component displays 3 highlight boxes in on row on desktop; 2 on tablet; and full-width on mobile. There are cases where we might want to show just two items per row even on desktop, for example two-third layouts.
|
112
|
-
data:
|
113
|
-
half_width: true
|
114
|
-
items:
|
115
|
-
- link:
|
116
|
-
text: Becoming an apprentice
|
117
|
-
path: /becoming-an-apprentice
|
118
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
119
|
-
metadata:
|
120
|
-
document_type: Speech
|
121
|
-
organisation: DfE and Ofqual
|
122
|
-
public_updated_at: 2016-06-27 10:29:44
|
123
|
-
- link:
|
124
|
-
text: Becoming an apprentice
|
125
|
-
path: /becoming-an-apprentice
|
126
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
127
|
-
metadata:
|
128
|
-
document_type: Speech
|
129
|
-
organisation: DfE and Ofqual
|
130
|
-
public_updated_at: 2016-06-27 10:29:44
|
131
|
-
- link:
|
132
|
-
text: Becoming an apprentice
|
133
|
-
path: /becoming-an-apprentice
|
134
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
135
|
-
metadata:
|
136
|
-
document_type: Speech
|
137
|
-
organisation: DfE and Ofqual
|
138
|
-
public_updated_at: 2016-06-27 10:29:44
|
139
|
-
with_data_tracking_attributes:
|
140
|
-
data:
|
141
|
-
items:
|
142
|
-
- link:
|
143
|
-
text: Becoming an apprentice
|
144
|
-
path: /becoming-an-apprentice
|
145
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
146
|
-
data_attributes: {
|
147
|
-
track_category: "servicesHighlightBoxClicked",
|
148
|
-
track_action: 1,
|
149
|
-
track_label: "/becoming-an-apprentice"
|
150
|
-
}
|
151
|
-
metadata:
|
152
|
-
document_type: Speech
|
153
|
-
organisation: DfE and Ofqual
|
154
|
-
public_updated_at: 2016-06-27 10:29:44
|
155
|
-
- link:
|
156
|
-
text: Becoming an apprentice
|
157
|
-
path: /becoming-an-apprentice
|
158
|
-
description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
|
159
|
-
data_attributes: {
|
160
|
-
track_category: "servicesHighlightBoxClicked",
|
161
|
-
track_action: 2,
|
162
|
-
track_label: "/becoming-an-apprentice",
|
163
|
-
track_options: {
|
164
|
-
dimension28: 2,
|
165
|
-
dimension29: "Becoming an apprentice"
|
166
|
-
}
|
167
|
-
}
|
168
|
-
metadata:
|
169
|
-
document_type: Speech
|
170
|
-
organisation: DfE and Ofqual
|
171
|
-
public_updated_at: 2016-06-27 10:29:44
|
@@ -1,112 +0,0 @@
|
|
1
|
-
name: Taxonomy list
|
2
|
-
description: Wraps the highlight box, document list and image card components in one list. This is commonly used on topic pages for links to tagged content.
|
3
|
-
body: |
|
4
|
-
The [highlight box](/component-guide/highlight_boxes), [document list](/component-guide/document_list) and [image card](/component-guide/image_card) components are standalone components.
|
5
|
-
|
6
|
-
However, there are some use cases where we want to use these components together to render one list of links. This is not possible when using the components separately.
|
7
|
-
This component wraps these components in one list, and applies relevant styling to get them to display appropriately together.
|
8
|
-
|
9
|
-
**Note:** At the moment, this component only works when displaying either highlight box + document list **or** image cards + document list. The layout for combining all three together hasn't been fixed.
|
10
|
-
accessibility_criteria: |
|
11
|
-
The taxonomy list should:
|
12
|
-
|
13
|
-
- Wrap all links in one list
|
14
|
-
- Should not be used to display links that don't belong together in one list
|
15
|
-
shared_accessibility_criteria:
|
16
|
-
- link
|
17
|
-
examples:
|
18
|
-
default:
|
19
|
-
data:
|
20
|
-
highlight_box:
|
21
|
-
inverse: true
|
22
|
-
items:
|
23
|
-
- link:
|
24
|
-
text: If your child is taken into care
|
25
|
-
path: /child-into-care
|
26
|
-
description: Information on what to do if your child is taken into care
|
27
|
-
metadata:
|
28
|
-
document_type: Detailed guide
|
29
|
-
- link:
|
30
|
-
text: High needs funding
|
31
|
-
path: /high-needs-funding
|
32
|
-
metadata:
|
33
|
-
document_type: Guide
|
34
|
-
public_updated_at: 2016-06-27 10:29:44
|
35
|
-
- link:
|
36
|
-
text: Student Finance
|
37
|
-
path: /student-finance
|
38
|
-
description: Student loan information
|
39
|
-
metadata:
|
40
|
-
document_type: Detailed guide
|
41
|
-
- link:
|
42
|
-
text: If your child is taken into care
|
43
|
-
path: /child-into-care
|
44
|
-
description: Information on what to do if your child is taken into care
|
45
|
-
metadata:
|
46
|
-
document_type: Detailed guide
|
47
|
-
document_list:
|
48
|
-
items:
|
49
|
-
- link:
|
50
|
-
text: If your child is taken into care
|
51
|
-
path: /child-into-care
|
52
|
-
metadata:
|
53
|
-
document_type: Detailed guide
|
54
|
-
- link:
|
55
|
-
text: High needs funding
|
56
|
-
path: /high-needs-funding
|
57
|
-
metadata:
|
58
|
-
document_type: Guide
|
59
|
-
with_image_cards:
|
60
|
-
data:
|
61
|
-
image_cards:
|
62
|
-
items:
|
63
|
-
- link:
|
64
|
-
path: /not-a-page
|
65
|
-
text: News headline
|
66
|
-
heading_level: 0
|
67
|
-
image:
|
68
|
-
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
69
|
-
alt: some meaningful alt text please
|
70
|
-
context:
|
71
|
-
text: The Rt Hon
|
72
|
-
- link:
|
73
|
-
path: /not-a-page
|
74
|
-
text: News headline
|
75
|
-
heading_level: 0
|
76
|
-
image:
|
77
|
-
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
78
|
-
alt: some meaningful alt text please
|
79
|
-
context:
|
80
|
-
text: The Rt Hon
|
81
|
-
- link:
|
82
|
-
path: /not-a-page
|
83
|
-
text: News headline
|
84
|
-
heading_level: 0
|
85
|
-
image:
|
86
|
-
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
87
|
-
alt: some meaningful alt text please
|
88
|
-
context:
|
89
|
-
text: The Rt Hon
|
90
|
-
- link:
|
91
|
-
path: /not-a-page
|
92
|
-
text: News headline
|
93
|
-
heading_level: 0
|
94
|
-
image:
|
95
|
-
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
96
|
-
alt: some meaningful alt text please
|
97
|
-
context:
|
98
|
-
text: This is a document
|
99
|
-
date: 2016-06-27 10:29:44
|
100
|
-
document_list:
|
101
|
-
items:
|
102
|
-
- link:
|
103
|
-
text: If your child is taken into care
|
104
|
-
path: /child-into-care
|
105
|
-
description: What happens if your child is taken into care
|
106
|
-
metadata:
|
107
|
-
document_type: Detailed guide
|
108
|
-
- link:
|
109
|
-
text: High needs funding
|
110
|
-
path: /high-needs-funding
|
111
|
-
metadata:
|
112
|
-
document_type: Guide
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module GovukPublishingComponents
|
2
|
-
module Presenters
|
3
|
-
class TaxonomyListHelper
|
4
|
-
def initialize(image_cards)
|
5
|
-
@image_cards = image_cards
|
6
|
-
end
|
7
|
-
|
8
|
-
def image_card_data
|
9
|
-
@image_cards[:items].map do |image_card|
|
10
|
-
{
|
11
|
-
context: image_card[:image][:context],
|
12
|
-
href: image_card[:link][:path],
|
13
|
-
heading_text: image_card[:link][:text],
|
14
|
-
image_src: image_card[:image][:url],
|
15
|
-
image_alt: image_card[:image][:alt],
|
16
|
-
heading_level: image_card[:link][:heading_level],
|
17
|
-
href_data_attributes: image_card[:link][:data_attributes],
|
18
|
-
}
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|