govuk_publishing_components 13.5.3 → 13.5.4

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: eb6f0a6a88e800116e375c194590701993f18afb31af15c9f618b5c262d7cd9e
4
- data.tar.gz: fdf68a7b9d3242654437d6c720522f1bdb81ede1986067fb3b005e925e97228d
3
+ metadata.gz: 93fab2d996e30368c246e96ba84d3c6f8034c619dee13791b3f209ae67ded1cb
4
+ data.tar.gz: fbaff11c00bd6487bc157fc927a173011cfc32857c7476705182d7ab724c1d1e
5
5
  SHA512:
6
- metadata.gz: f518f82c42467d896db37a6f8fa4598859eaf31ac46f8a1d53f10e46882e489956f04295b14b0d7152c7e33ae423f2fbcb771146febcd91f384917604c898d8f
7
- data.tar.gz: 18e35556379c6b172aab0941d0f3fea45476366bf79ca1be0a32e91315d265060958d7787383f51e982ea610df9e6bf0b5c0b129e811dd68beac18b81c4dba0e
6
+ metadata.gz: fad9c0567d6e603a133066c0a03f4a31419b51baf7e04a2e618d1d5efd5f2b0d20019fff7814d79685b4f011685a73530182741107077b481f1f91a6941be6fc
7
+ data.tar.gz: 90d2b3b7226d9e831789704b7477684c90e9469ec94316a87b59c1fb8a43cd7bb16d59342250469c184fa5fcea4618f2091591dfb46063c30633f813a88d5ce3
@@ -54,3 +54,9 @@
54
54
  background-color: govuk-colour("yellow");
55
55
  color: govuk-colour("black");
56
56
  }
57
+
58
+ .govuk-header__navigation-item--collapsed-menu-only {
59
+ @include govuk-media-query($from: desktop) {
60
+ display: none;
61
+ }
62
+ }
@@ -1 +1,14 @@
1
1
  @import "govuk-frontend/components/panel/panel";
2
+
3
+ .gem-c-panel__prepend {
4
+ @include govuk-font($size: 24, $weight: bold);
5
+ margin-bottom: govuk-spacing(3);
6
+ }
7
+
8
+ .gem-c-panel__append {
9
+ @include govuk-font($size: 24, $weight: bold);
10
+ }
11
+
12
+ .gem-c-panel__prepend ~ .govuk-panel__title {
13
+ margin-bottom: govuk-spacing(3);
14
+ }
@@ -7,12 +7,12 @@
7
7
  end
8
8
 
9
9
  email_regex = /[^\s=\/?&]+(?:@|%40)[^\s=\/?&]+/
10
- path_without_pii = utf_encode(request.original_url.gsub(email_regex, '[email]'))
11
- url_without_pii = utf_encode(request.fullpath.gsub(email_regex, '[email]'))
10
+ url_without_pii = utf_encode(request.original_url.gsub(email_regex, '[email]'))
11
+ path_without_pii = utf_encode(request.fullpath.gsub(email_regex, '[email]'))
12
12
  %>
13
13
 
14
14
  <div class="gem-c-feedback <%= margin_top_class %>" data-module="feedback">
15
15
  <%= render "govuk_publishing_components/components/feedback/yes_no_banner" %>
16
- <%= render "govuk_publishing_components/components/feedback/problem_form", path_without_pii: path_without_pii %>
17
- <%= render "govuk_publishing_components/components/feedback/survey_signup_form", path_without_pii: path_without_pii, url_without_pii: url_without_pii %>
16
+ <%= render "govuk_publishing_components/components/feedback/problem_form", url_without_pii: url_without_pii %>
17
+ <%= render "govuk_publishing_components/components/feedback/survey_signup_form", url_without_pii: url_without_pii, path_without_pii: path_without_pii %>
18
18
  </div>
@@ -40,7 +40,8 @@
40
40
  <nav>
41
41
  <ul id="navigation" class="govuk-header__navigation govuk-header__navigation--end" aria-label="Top Level Navigation">
42
42
  <% navigation_items.each_with_index do |item, index| %>
43
- <li class="govuk-header__navigation-item <%= "govuk-header__navigation-item--active" if item[:active] %>">
43
+ <li class="govuk-header__navigation-item <%= "govuk-header__navigation-item--active" if item[:active] %>
44
+ <%= "govuk-header__navigation-item--collapsed-menu-only" if item[:show_only_in_collapsed_menu] %>">
44
45
  <%= link_to(
45
46
  item[:text],
46
47
  item[:href],
@@ -1,13 +1,25 @@
1
1
  <%
2
2
  description ||= false
3
+ prepend ||= false
4
+ append ||= false
3
5
  %>
4
6
  <div class="gem-c-panel govuk-panel govuk-panel--confirmation">
7
+ <% if prepend %>
8
+ <div class="gem-c-panel__prepend">
9
+ <%= prepend %>
10
+ </div>
11
+ <% end %>
5
12
  <h2 class="govuk-panel__title">
6
13
  <%= title %>
7
14
  </h2>
8
15
  <% if description %>
9
16
  <div class="govuk-panel__body">
10
- <%= description %>
17
+ <%= description %>
18
+ </div>
19
+ <% end %>
20
+ <% if append %>
21
+ <div class="gem-c-panel__append">
22
+ <%= append %>
11
23
  </div>
12
24
  <% end %>
13
25
  </div>
@@ -31,6 +31,9 @@ examples:
31
31
  active: true
32
32
  - text: Navigation item 2
33
33
  href: "#2"
34
+ - text: Hidden on desktop
35
+ href: "#3"
36
+ show_only_in_collapsed_menu: true
34
37
  full_width:
35
38
  description: |
36
39
  This is difficult to preview because the preview windows are constrained, but the header will stretch to the size of its container.
@@ -14,3 +14,12 @@ examples:
14
14
  no_description:
15
15
  data:
16
16
  title: Content has been published
17
+ with_prepend:
18
+ data:
19
+ prepend: The clocks go forward
20
+ title: 31 March
21
+ with_prepend_and_append:
22
+ data:
23
+ prepend: The next bank holiday in England and Wales is
24
+ title: 19 April
25
+ append: Good Friday
@@ -16,7 +16,7 @@
16
16
  <div class="gem-c-feedback__column-two-thirds">
17
17
  <div class="gem-c-feedback__error-summary gem-c-feedback__js-show js-hidden js-errors" tabindex="-1"></div>
18
18
 
19
- <input type="hidden" name="url" value="<%= path_without_pii %>">
19
+ <input type="hidden" name="url" value="<%= url_without_pii %>">
20
20
 
21
21
  <h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
22
22
  <p id="feedback_explanation" class="gem-c-feedback__form-paragraph">Don’t include personal or financial information like your National Insurance number or credit card details.</p>
@@ -17,7 +17,7 @@
17
17
  <div class="gem-c-feedback__error-summary js-hidden js-errors" tabindex="-1"></div>
18
18
 
19
19
  <input name="email_survey_signup[survey_id]" type="hidden" value="footer_satisfaction_survey">
20
- <input name="email_survey_signup[survey_source]" type="hidden" value="<%= path_without_pii %>">
20
+ <input name="email_survey_signup[survey_source]" type="hidden" value="<%= url_without_pii %>">
21
21
  <input name="email_survey_signup[ga_client_id]" type="hidden" value="1627485790.1515403243">
22
22
 
23
23
  <h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
@@ -35,7 +35,7 @@
35
35
  <%= render "govuk_publishing_components/components/button", {
36
36
  text: "Send me the survey"
37
37
  } %>
38
- <a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=<%= url_without_pii %>&amp;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>
38
+ <a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=<%= path_without_pii %>&amp;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>
39
39
  </div>
40
40
  </div>
41
41
  </form>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '13.5.3'.freeze
2
+ VERSION = '13.5.4'.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: 13.5.3
4
+ version: 13.5.4
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: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govspeak