govuk_publishing_components 11.2.0 → 12.0.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/favicon-example.png +0 -0
- data/app/assets/images/govuk_publishing_components/favicon-production.png +0 -0
- data/app/assets/javascripts/component_guide/application.js +1 -1
- data/app/assets/javascripts/component_guide/no_slimmer.js +15 -0
- data/app/assets/javascripts/govuk_publishing_components/admin_scripts.js +2 -4
- data/app/assets/javascripts/govuk_publishing_components/all_components.js +4 -0
- data/app/assets/stylesheets/component_guide/application.scss +80 -74
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +26 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +21 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +7 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-alert.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +24 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +19 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +11 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +12 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +9 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +11 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +7 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +9 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +4 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +12 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +16 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +7 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +8 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +5 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +30 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +14 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss +10 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +7 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +24 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +47 -13
- data/app/controllers/govuk_publishing_components/application_controller.rb +5 -6
- data/app/views/govuk_publishing_components/component_guide/index.html.erb +2 -2
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +9 -9
- data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_feedback.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +4 -7
- data/app/views/govuk_publishing_components/components/_notice.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_subscription-links.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_taxonomy_navigation.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/tabs.yml +7 -7
- data/app/views/govuk_publishing_components/components/metadata/_sentence.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +3 -3
- data/app/views/layouts/govuk_publishing_components/application.html.erb +43 -44
- data/config/initializers/assets.rb +2 -0
- data/lib/govuk_publishing_components/app_helpers/environment.rb +1 -0
- data/lib/govuk_publishing_components/config.rb +1 -1
- data/lib/govuk_publishing_components/engine.rb +0 -1
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +1 -1
- data/lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/jquery/AUTHORS.txt +266 -0
- data/node_modules/jquery/LICENSE.txt +36 -0
- data/node_modules/jquery/README.md +65 -0
- data/node_modules/jquery/bower.json +14 -0
- data/node_modules/jquery/dist/jquery.js +11008 -0
- data/node_modules/jquery/dist/jquery.min.js +5 -0
- data/node_modules/jquery/dist/jquery.min.map +1 -0
- data/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +2143 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/node_modules/jquery/package.json +157 -0
- data/node_modules/jquery/src/ajax.js +842 -0
- data/node_modules/jquery/src/ajax/jsonp.js +100 -0
- data/node_modules/jquery/src/ajax/load.js +83 -0
- data/node_modules/jquery/src/ajax/parseJSON.js +53 -0
- data/node_modules/jquery/src/ajax/parseXML.js +31 -0
- data/node_modules/jquery/src/ajax/script.js +95 -0
- data/node_modules/jquery/src/ajax/var/location.js +3 -0
- data/node_modules/jquery/src/ajax/var/nonce.js +5 -0
- data/node_modules/jquery/src/ajax/var/rquery.js +3 -0
- data/node_modules/jquery/src/ajax/xhr.js +229 -0
- data/node_modules/jquery/src/attributes.js +11 -0
- data/node_modules/jquery/src/attributes/attr.js +281 -0
- data/node_modules/jquery/src/attributes/classes.js +174 -0
- data/node_modules/jquery/src/attributes/prop.js +156 -0
- data/node_modules/jquery/src/attributes/support.js +70 -0
- data/node_modules/jquery/src/attributes/val.js +191 -0
- data/node_modules/jquery/src/callbacks.js +232 -0
- data/node_modules/jquery/src/core.js +529 -0
- data/node_modules/jquery/src/core/access.js +65 -0
- data/node_modules/jquery/src/core/init.js +140 -0
- data/node_modules/jquery/src/core/parseHTML.js +41 -0
- data/node_modules/jquery/src/core/ready.js +163 -0
- data/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
- data/node_modules/jquery/src/css.js +563 -0
- data/node_modules/jquery/src/css/addGetHookIf.js +24 -0
- data/node_modules/jquery/src/css/adjustCSS.js +65 -0
- data/node_modules/jquery/src/css/curCSS.js +137 -0
- data/node_modules/jquery/src/css/defaultDisplay.js +72 -0
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +42 -0
- data/node_modules/jquery/src/css/showHide.js +45 -0
- data/node_modules/jquery/src/css/support.js +184 -0
- data/node_modules/jquery/src/css/var/cssExpand.js +3 -0
- data/node_modules/jquery/src/css/var/isHidden.js +16 -0
- data/node_modules/jquery/src/css/var/rmargin.js +3 -0
- data/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
- data/node_modules/jquery/src/css/var/swap.js +24 -0
- data/node_modules/jquery/src/data.js +342 -0
- data/node_modules/jquery/src/data/support.js +23 -0
- data/node_modules/jquery/src/data/var/acceptData.js +20 -0
- data/node_modules/jquery/src/deferred.js +159 -0
- data/node_modules/jquery/src/deprecated.js +34 -0
- data/node_modules/jquery/src/dimensions.js +56 -0
- data/node_modules/jquery/src/effects.js +640 -0
- data/node_modules/jquery/src/effects/Tween.js +121 -0
- data/node_modules/jquery/src/effects/animatedSelector.js +13 -0
- data/node_modules/jquery/src/effects/support.js +58 -0
- data/node_modules/jquery/src/event.js +1134 -0
- data/node_modules/jquery/src/event/ajax.js +20 -0
- data/node_modules/jquery/src/event/alias.js +25 -0
- data/node_modules/jquery/src/event/support.js +28 -0
- data/node_modules/jquery/src/exports/amd.js +24 -0
- data/node_modules/jquery/src/exports/global.js +26 -0
- data/node_modules/jquery/src/intro.js +44 -0
- data/node_modules/jquery/src/jquery.js +37 -0
- data/node_modules/jquery/src/manipulation.js +585 -0
- data/node_modules/jquery/src/manipulation/_evalUrl.js +21 -0
- data/node_modules/jquery/src/manipulation/buildFragment.js +157 -0
- data/node_modules/jquery/src/manipulation/createSafeFragment.js +20 -0
- data/node_modules/jquery/src/manipulation/getAll.js +33 -0
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +19 -0
- data/node_modules/jquery/src/manipulation/support.js +72 -0
- data/node_modules/jquery/src/manipulation/var/nodeNames.js +5 -0
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
- data/node_modules/jquery/src/manipulation/wrapMap.js +30 -0
- data/node_modules/jquery/src/offset.js +219 -0
- data/node_modules/jquery/src/outro.js +2 -0
- data/node_modules/jquery/src/queue.js +144 -0
- data/node_modules/jquery/src/queue/delay.js +22 -0
- data/node_modules/jquery/src/selector-sizzle.js +14 -0
- data/node_modules/jquery/src/selector.js +1 -0
- data/node_modules/jquery/src/serialize.js +125 -0
- data/node_modules/jquery/src/support.js +63 -0
- data/node_modules/jquery/src/traversing.js +179 -0
- data/node_modules/jquery/src/traversing/findFilter.js +100 -0
- data/node_modules/jquery/src/traversing/var/dir.js +20 -0
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/node_modules/jquery/src/traversing/var/siblings.js +15 -0
- data/node_modules/jquery/src/var/class2type.js +5 -0
- data/node_modules/jquery/src/var/concat.js +5 -0
- data/node_modules/jquery/src/var/deletedIds.js +3 -0
- data/node_modules/jquery/src/var/document.js +3 -0
- data/node_modules/jquery/src/var/documentElement.js +5 -0
- data/node_modules/jquery/src/var/hasOwn.js +5 -0
- data/node_modules/jquery/src/var/indexOf.js +5 -0
- data/node_modules/jquery/src/var/pnum.js +3 -0
- data/node_modules/jquery/src/var/push.js +5 -0
- data/node_modules/jquery/src/var/rcssNum.js +7 -0
- data/node_modules/jquery/src/var/rnotwhite.js +3 -0
- data/node_modules/jquery/src/var/slice.js +5 -0
- data/node_modules/jquery/src/var/support.js +5 -0
- data/node_modules/jquery/src/var/toString.js +5 -0
- data/node_modules/jquery/src/wrap.js +77 -0
- metadata +111 -19
- data/app/assets/images/govuk_publishing_components/favicon-test.png +0 -0
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +0 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_touch-friendly-links.scss +0 -11
data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss
CHANGED
@@ -1,17 +1,21 @@
|
|
1
|
-
@import "colours
|
2
|
-
|
3
|
-
// this uses the colours from govuk_frontend_toolkit
|
4
|
-
// https://github.com/alphagov/govuk_frontend_toolkit/blob/master/stylesheets/colours/_organisation.scss
|
1
|
+
@import "govuk-frontend/settings/colours-organisations";
|
2
|
+
@import "govuk-frontend/helpers/colour";
|
5
3
|
|
6
4
|
@mixin organisation-brand-colour() {
|
7
|
-
@each $organisation in $
|
8
|
-
.brand--#{
|
5
|
+
@each $organisation in map-keys($govuk-colours-organisations) {
|
6
|
+
.brand--#{$organisation} {
|
9
7
|
.brand__color {
|
10
|
-
color:
|
8
|
+
color: govuk-organisation-colour($organisation);
|
9
|
+
|
10
|
+
&:link,
|
11
|
+
&:visited,
|
12
|
+
&:active {
|
13
|
+
color: govuk-organisation-colour($organisation);
|
14
|
+
}
|
11
15
|
|
12
16
|
&:hover,
|
13
17
|
&:focus {
|
14
|
-
color: darken(
|
18
|
+
color: darken( govuk-organisation-colour($organisation), 10% );
|
15
19
|
}
|
16
20
|
}
|
17
21
|
|
@@ -19,7 +23,7 @@
|
|
19
23
|
// element as required by the heading component, adds 2KB to the CSS
|
20
24
|
&.brand__border-color,
|
21
25
|
.brand__border-color {
|
22
|
-
border-color:
|
26
|
+
border-color: govuk-organisation-colour($organisation, $websafe: false);
|
23
27
|
}
|
24
28
|
}
|
25
29
|
}
|
@@ -27,22 +31,52 @@
|
|
27
31
|
|
28
32
|
@include organisation-brand-colour;
|
29
33
|
|
34
|
+
// in the past we used the-office-of-the-leader-of-the-house-of-commons before
|
35
|
+
// the "the" prefix was dropped, this is maintained here for backwards
|
36
|
+
// compatibility
|
37
|
+
.brand--the-office-of-the-leader-of-the-house-of-commons {
|
38
|
+
.brand__color {
|
39
|
+
color: govuk-organisation-colour("office-of-the-leader-of-the-house-of-commons");
|
40
|
+
|
41
|
+
&:link,
|
42
|
+
&:visited,
|
43
|
+
&:active {
|
44
|
+
color: govuk-organisation-colour("office-of-the-leader-of-the-house-of-commons");
|
45
|
+
}
|
46
|
+
|
47
|
+
&:hover,
|
48
|
+
&:focus {
|
49
|
+
color: darken( govuk-organisation-colour("office-of-the-leader-of-the-house-of-commons"), 10% );
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
&.brand__border-color,
|
54
|
+
.brand__border-color {
|
55
|
+
border-color: govuk-organisation-colour("office-of-the-leader-of-the-house-of-commons", $websafe: false);
|
56
|
+
}
|
57
|
+
}
|
30
58
|
// colours for the prime ministers office are not included in the toolkit
|
31
59
|
// so are written out here for our use
|
32
60
|
|
33
61
|
.brand--prime-ministers-office-10-downing-street {
|
34
62
|
.brand__color {
|
35
|
-
color:
|
63
|
+
color: govuk-colour("bright-purple");
|
64
|
+
|
65
|
+
&:link,
|
66
|
+
&:visited,
|
67
|
+
&:active {
|
68
|
+
color: govuk-colour("bright-purple");
|
69
|
+
}
|
36
70
|
|
37
71
|
&:hover,
|
38
72
|
&:focus {
|
39
|
-
color: darken(
|
73
|
+
color: darken( govuk-colour("bright-purple"), 10% );
|
40
74
|
}
|
41
75
|
}
|
42
76
|
|
43
77
|
&.brand__border-color,
|
44
78
|
.brand__border-color {
|
45
|
-
border-color:
|
79
|
+
border-color: govuk-colour("black");
|
46
80
|
}
|
47
81
|
}
|
48
82
|
|
@@ -53,6 +87,6 @@
|
|
53
87
|
.brand--civil-service {
|
54
88
|
&.brand__border-color,
|
55
89
|
.brand__border-color {
|
56
|
-
border-color:
|
90
|
+
border-color: govuk-colour("black");
|
57
91
|
}
|
58
92
|
}
|
@@ -1,19 +1,18 @@
|
|
1
1
|
module GovukPublishingComponents
|
2
2
|
class ApplicationController < ActionController::Base
|
3
3
|
helper ::Rails.application.helpers
|
4
|
-
include Slimmer::Headers
|
5
4
|
protect_from_forgery with: :exception
|
6
|
-
before_action :set_custom_slimmer_headers
|
7
5
|
before_action :set_x_frame_options_header
|
6
|
+
before_action :set_disable_slimmer_header
|
8
7
|
|
9
8
|
private
|
10
9
|
|
11
|
-
def set_custom_slimmer_headers
|
12
|
-
set_slimmer_headers(remove_search: true)
|
13
|
-
end
|
14
|
-
|
15
10
|
def set_x_frame_options_header
|
16
11
|
response.headers["X-Frame-Options"] = "ALLOWALL"
|
17
12
|
end
|
13
|
+
|
14
|
+
def set_disable_slimmer_header
|
15
|
+
response.headers["X-Slimmer-Skip"] = "true"
|
16
|
+
end
|
18
17
|
end
|
19
18
|
end
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<ul class="component-list">
|
16
16
|
<% @component_docs.each do |component_doc| %>
|
17
17
|
<li>
|
18
|
-
<%= link_to component_doc.name, component_doc_path(component_doc.id) %>
|
18
|
+
<%= link_to component_doc.name, component_doc_path(component_doc.id), class: "govuk-link" %>
|
19
19
|
<p>
|
20
20
|
<%= component_doc.description %>
|
21
21
|
</p>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<ul class="component-list">
|
29
29
|
<% @gem_component_docs.each do |component_doc| %>
|
30
30
|
<li>
|
31
|
-
<%= link_to component_doc.name, component_doc_path(component_doc.id) %>
|
31
|
+
<%= link_to component_doc.name, component_doc_path(component_doc.id), class: "govuk-link" %>
|
32
32
|
<p>
|
33
33
|
<%= component_doc.description %>
|
34
34
|
</p>
|
@@ -8,12 +8,12 @@
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<div class="component-show">
|
11
|
-
<div class="grid-row">
|
12
|
-
<div class="column-two-thirds">
|
11
|
+
<div class="govuk-grid-row">
|
12
|
+
<div class="govuk-grid-column-two-thirds">
|
13
13
|
<% if !@component_doc.accessibility_criteria.present? %>
|
14
14
|
<div class="component-violation">
|
15
15
|
<h2 class="component-violation__title">This component is not valid</h2>
|
16
|
-
<
|
16
|
+
<a class="component-violation__link" href="https://github.com/alphagov/govuk_publishing_components/blob/master/docs/accessibility_acceptance_criteria.md">Please define accessibility acceptance criteria for this component.</a>
|
17
17
|
</div>
|
18
18
|
<% end %>
|
19
19
|
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @component_doc.description %>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<div class="component-doc">
|
29
29
|
<h2 class="component-doc-h2">How to call this component</h2>
|
30
30
|
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: @component_doc.example %>
|
31
|
-
<%= link_to "Search for usage on GitHub", @component_doc.github_search_url %>
|
31
|
+
<%= link_to "Search for usage on GitHub", @component_doc.github_search_url, class: "govuk-link" %>
|
32
32
|
<h2 class="component-doc-h2">How it looks</h2>
|
33
33
|
</div>
|
34
34
|
|
@@ -48,8 +48,8 @@
|
|
48
48
|
<% end %>
|
49
49
|
|
50
50
|
<% if @component_doc.accessibility_criteria.present? %>
|
51
|
-
<div class="grid-row component-accessibility-criteria">
|
52
|
-
<div class="column-two-thirds">
|
51
|
+
<div class="govuk-grid-row component-accessibility-criteria">
|
52
|
+
<div class="govuk-grid-column-two-thirds">
|
53
53
|
<h2 class="component-doc-h2">Accessibility acceptance criteria</h2>
|
54
54
|
<%= render 'govuk_publishing_components/components/govspeak', content: raw(@component_doc.html_accessibility_criteria) %>
|
55
55
|
</div>
|
@@ -59,13 +59,13 @@
|
|
59
59
|
<% if @component_doc.other_examples.any? %>
|
60
60
|
<div class="examples">
|
61
61
|
<h2 class="component-doc-h2">Other examples
|
62
|
-
<small>(<a href="<%= component_preview_all_path(@component_doc.id) %>">preview all</a>)</small>
|
62
|
+
<small>(<a href="<%= component_preview_all_path(@component_doc.id) %>" class="govuk-link">preview all</a>)</small>
|
63
63
|
</h2>
|
64
64
|
<% @component_doc.other_examples.each do |example| %>
|
65
65
|
<div class="component-example">
|
66
66
|
<h3 class="example-title">
|
67
|
-
<a href="<%= component_example_path(@component_doc.id, example.id) %>"><%= example.name %></a>
|
68
|
-
<small>(<a href="<%= component_preview_path(@component_doc.id, example.id) %>">preview</a>)</small>
|
67
|
+
<a href="<%= component_example_path(@component_doc.id, example.id) %>" class="govuk-link"><%= example.name %></a>
|
68
|
+
<small>(<a href="<%= component_preview_path(@component_doc.id, example.id) %>" class="govuk-link">preview</a>)</small>
|
69
69
|
</h3>
|
70
70
|
<%= render "govuk_publishing_components/components/govspeak", content: raw(example.html_description) %>
|
71
71
|
<%= render "govuk_publishing_components/component_guide/component_doc/call", component_doc: @component_doc, example: example %>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
is_link = crumb[:url].present? || crumb[:is_current_page]
|
19
19
|
path = crumb[:is_current_page] ? '#content' : crumb[:url]
|
20
20
|
aria_current = crumb[:is_current_page] ? 'page' : 'false'
|
21
|
-
css_class = invert_class.concat(crumb[:is_current_page] ? ' gem-c-breadcrumbs--current ' : '')
|
21
|
+
css_class = "gem-c-breadcrumbs__link " + invert_class.concat(crumb[:is_current_page] ? ' gem-c-breadcrumbs--current ' : '')
|
22
22
|
%>
|
23
23
|
|
24
24
|
<li class='gem-c-breadcrumbs__item <%= "gem-c-breadcrumbs--parent" if crumb[:is_page_parent] %>'>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<div class="gem-c-feedback <%= margin_top_class %>" data-module="feedback">
|
11
11
|
<div class="gem-c-feedback__prompt gem-c-feedback__js-show js-prompt" tabindex="-1">
|
12
|
-
<div class="js-prompt-questions">
|
12
|
+
<div class="gem-c-feedback__js-prompt-questions js-prompt-questions">
|
13
13
|
<h2 class="gem-c-feedback__prompt-question">Is this page useful?</h2>
|
14
14
|
|
15
15
|
<%= link_to contact_govuk_path, {
|
@@ -140,7 +140,7 @@
|
|
140
140
|
<%= render "govuk_publishing_components/components/button", {
|
141
141
|
text: "Send me the survey"
|
142
142
|
} %>
|
143
|
-
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=<%= stripped_url -%>&gcl=1627485790.1515403243" class="gem-c-feedback__email-link" id="take-survey" target="_blank" rel="noopener noreferrer">Don’t have an email address?</a>
|
143
|
+
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=<%= stripped_url -%>&gcl=1627485790.1515403243" class="gem-c-feedback__email-link govuk-link" id="take-survey" target="_blank" rel="noopener noreferrer">Don’t have an email address?</a>
|
144
144
|
</div>
|
145
145
|
</div>
|
146
146
|
</form>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<% card_helper.extra_links.each do |link| %>
|
34
34
|
<li class="gem-c-image-card__list-item">
|
35
35
|
<%= link_to link[:text], link[:href],
|
36
|
-
class: brand_helper.color_class,
|
36
|
+
class: "gem-c-image-card__list-item-link #{brand_helper.color_class}",
|
37
37
|
data: link[:data_attributes]
|
38
38
|
%>
|
39
39
|
</li>
|
@@ -1,18 +1,15 @@
|
|
1
|
+
<% product_name ||= "Publishing" %>
|
2
|
+
|
1
3
|
<!DOCTYPE html>
|
2
4
|
<html lang="en" class="govuk-template">
|
3
5
|
<head>
|
4
6
|
<meta charset="utf-8" />
|
5
|
-
<title><%= browser_title %></title>
|
7
|
+
<title><%= browser_title %> — GOV.UK <%= product_name %></title>
|
6
8
|
<meta name="robots" content="noindex,nofollow,noimageindex">
|
7
9
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
8
10
|
<%= csrf_meta_tags %>
|
9
11
|
<%= favicon_link_tag "govuk_publishing_components/favicon-#{environment}.png" %>
|
10
|
-
|
11
|
-
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles" %>
|
12
|
-
<!--<![endif]-->
|
13
|
-
<!--[if IE 8]>
|
14
|
-
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles_ie8" %>
|
15
|
-
<![endif]-->
|
12
|
+
<%= stylesheet_link_tag "govuk_publishing_components/admin_styles" %>
|
16
13
|
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
17
14
|
<%= yield :head %>
|
18
15
|
</head>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% if defined?(title) %>
|
2
2
|
<%
|
3
3
|
description_text ||= false
|
4
|
-
description_govspeak ||= yield ||
|
4
|
+
description_govspeak ||= yield || ""
|
5
5
|
margin_bottom_class = " gem-c-notice--bottom-margin" unless local_assigns[:margin_bottom]
|
6
6
|
%>
|
7
7
|
<section class="gem-c-notice<%= margin_bottom_class %>" aria-label="Notice" role="region">
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<p class="gem-c-notice__description"><%= description_text %></p>
|
16
16
|
<% end %>
|
17
17
|
|
18
|
-
<%
|
18
|
+
<% unless description_govspeak.empty? %>
|
19
19
|
<%= render 'govuk_publishing_components/components/govspeak', content: description_govspeak %>
|
20
20
|
<% end %>
|
21
21
|
</section>
|
data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
</span>
|
26
26
|
</span>
|
27
27
|
<% if previous_page[:label].present? %>
|
28
|
-
<span class="visually-hidden">:</span>
|
28
|
+
<span class="gem-c-pagination__link-divider visually-hidden">:</span>
|
29
29
|
<span class="gem-c-pagination__link-label"><%= previous_page[:label] %></span>
|
30
30
|
<% end %>
|
31
31
|
</a>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
</span>
|
52
52
|
</span>
|
53
53
|
<% if next_page[:label].present? %>
|
54
|
-
<span class="visually-hidden">:</span>
|
54
|
+
<span class="gem-c-pagination__link-divider visually-hidden">:</span>
|
55
55
|
<span class="gem-c-pagination__link-label"><%= next_page[:label] %></span>
|
56
56
|
<% end %>
|
57
57
|
</a>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<%= logic %>
|
57
57
|
<% else %>
|
58
58
|
<% step_number += 1 %>
|
59
|
-
<span class="visuallyhidden">Step</span> <%= step_number %><span class="visuallyhidden" aria-hidden="true">:</span>
|
59
|
+
<span class="gem-c-step-nav__circle-step-label visuallyhidden">Step</span> <%= step_number %><span class="gem-c-step-nav__circle-step-colon visuallyhidden" aria-hidden="true">:</span>
|
60
60
|
<% end %>
|
61
61
|
</span>
|
62
62
|
</span>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
class="gem-c-subscription-links <%= brand_helper.brand_class %>"
|
9
9
|
<%= "data-module=gem-toggle" if sl_helper.feed_link_box_value %>
|
10
10
|
>
|
11
|
-
<h2 class="visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
|
11
|
+
<h2 class="gem-c-subscription-links__hidden-header visuallyhidden"><%= t("govuk_component.subscription_links.subscriptions", default: "Subscriptions") %></h2>
|
12
12
|
<ul
|
13
13
|
class="gem-c-subscription-links__list"
|
14
14
|
<%= "data-module=track-click" if sl_helper.tracking_is_present? %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
<% if sl_helper.feed_link_box_value %>
|
36
36
|
<div class="gem-c-subscription-links__feed-box js-hidden" id="<%= sl_helper.feed_box_id %>">
|
37
|
-
<p class="gem-c-subscription-links__feed-description
|
37
|
+
<p class="gem-c-subscription-links__feed-hidden-description visuallyhidden"><%= sl_helper.feed_link_text %></p>
|
38
38
|
<%= render "govuk_publishing_components/components/input", {
|
39
39
|
label: {
|
40
40
|
text: "Copy and paste this URL into your feed reader"
|
@@ -63,7 +63,7 @@
|
|
63
63
|
<h3 class='gem-c-taxonomy-navigation__section-heading'>
|
64
64
|
<%= t("components.taxonomy_navigation.#{section_name}") %>
|
65
65
|
</h3>
|
66
|
-
<nav class='gem-c-taxonomy-navigation__navigation' data-module='toggle' role='navigation'>
|
66
|
+
<nav class='gem-c-taxonomy-navigation__navigation' data-module='gem-toggle' role='navigation'>
|
67
67
|
<ul class='gem-c-taxonomy-navigation__list'>
|
68
68
|
<% sidx = 0; hidden_links = [] %>
|
69
69
|
<% section.each_with_index do |item, idx| %>
|
@@ -102,7 +102,7 @@
|
|
102
102
|
</a>
|
103
103
|
</li>
|
104
104
|
<li class="gem-c-taxonomy-navigation__link">
|
105
|
-
<span id="toggle_<%= section_name %>" class="js-hidden">
|
105
|
+
<span id="toggle_<%= section_name %>" class="gem-c-taxonomy-navigation__toggle-more js-hidden">
|
106
106
|
<%= to_sentence(hidden_links) %>
|
107
107
|
</span>
|
108
108
|
</li>
|
@@ -22,7 +22,7 @@ examples:
|
|
22
22
|
data:
|
23
23
|
legend_text: |
|
24
24
|
<!-- Use the title component, this is hardcoded only for this example -->
|
25
|
-
<h1 style="font-size: 48px; line-height: 1.0416666667; font-weight: bold; margin
|
25
|
+
<h1 style="font-size: 48px; line-height: 1.0416666667; font-weight: bold; margin: 0 0 30px 0;">
|
26
26
|
Do you have a passport?
|
27
27
|
</h1>
|
28
28
|
text: |
|
@@ -27,11 +27,11 @@ examples:
|
|
27
27
|
- id: "tab1"
|
28
28
|
label: "First section"
|
29
29
|
content: |
|
30
|
-
<p>Fusce at dictum tellus, ac accumsan est. Nulla vitae turpis in nulla gravida tincidunt. Duis lectus felis, tempus id bibendum sit amet, posuere ut elit. Donec enim odio, eleifend in urna a, sagittis egestas est. Proin id ex ultricies, porta eros id, vehicula quam. Morbi non sagittis velit.</p>
|
30
|
+
<p class="govuk-body-m">Fusce at dictum tellus, ac accumsan est. Nulla vitae turpis in nulla gravida tincidunt. Duis lectus felis, tempus id bibendum sit amet, posuere ut elit. Donec enim odio, eleifend in urna a, sagittis egestas est. Proin id ex ultricies, porta eros id, vehicula quam. Morbi non sagittis velit.</p>
|
31
31
|
- id: "tab2"
|
32
32
|
label: "Second section"
|
33
33
|
content: |
|
34
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam congue elementum commodo. Vestibulum elit turpis, efficitur quis posuere vitae, commodo vitae augue. Donec ut pharetra ligula. Phasellus ac mauris eu felis bibendum dapibus rutrum sed quam. Pellentesque posuere ante id consequat pretium.</p>
|
34
|
+
<p class="govuk-body-m">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam congue elementum commodo. Vestibulum elit turpis, efficitur quis posuere vitae, commodo vitae augue. Donec ut pharetra ligula. Phasellus ac mauris eu felis bibendum dapibus rutrum sed quam. Pellentesque posuere ante id consequat pretium.</p>
|
35
35
|
without_panel_border:
|
36
36
|
data:
|
37
37
|
panel_border: false
|
@@ -39,11 +39,11 @@ examples:
|
|
39
39
|
- id: "tab-no-border-1"
|
40
40
|
label: "First section"
|
41
41
|
content: |
|
42
|
-
<p>Fusce at dictum tellus, ac accumsan est. Nulla vitae turpis in nulla gravida tincidunt. Duis lectus felis, tempus id bibendum sit amet, posuere ut elit. Donec enim odio, eleifend in urna a, sagittis egestas est. Proin id ex ultricies, porta eros id, vehicula quam. Morbi non sagittis velit.</p>
|
42
|
+
<p class="govuk-body-m">Fusce at dictum tellus, ac accumsan est. Nulla vitae turpis in nulla gravida tincidunt. Duis lectus felis, tempus id bibendum sit amet, posuere ut elit. Donec enim odio, eleifend in urna a, sagittis egestas est. Proin id ex ultricies, porta eros id, vehicula quam. Morbi non sagittis velit.</p>
|
43
43
|
- id: "tab-no-border-2"
|
44
44
|
label: "Second section"
|
45
45
|
content: |
|
46
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam congue elementum commodo. Vestibulum elit turpis, efficitur quis posuere vitae, commodo vitae augue. Donec ut pharetra ligula. Phasellus ac mauris eu felis bibendum dapibus rutrum sed quam. Pellentesque posuere ante id consequat pretium.</p>
|
46
|
+
<p class="govuk-body-m">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam congue elementum commodo. Vestibulum elit turpis, efficitur quis posuere vitae, commodo vitae augue. Donec ut pharetra ligula. Phasellus ac mauris eu felis bibendum dapibus rutrum sed quam. Pellentesque posuere ante id consequat pretium.</p>
|
47
47
|
with_title:
|
48
48
|
data:
|
49
49
|
tabs:
|
@@ -51,12 +51,12 @@ examples:
|
|
51
51
|
label: "First section"
|
52
52
|
title: "First section"
|
53
53
|
content: |
|
54
|
-
<p>Fusce at dictum tellus, ac accumsan est. Nulla vitae turpis in nulla gravida tincidunt. Duis lectus felis, tempus id bibendum sit amet, posuere ut elit. Donec enim odio, eleifend in urna a, sagittis egestas est. Proin id ex ultricies, porta eros id, vehicula quam. Morbi non sagittis velit.</p>
|
54
|
+
<p class="govuk-body-m">Fusce at dictum tellus, ac accumsan est. Nulla vitae turpis in nulla gravida tincidunt. Duis lectus felis, tempus id bibendum sit amet, posuere ut elit. Donec enim odio, eleifend in urna a, sagittis egestas est. Proin id ex ultricies, porta eros id, vehicula quam. Morbi non sagittis velit.</p>
|
55
55
|
- id: "tab-with-title-2"
|
56
56
|
label: "Second section"
|
57
57
|
title: "Second section"
|
58
58
|
content: |
|
59
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam congue elementum commodo. Vestibulum elit turpis, efficitur quis posuere vitae, commodo vitae augue. Donec ut pharetra ligula. Phasellus ac mauris eu felis bibendum dapibus rutrum sed quam. Pellentesque posuere ante id consequat pretium.</p>
|
59
|
+
<p class="govuk-body-m">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam congue elementum commodo. Vestibulum elit turpis, efficitur quis posuere vitae, commodo vitae augue. Donec ut pharetra ligula. Phasellus ac mauris eu felis bibendum dapibus rutrum sed quam. Pellentesque posuere ante id consequat pretium.</p>
|
60
60
|
single_item:
|
61
61
|
description: If only an individual item is supplied to the component (if the list is created dynamically, for example) it will be rendered without tabs.
|
62
62
|
data:
|
@@ -64,4 +64,4 @@ examples:
|
|
64
64
|
- id: "singletab"
|
65
65
|
label: "Single piece of content"
|
66
66
|
content: |
|
67
|
-
Here is a single piece of content, there should be no tabs
|
67
|
+
<p class="govuk-body-m">Here is a single piece of content, there should be no tabs.</p>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= t("govuk_component.metadata.toggle_more", number: remaining.length, default: "+ #{remaining.length} more") %>
|
18
18
|
</a>
|
19
19
|
</div>
|
20
|
-
<span id="toggle-<%= toggle_id %>" class="js-hidden"><%= remaining.to_sentence.html_safe %></span>
|
20
|
+
<span id="toggle-<%= toggle_id %>" class="gem-c-metadata__toggle-items js-hidden"><%= remaining.to_sentence.html_safe %></span>
|
21
21
|
<% else %>
|
22
22
|
<%= items.to_sentence.html_safe %>
|
23
23
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<nav role="navigation"
|
2
2
|
class="gem-c-related-navigation__nav-section"
|
3
3
|
aria-labelledby="related-nav-<%= section_title %>-<%= random %>"
|
4
|
-
data-module="toggle">
|
4
|
+
data-module="gem-toggle">
|
5
5
|
|
6
6
|
<% unless section_title === "related_items" %>
|
7
7
|
<h3 id="related-nav-<%= section_title %>-<%= random %>"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</h3>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<ul class="gem-c-related-
|
14
|
+
<ul class="gem-c-related-navigation__link-list" data-module="track-click">
|
15
15
|
<% constructed_link_array = [] %>
|
16
16
|
|
17
17
|
<% section_link_limit = related_nav_helper.calculate_section_link_limit(links) %>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
</li>
|
56
56
|
|
57
57
|
<li class="gem-c-related-navigation__link">
|
58
|
-
<span id="toggle_<%= section_title %>" class="js-hidden">
|
58
|
+
<span id="toggle_<%= section_title %>" class="gem-c-related-navigation__toggle-more js-hidden">
|
59
59
|
<%= to_sentence(constructed_link_array) %>
|
60
60
|
</span>
|
61
61
|
</li>
|