govuk_publishing_components 7.0.0 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bba4841a5d552322905968aee5f052211f27c6098b4852773783b31df829f89c
4
- data.tar.gz: 4dad4283c06f90c7ba5f344f06ab1e1ae689a525b759aecdfcbbf445e915f9f0
3
+ metadata.gz: aea5cae481a9b11f30bd16a7146a2d0159c4503d0086a0f955f462f3c58c167a
4
+ data.tar.gz: 9f8de3bb34f9b81cc85e9ca201dd6ddbae8623c0ed069d8485a02d1aaf875ca1
5
5
  SHA512:
6
- metadata.gz: 9ea2543a323847fe1a88c0857f5c4bcc6915399619519c31c884005faf9c1b422d0e92388933519840f39ceae547262ddfcb133332decd0ff312828dc4447f10
7
- data.tar.gz: 2514492ef7efafd17c6b6b893f88eefadd92edbc2d821c2b86ce3609c39887789219bf415fb14e08feb25a3e8c30f34b9e40170421210b08f50e6eedc72519ec
6
+ metadata.gz: 1add985825ea66e4feea446cd85d8acb649ffc5474513536acb1dcaab5cc004c108b6644393ba4a2bea47de1e0776e06a5f1bfb7adae8369b33c2695af9f43bf
7
+ data.tar.gz: 57938d8ca795fcc5fe03bef9be118faac6ea7ce16e38651cb231fea4f139872584a78c695039376b10afaf860460af57527b64fcd13ecd8095b64380ead5aa73
@@ -0,0 +1 @@
1
+ @import "../govuk_publishing_components/all_components";
@@ -0,0 +1 @@
1
+ @import "../govuk_publishing_components/all_components_print";
@@ -21,6 +21,8 @@
21
21
  @import "components/step-by-step-nav";
22
22
  @import "components/step-by-step-nav-header";
23
23
  @import "components/step-by-step-nav-related";
24
+ @import "components/subscription-links";
25
+ @import "components/translation-nav";
24
26
  @import "components/feedback";
25
27
  @import "components/inverse-header";
26
28
  @import "components/success-alert";
@@ -0,0 +1,40 @@
1
+ .gem-c-subscription-links {
2
+ @include bold-19;
3
+
4
+ .gem-c-subscription-links__list {
5
+ list-style: none;
6
+ margin-left: -$gutter-half / 2;
7
+ margin-right: -$gutter-half / 2;
8
+ }
9
+
10
+ .gem-c-subscription-links__list-item {
11
+ display: inline-block;
12
+ margin-left: $gutter-half / 2;
13
+ margin-right: $gutter-half / 2;
14
+ margin-bottom: $gutter-half;
15
+ }
16
+
17
+ .gem-c-subscription-links__link {
18
+ text-decoration: none;
19
+ padding-left: 28px;
20
+ background-repeat: no-repeat;
21
+ background-position: 0 20%;
22
+
23
+ @include media(tablet) {
24
+ background-position: 0 35%;
25
+ }
26
+ }
27
+
28
+ .gem-c-subscription-links__link--feed {
29
+ background-image: image-url("govuk_publishing_components/feed-icon-black.png");
30
+ }
31
+
32
+ .gem-c-subscription-links__link--email-alerts {
33
+ background-image: image-url("govuk_publishing_components/mail-icon.png");
34
+
35
+ @include device-pixel-ratio() {
36
+ background-image: image-url("govuk_publishing_components/mail-icon-x2.png");
37
+ background-size: 20px 14px;
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,35 @@
1
+ .gem-c-translation-nav {
2
+ @include responsive-top-margin;
3
+ @include core-16;
4
+ margin-bottom: $gutter;
5
+ border-bottom: 1px solid $border-colour;
6
+ }
7
+
8
+ .gem-c-translation-nav__list {
9
+ @extend %contain-floats;
10
+ list-style: none;
11
+ margin-left: -$gutter-one-third;
12
+ margin-right: -$gutter-one-third;
13
+ }
14
+
15
+ .gem-c-translation-nav__list-item {
16
+ float: left;
17
+ padding-left: $gutter-one-third;
18
+ padding-right: $gutter-one-third;
19
+ margin-bottom: $gutter-one-third;
20
+ border-right: 1px solid $border-colour;
21
+ height: 16px;
22
+
23
+ .direction-rtl & {
24
+ direction: rtl;
25
+ float: right;
26
+ text-align: start;
27
+ border-left: 1px solid $border-colour;
28
+ border-right: 0;
29
+ }
30
+ }
31
+
32
+ .gem-c-translation-nav__list-item:last-child {
33
+ border-right: 0;
34
+ border-left: 0;
35
+ }
@@ -0,0 +1,21 @@
1
+ <%
2
+ email_signup_link ||= false
3
+ feed_link ||= false
4
+ %>
5
+ <% if email_signup_link || feed_link %>
6
+ <section class="gem-c-subscription-links">
7
+ <h2 class="visuallyhidden">Subscriptions</h2>
8
+ <ul class="gem-c-subscription-links__list">
9
+ <% if email_signup_link.present? %>
10
+ <li class="gem-c-subscription-links__list-item">
11
+ <%= link_to "Get email alerts", email_signup_link, class: "gem-c-subscription-links__link gem-c-subscription-links__link--email-alerts" %>
12
+ </li>
13
+ <% end %>
14
+ <% if feed_link.present? %>
15
+ <li class="gem-c-subscription-links__list-item">
16
+ <%= link_to "Subscribe to feed", feed_link, class: "gem-c-subscription-links__link gem-c-subscription-links__link--feed" %>
17
+ </li>
18
+ <% end %>
19
+ </ul>
20
+ </section>
21
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% translations ||= [] %>
2
+ <% if translations.length > 1 %>
3
+ <nav role="navigation" class="gem-c-translation-nav" aria-label="<%= t("common.translations") %>">
4
+ <ul class="gem-c-translation-nav__list">
5
+ <% translations.each.with_index do |translation, i| %>
6
+ <li class="gem-c-translation-nav__list-item">
7
+ <% if translation[:active] %>
8
+ <span lang="<%= translation[:locale] %>"><%= translation[:text] %></span>
9
+ <% else %>
10
+ <%= link_to translation[:text], translation[:base_path], hreflang: translation[:locale], lang: translation[:locale], rel: "alternate" %>
11
+ <% end %>
12
+ </li>
13
+ <% end %>
14
+ </ul>
15
+ </nav>
16
+ <% end %>
@@ -0,0 +1,17 @@
1
+ name: Subscription links
2
+ description: Links to ‘Get email alerts’ and ‘Subscribe to feed’
3
+ accessibility_criteria: |
4
+ Icons in subscription links must be presentational and ignored by screen readers.
5
+ shared_accessibility_criteria:
6
+ - link
7
+ examples:
8
+ default:
9
+ data:
10
+ email_signup_link: '/foreign-travel-advice/singapore/email-signup'
11
+ feed_link: '/foreign-travel-advice/singapore.atom'
12
+ with_only_email_signup_link:
13
+ data:
14
+ email_signup_link: '/foreign-travel-advice/singapore/email-signup'
15
+ with_only_feed_link:
16
+ data:
17
+ feed_link: '/foreign-travel-advice/singapore.atom'
@@ -0,0 +1,61 @@
1
+ name: Translation navigation
2
+ description: A list of links to available translations
3
+ body: The active property indicates the current language.
4
+ accessibility_criteria: |
5
+ The component must:
6
+
7
+ - be [a landmark with a navigation role](https://accessibility.blog.gov.uk/2016/05/27/using-navigation-landmarks/)
8
+ - have an accessible name in the current language, eg "Translations"
9
+
10
+ The translation links must:
11
+
12
+ - [identify the language of the text](https://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html#meaning-other-lang-id-examples-head)
13
+
14
+ [Watch a screen reader pronounce text differently based on lang attribute](https://bit.ly/screenreaderpronunciation)
15
+ shared_accessibility_criteria:
16
+ - link
17
+ examples:
18
+ default:
19
+ data:
20
+ translations:
21
+ - locale: 'en'
22
+ base_path: '/en'
23
+ text: 'English'
24
+ active: true
25
+ - locale: 'hi'
26
+ base_path: '/hi'
27
+ text: 'हिंदी'
28
+ multiple_translations:
29
+ data:
30
+ translations:
31
+ - locale: 'en'
32
+ base_path: '/en'
33
+ text: 'English'
34
+ active: true
35
+ - locale: 'fr'
36
+ base_path: '/fr'
37
+ text: 'Français'
38
+ - locale: 'hi'
39
+ base_path: '/hi'
40
+ text: 'हिंदी'
41
+ - locale: 'ja'
42
+ base_path: '/ja'
43
+ text: '日本語'
44
+ - locale: 'ur'
45
+ base_path: '/ur'
46
+ text: 'اردو'
47
+ - locale: 'zh'
48
+ base_path: '/zh'
49
+ text: '中文'
50
+ right_to_left:
51
+ data:
52
+ translations:
53
+ - locale: 'en'
54
+ base_path: '/en'
55
+ text: 'English'
56
+ - locale: 'ar'
57
+ base_path: '/ar'
58
+ text: 'العربية'
59
+ active: true
60
+ context:
61
+ right_to_left: true
@@ -12,6 +12,12 @@
12
12
  </title>
13
13
  <%= stylesheet_link_tag "component_guide/application", media: "screen" %>
14
14
  <%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_stylesheet}" %>
15
+
16
+ <% if GovukPublishingComponents::Config.static %>
17
+ <%= stylesheet_link_tag "component_guide/all_components", media: "screen" %>
18
+ <%= stylesheet_link_tag "component_guide/all_components_print", media: "print" %>
19
+ <% end %>
20
+
15
21
  <% if GovukPublishingComponents::Config.application_print_stylesheet %>
16
22
  <%= stylesheet_link_tag "#{GovukPublishingComponents::Config.application_print_stylesheet}", media: "print" %>
17
23
  <% end %>
@@ -1 +1,9 @@
1
- Rails.application.config.assets.precompile += %w(govuk_publishing_components/component_guide.css govuk_publishing_components/search-button.png)
1
+ Rails.application.config.assets.precompile += %w(
2
+ govuk_publishing_components/component_guide.css
3
+ component_guide/all_components.css
4
+ component_guide/all_components_print.css
5
+ govuk_publishing_components/search-button.png
6
+ govuk_publishing_components/feed-icon-black.png
7
+ govuk_publishing_components/mail-icon-x2.png
8
+ govuk_publishing_components/mail-icon.png
9
+ )
@@ -20,6 +20,8 @@
20
20
  # available at http://guides.rubyonrails.org/i18n.html.
21
21
 
22
22
  en:
23
+ common:
24
+ translations: "Translations"
23
25
  components:
24
26
  back_link:
25
27
  back: 'Back'
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '7.0.0'.freeze
2
+ VERSION = '7.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-30 00:00:00.000000000 Z
11
+ date: 2018-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -301,6 +301,9 @@ files:
301
301
  - README.md
302
302
  - Rakefile
303
303
  - app/assets/config/govuk_publishing_components_manifest.js
304
+ - app/assets/images/govuk_publishing_components/feed-icon-black.png
305
+ - app/assets/images/govuk_publishing_components/mail-icon-x2.png
306
+ - app/assets/images/govuk_publishing_components/mail-icon.png
304
307
  - app/assets/images/govuk_publishing_components/search-button.png
305
308
  - app/assets/javascripts/component_guide/accessibility-test.js
306
309
  - app/assets/javascripts/component_guide/application.js
@@ -315,6 +318,8 @@ files:
315
318
  - app/assets/javascripts/govuk_publishing_components/lib/current-location.js
316
319
  - app/assets/javascripts/govuk_publishing_components/lib/history-support.js
317
320
  - app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js
321
+ - app/assets/stylesheets/component_guide/all_components.scss
322
+ - app/assets/stylesheets/component_guide/all_components_print.scss
318
323
  - app/assets/stylesheets/component_guide/application.scss
319
324
  - app/assets/stylesheets/govuk_publishing_components/_all_components.scss
320
325
  - app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss
@@ -334,8 +339,10 @@ files:
334
339
  - app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss
335
340
  - app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss
336
341
  - app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss
342
+ - app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss
337
343
  - app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss
338
344
  - app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss
345
+ - app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss
339
346
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_px-to-em.scss
340
347
  - app/assets/stylesheets/govuk_publishing_components/components/helpers/_variables.scss
341
348
  - app/assets/stylesheets/govuk_publishing_components/components/mixins/_clearfix.scss
@@ -377,8 +384,10 @@ files:
377
384
  - app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb
378
385
  - app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
379
386
  - app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb
387
+ - app/views/govuk_publishing_components/components/_subscription-links.html.erb
380
388
  - app/views/govuk_publishing_components/components/_success_alert.html.erb
381
389
  - app/views/govuk_publishing_components/components/_taxonomy_navigation.html.erb
390
+ - app/views/govuk_publishing_components/components/_translation-nav.html.erb
382
391
  - app/views/govuk_publishing_components/components/docs/back_link.yml
383
392
  - app/views/govuk_publishing_components/components/docs/button.yml
384
393
  - app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml
@@ -398,8 +407,10 @@ files:
398
407
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml
399
408
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml
400
409
  - app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml
410
+ - app/views/govuk_publishing_components/components/docs/subscription-links.yml
401
411
  - app/views/govuk_publishing_components/components/docs/success_alert.yml
402
412
  - app/views/govuk_publishing_components/components/docs/taxonomy_navigation.yml
413
+ - app/views/govuk_publishing_components/components/docs/translation-nav.yml
403
414
  - app/views/govuk_publishing_components/components/related_navigation/_section.html.erb
404
415
  - app/views/layouts/govuk_publishing_components/application.html.erb
405
416
  - config/initializers/assets.rb