govuk_publishing_components 21.60.3 → 21.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +102 -73
  3. data/app/assets/javascripts/govuk_publishing_components/ie.js +2 -0
  4. data/app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js +4 -0
  5. data/app/assets/javascripts/govuk_publishing_components/vendor/json2.js +487 -0
  6. data/app/assets/stylesheets/component_guide/application.scss +4 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +8 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +4 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +87 -1
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +46 -0
  12. data/app/models/govuk_publishing_components/component_example.rb +4 -0
  13. data/app/views/govuk_publishing_components/component_guide/component_doc/_component.html.erb +1 -0
  14. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +32 -21
  15. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +76 -0
  16. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +39 -51
  17. data/app/views/govuk_publishing_components/components/_search.html.erb +10 -5
  18. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +17 -0
  19. data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +5 -1
  20. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +29 -0
  21. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +34 -0
  22. data/app/views/govuk_publishing_components/components/docs/search.yml +6 -0
  23. data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +23 -0
  24. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +17 -0
  25. data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +9 -0
  26. data/config/initializers/assets.rb +8 -0
  27. data/lib/govuk_publishing_components.rb +1 -0
  28. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +1 -0
  29. data/lib/govuk_publishing_components/presenters/image_card_helper.rb +1 -1
  30. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +380 -0
  31. data/lib/govuk_publishing_components/version.rb +1 -1
  32. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +0 -4
  33. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +33 -33
  34. data/node_modules/govuk-frontend/package.json +1 -1
  35. metadata +12 -2
@@ -125,6 +125,10 @@ $gem-guide-border-width: 1px;
125
125
  background-color: govuk-colour("blue");
126
126
  }
127
127
 
128
+ &.black-background {
129
+ background-color: govuk-colour("black");
130
+ }
131
+
128
132
  &.component-output {
129
133
  padding: 0;
130
134
  }
@@ -44,6 +44,7 @@
44
44
  @import "components/label";
45
45
  @import "components/layout-footer";
46
46
  @import "components/layout-for-admin";
47
+ @import "components/layout-for-public";
47
48
  @import "components/layout-header";
48
49
  @import "components/lead-paragraph";
49
50
  @import "components/metadata";
@@ -1 +1,9 @@
1
1
  @import "govuk/components/footer/footer";
2
+
3
+ .gem-c-layout-footer--border {
4
+ border-top: govuk-spacing(2) solid govuk-colour("blue");
5
+ }
6
+
7
+ .gem-c-layout-footer .govuk-footer__list {
8
+ padding-bottom: govuk-spacing(7);
9
+ }
@@ -0,0 +1,4 @@
1
+ .gem-c-layout-for-public {
2
+ margin: 0;
3
+ font-family: $govuk-font-family;
4
+ }
@@ -1,3 +1,5 @@
1
+ @import "govuk_publishing_components/components/search";
2
+ @import "govuk_publishing_components/components/skip-link";
1
3
  @import "govuk/components/header/header";
2
4
  @import "govuk/components/tag/tag";
3
5
 
@@ -18,8 +20,80 @@
18
20
  border-bottom-color: govuk-colour("dark-grey", $legacy: "grey-1");
19
21
  }
20
22
 
23
+ .gem-c-layout-header--no-bottom-border,
24
+ .gem-c-layout-header--no-bottom-border .govuk-header__container {
25
+ margin-bottom: 0;
26
+ border-bottom: 0;
27
+
28
+ @include govuk-media-query($until: tablet) {
29
+ padding-bottom: govuk-spacing(1);
30
+ }
31
+ }
32
+
33
+ .gem-c-layout-header--search-left {
34
+ .gem-c-header__menu-button {
35
+ margin-top: - govuk-spacing(7);
36
+ left: 0;
37
+ }
38
+
39
+ .gem-c-header__nav-wrapper {
40
+ position: relative;
41
+ padding-left: 0;
42
+ }
43
+
44
+ .govuk-header__navigation--end {
45
+ padding-top: 0;
46
+ text-align: left;
47
+ }
48
+
49
+ .gem-c-layout-header__search {
50
+ margin-bottom: govuk-spacing(2);
51
+ padding-bottom: govuk-spacing(5);
52
+ }
53
+
54
+ .gem-c-header__content {
55
+ position: relative;
56
+ width: 100%;
57
+ padding-bottom: govuk-spacing(2);
58
+ }
59
+
60
+ @include govuk-media-query($from: desktop) {
61
+ .gem-c-layout-header__search {
62
+ padding-bottom: govuk-spacing(1);
63
+ }
64
+
65
+ .govuk-header__navigation-item {
66
+ padding: 0 0 govuk-spacing(1) 0;
67
+ }
68
+
69
+ .gem-c-header__logo {
70
+ margin-top: 0;
71
+ }
72
+
73
+ .gem-c-header__content {
74
+ @include govuk-grid-column(two-thirds);
75
+ padding-left: govuk-spacing(6);
76
+ padding-right: govuk-spacing(1);
77
+ }
78
+ }
79
+ }
80
+
81
+ .gem-c-layout-header__logo,
82
+ .gem-c-layout-header__search {
83
+ padding: 0;
84
+
85
+ @include govuk-media-query($until: "tablet") {
86
+ margin-bottom: govuk-spacing(3);
87
+ }
88
+ }
89
+
21
90
  .gem-c-header__logo {
22
- width: auto;
91
+ margin-top: govuk-spacing(1);
92
+ margin-bottom: govuk-spacing(3);
93
+
94
+ @include govuk-media-query($from: desktop) {
95
+ white-space: nowrap;
96
+ }
23
97
  }
24
98
 
25
99
  .gem-c-header__content {
@@ -68,3 +142,15 @@
68
142
  display: none;
69
143
  }
70
144
  }
145
+
146
+ .gem-c-layout-header__search-form {
147
+ display: none;
148
+
149
+ &.js-visible {
150
+ display: block;
151
+ }
152
+
153
+ @include govuk-media-query($from: tablet) {
154
+ display: block;
155
+ }
156
+ }
@@ -179,6 +179,12 @@ $large-input-size: 50px;
179
179
  }
180
180
  }
181
181
 
182
+ .gem-c-search--no-border {
183
+ .gem-c-search__input[type="search"] {
184
+ border: 0;
185
+ }
186
+ }
187
+
182
188
  .gem-c-search--large {
183
189
  .gem-c-search__label {
184
190
  @include govuk-font($size: 19, $line-height: $large-input-size);
@@ -208,3 +214,43 @@ $large-input-size: 50px;
208
214
  padding-left: 0;
209
215
  }
210
216
  }
217
+
218
+ .search-toggle {
219
+ background-color: govuk-colour("blue");
220
+ background-image: image-url("govuk_publishing_components/search-button.png");
221
+ background-position: 0 50%;
222
+ background-repeat: no-repeat;
223
+ display: block;
224
+ float: right;
225
+ height: 30px;
226
+ margin: -46px 0;
227
+ overflow: hidden;
228
+ padding: 0;
229
+ text-indent: -5000px;
230
+ width: 36px;
231
+
232
+ &:focus {
233
+ border-width: 0;
234
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
235
+ outline: $govuk-focus-width solid $govuk-focus-colour;
236
+ outline-offset: 0;
237
+ }
238
+
239
+ &:focus,
240
+ &:hover {
241
+ background-color: lighten(govuk-colour("blue"), 5%);
242
+ }
243
+
244
+ &.js-hidden {
245
+ display: none;
246
+ }
247
+
248
+ @include govuk-device-pixel-ratio {
249
+ background-size: 52.5px 35px;
250
+ background-position: 100% 50%;
251
+ }
252
+
253
+ @include govuk-media-query($from: tablet) {
254
+ display: none;
255
+ }
256
+ }
@@ -78,6 +78,10 @@ module GovukPublishingComponents
78
78
  context["dark_background"].present?
79
79
  end
80
80
 
81
+ def black_background?
82
+ !!context["black_background"]
83
+ end
84
+
81
85
  def html_description
82
86
  markdown_to_html(description) if description.present?
83
87
  end
@@ -1,6 +1,7 @@
1
1
  <div class="component-guide-preview
2
2
  <% if example.right_to_left? %>direction-rtl<% end %>
3
3
  <% if example.dark_background? %>dark-background<% end %>
4
+ <% if example.black_background? %>black-background<% end %>
4
5
  <% if preview_page %>component-guide-preview--simple<% end %>" data-content="EXAMPLE">
5
6
  <%= render "govuk_publishing_components/component_guide/component_doc/component_output", example: example, component_doc: component_doc %>
6
7
  </div>
@@ -1,36 +1,47 @@
1
1
  <%
2
2
  meta ||= []
3
3
  navigation ||= []
4
+ with_border ||= false
4
5
  %>
5
- <footer class="gem-c-layout-footer govuk-footer" role="contentinfo">
6
+ <footer class="gem-c-layout-footer govuk-footer <%= "gem-c-layout-footer--border" if with_border %> role="contentinfo">
6
7
  <div class="govuk-width-container ">
7
8
  <% if navigation.any? %>
8
9
  <div class="govuk-footer__navigation">
9
10
  <% navigation.each do |item| %>
10
- <div class="govuk-footer__section">
11
- <h2 class="govuk-footer__heading govuk-heading-m"><%= item[:title] %></h2>
12
- <% if item[:items] %>
13
- <%
14
- list_classes = %w( govuk-footer__list )
15
- list_classes << "govuk-footer__list--columns-#{item[:columns]}" if item[:columns]
16
- %>
17
- <ul class="<%= list_classes.join(' ') %>">
18
- <% item[:items].each do |item| %>
19
- <% if item[:href] && item[:text] %>
20
- <li class="govuk-footer__list-item">
21
- <%
22
- attributes = { class: "govuk-footer__link" }.merge(item.fetch(:attributes, {}))
23
- attributes[:rel] = "noopener" if attributes[:target] == "_blank" && !attributes[:rel]
24
- %>
25
- <%= link_to item[:text], item[:href], attributes %>
26
- </li>
11
+ <% if item[:items] %>
12
+ <%
13
+ case item[:columns]
14
+ when 2
15
+ width_class = "govuk-grid-column-two-thirds"
16
+ when 3
17
+ width_class = "govuk-grid-column-full"
18
+ else
19
+ width_class = "govuk-grid-column-one-third"
20
+ end
21
+
22
+ list_classes = %w( govuk-footer__list )
23
+ list_classes << "govuk-footer__list--columns-#{item[:columns]}" if item[:columns]
24
+ %>
25
+ <div class="<%= width_class %>">
26
+ <h2 class="govuk-footer__heading govuk-heading-m"><%= item[:title] %></h2>
27
+ <ul class="<%= list_classes.join(' ') %>">
28
+ <% item[:items].each do |item| %>
29
+ <% if item[:href] && item[:text] %>
30
+ <li class="govuk-footer__list-item">
31
+ <%
32
+ attributes = { class: "govuk-footer__link" }.merge(item.fetch(:attributes, {}))
33
+ attributes[:rel] = "noopener" if attributes[:target] == "_blank" && !attributes[:rel]
34
+ %>
35
+ <%= link_to item[:text], item[:href], attributes %>
36
+ </li>
37
+ <% end %>
27
38
  <% end %>
28
- <% end %>
29
- </ul>
39
+ </ul>
40
+ </div>
30
41
  <% end %>
31
- </div>
32
42
  <% end %>
33
43
  </div>
44
+
34
45
  <hr class="govuk-footer__section-break">
35
46
  <% end %>
36
47
  <div class="govuk-footer__meta">
@@ -0,0 +1,76 @@
1
+ <%
2
+ title ||= "GOV.UK - The best place to find government services and information"
3
+ html_lang ||= "en"
4
+ full_width ||= false
5
+ omit_header ||= false
6
+ show_search = local_assigns.include?(:show_search) ? local_assigns[:show_search] : true
7
+ layout_helper = GovukPublishingComponents::Presenters::PublicLayoutHelper.new(local_assigns)
8
+ -%>
9
+ <!DOCTYPE html>
10
+ <!--[if lt IE 9]><html class="lte-ie8" lang="<%= html_lang %>"><![endif]-->
11
+ <!--[if gt IE 8]><!--><html lang="<%= html_lang %>"><!--<![endif]-->
12
+ <head>
13
+ <meta charset="utf-8" />
14
+ <title><%= title %></title>
15
+
16
+ <%= csrf_meta_tags %>
17
+
18
+ <%= stylesheet_link_tag "application", media: "all" %>
19
+ <%= stylesheet_link_tag "print", media: "print" %>
20
+ <!--[if lt IE 9]><%= javascript_include_tag "govuk_publishing_components/ie", integrity: true, crossorigin: "anonymous" %><![endif]-->
21
+ <link rel="shortcut icon" href="<%= asset_path 'favicon.ico' %>" type="image/x-icon" />
22
+ <link rel="mask-icon" href="<%= asset_path 'govuk-mask-icon.svg' %>" color="#0b0c0c">
23
+ <link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path "govuk-apple-touch-icon-180x180.png" %>">
24
+ <link rel="apple-touch-icon" sizes="167x167" href="<%= asset_path "govuk-apple-touch-icon-167x167.png" %>">
25
+ <link rel="apple-touch-icon" sizes="152x152" href="<%= asset_path "govuk-apple-touch-icon-152x152.png" %>">
26
+ <link rel="apple-touch-icon" href="<%= asset_path "govuk-apple-touch-icon.png" %>">
27
+
28
+ <meta name="theme-color" content="#0b0c0c" />
29
+ <meta name="viewport" content="width=device-width, initial-scale=1">
30
+ <% # Ensure that older IE versions always render with the correct rendering engine %>
31
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
32
+
33
+ <% # The default og:image is added below :head so that scrapers see any custom metatags first, and this is just a fallback %>
34
+ <meta property="og:image" content="<%= asset_path "govuk-opengraph-image.png" %>">
35
+
36
+ <%= yield :head %>
37
+ </head>
38
+ <body class="gem-c-layout-for-public govuk-template__body">
39
+ <script>
40
+ document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
41
+ </script>
42
+ <%= render "govuk_publishing_components/components/skip_link", {
43
+ href: "#content"
44
+ } %>
45
+
46
+ <%= render "govuk_publishing_components/components/cookie_banner" %>
47
+
48
+ <% unless omit_header %>
49
+ <%= render "govuk_publishing_components/components/layout_header", {
50
+ environment: "public",
51
+ search: show_search,
52
+ # layout-header will always have border-bottom, unless the layout is full width
53
+ remove_bottom_border: full_width,
54
+ } %>
55
+ <% end %>
56
+ <div class="<%= "govuk-width-container" unless full_width %>" id="content">
57
+ <%= yield :before_content %>
58
+ <main class="govuk-main-wrapper">
59
+ <%= yield %>
60
+ </main>
61
+ </div>
62
+
63
+ <div class="govuk-width-container">
64
+ <%= render "govuk_publishing_components/components/feedback" %>
65
+ </div>
66
+
67
+ <% unless local_assigns[:hide_footer_links] %>
68
+ <%= render "govuk_publishing_components/components/layout_footer", {
69
+ with_border: true,
70
+ navigation: layout_helper.footer_navigation,
71
+ meta: layout_helper.footer_meta,
72
+ } %>
73
+ <% end %>
74
+ <%= javascript_include_tag 'application' %>
75
+ </body>
76
+ </html>
@@ -1,61 +1,49 @@
1
1
  <%
2
- full_width ||= false
3
2
  product_name ||= "Publishing"
4
3
  public_environment = environment.eql?("public")
4
+ full_width ||= false
5
+ search ||= false
6
+ search_left ||= false
5
7
  navigation_items ||= []
6
- if full_width
7
- width_class = "govuk-header__container--full-width"
8
- else
9
- width_class = "govuk-width-container"
10
- end
8
+ remove_bottom_border ||= false
9
+ search_left ||= false
10
+ width_class = full_width ? "govuk-header__container--full-width" : "govuk-width-container"
11
+ header_classes = %w(gem-c-layout-header govuk-header)
12
+ header_classes << "gem-c-layout-header--#{environment}"
13
+ header_classes << "gem-c-layout-header--no-bottom-border" if remove_bottom_border
14
+ header_classes << "gem-c-layout-header--search-left" if search_left
11
15
  %>
12
- <header class="gem-c-layout-header govuk-header gem-c-layout-header--<%= environment %>" role="banner" data-module="govuk-header">
13
- <div class="govuk-header__container <%= width_class %>">
14
- <div class="govuk-header__logo gem-c-header__logo">
15
- <a href="/" class="govuk-header__link govuk-header__link--homepage">
16
- <span class="govuk-header__logotype">
17
- <svg role="presentation" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 132 97" height="32" width="36">
18
- <path fill="currentColor" fill-rule="evenodd"
19
- d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9.9l-8.8-2.8v13.1l8.8-4.7c.3.3.6.7.9.9l-5 15.4v.1c-.2.8-.4 1.6-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"
20
- ></path>
21
- <image src="<%= asset_path('govuk-logotype-crown.png') %>" class="govuk-header__logotype-crown-fallback-image"></image>
22
- </svg>
23
- <span class="govuk-header__logotype-text">
24
- GOV.UK
25
- </span>
26
- </span>
27
16
 
28
- <% unless public_environment %>
29
- <span class="govuk-header__product-name gem-c-header__product-name">
30
- <%= product_name %>
31
- </span>
32
-
33
- <span class="gem-c-environment-tag govuk-tag gem-c-environment-tag--<%= environment %>">
34
- <%= environment %>
35
- </span>
36
- <% end %>
37
- </a>
38
-
39
- </div><div class="govuk-header__content gem-c-header__content">
40
-
41
- <% if navigation_items.any? %>
42
- <button role="button" class="govuk-header__menu-button gem-c-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
43
- <nav class="gem-c-header__nav">
44
- <ul id="navigation" class="govuk-header__navigation govuk-header__navigation--end" aria-label="Top Level Navigation">
45
- <% navigation_items.each_with_index do |item, index| %>
46
- <li class="govuk-header__navigation-item <%= "govuk-header__navigation-item--active" if item[:active] %>
47
- <%= "govuk-header__navigation-item--collapsed-menu-only" if item[:show_only_in_collapsed_menu] %>">
48
- <%= link_to(
49
- item[:text],
50
- item[:href],
51
- class: 'govuk-header__link',
52
- ) %>
53
- </li>
17
+ <header class="<%= header_classes.join(' ') %>" role="banner" data-module="govuk-header">
18
+ <div class="govuk-header__container <%= width_class %>">
19
+ <% if search_left %>
20
+ <div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
21
+ <div class="gem-c-layout-header__logo govuk-grid-column-one-third-from-desktop">
22
+ <%= render "govuk_publishing_components/components/layout_header/header_logo", public_environment: public_environment, environment: environment, product_name: product_name %>
23
+ </div>
24
+ </div>
25
+ <div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
26
+ <div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop gem-c-layout-header__search">
27
+ <%= render "govuk_publishing_components/components/layout_header/search" %>
28
+ </div>
29
+ <div class="govuk-header__content gem-c-header__content govuk-grid-column-full">
30
+ <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
31
+ </div>
32
+ </div>
33
+ <% else %>
34
+ <div class="govuk-grid-row govuk-!-margin-left-0 govuk-!-margin-right-0">
35
+ <div class="gem-c-layout-header__logo govuk-grid-column-two-thirds">
36
+ <%= render "govuk_publishing_components/components/layout_header/header_logo", public_environment: public_environment, environment: environment, product_name: product_name %>
37
+ </div>
38
+ <div class="govuk-header__content gem-c-header__content">
39
+ <%= render "govuk_publishing_components/components/layout_header/navigation_items", navigation_items: navigation_items %>
40
+ </div>
41
+ <% if search %>
42
+ <div class="govuk-grid-column-one-third gem-c-layout-header__search">
43
+ <%= render "govuk_publishing_components/components/layout_header/search" %>
44
+ </div>
54
45
  <% end %>
55
- </ul>
56
- </nav>
46
+ </div>
57
47
  <% end %>
58
-
59
- </div>
60
48
  </div>
61
49
  </header>