govuk_tech_docs 1.9.0.pre.rc2 → 2.0.0.pre.test.pre.release.pre.524

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +4 -1
  4. data/CHANGELOG.md +7 -2
  5. data/example/.ruby-version +1 -1
  6. data/govuk_tech_docs.gemspec +23 -4
  7. data/lib/assets/javascripts/govuk_tech_docs.js +2 -0
  8. data/lib/assets/stylesheets/_core.scss +0 -48
  9. data/lib/assets/stylesheets/_govuk_tech_docs.scss +4 -8
  10. data/lib/assets/stylesheets/modules/_anchored-heading.scss +6 -6
  11. data/lib/assets/stylesheets/modules/_app-pane.scss +46 -47
  12. data/lib/assets/stylesheets/modules/_collapsible.scss +7 -3
  13. data/lib/assets/stylesheets/modules/_contribution-banner.scss +9 -7
  14. data/lib/assets/stylesheets/modules/_footer.scss +6 -127
  15. data/lib/assets/stylesheets/modules/_page-review.scss +15 -14
  16. data/lib/assets/stylesheets/modules/_search.scss +53 -42
  17. data/lib/assets/stylesheets/modules/_technical-documentation.scss +65 -95
  18. data/lib/assets/stylesheets/modules/_toc.scss +76 -47
  19. data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +5 -5
  20. data/lib/govuk_tech_docs.rb +13 -11
  21. data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +1 -1
  22. data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +1 -0
  23. data/lib/govuk_tech_docs/api_reference/templates/api_reference_full.html.erb +1 -1
  24. data/lib/govuk_tech_docs/page_review.rb +1 -0
  25. data/lib/govuk_tech_docs/pages.rb +1 -1
  26. data/lib/govuk_tech_docs/redirects.rb +1 -1
  27. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +1 -1
  28. data/lib/govuk_tech_docs/table_of_contents/headings_builder.rb +1 -1
  29. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +1 -0
  30. data/lib/govuk_tech_docs/version.rb +1 -1
  31. data/lib/source/layouts/_footer.erb +32 -7
  32. data/lib/source/layouts/_header.erb +41 -27
  33. data/lib/source/layouts/_search.erb +4 -2
  34. data/lib/source/layouts/core.erb +7 -8
  35. data/lib/source/stylesheets/manifest.css +3 -0
  36. data/package-lock.json +3 -3
  37. data/package.json +3 -2
  38. metadata +38 -33
  39. data/lib/assets/stylesheets/_accessibility.scss +0 -9
  40. data/lib/assets/stylesheets/govuk_frontend_toolkit/_colours.scss +0 -2
  41. data/lib/assets/stylesheets/govuk_frontend_toolkit/_conditionals.scss +0 -81
  42. data/lib/assets/stylesheets/govuk_frontend_toolkit/_css3.scss +0 -90
  43. data/lib/assets/stylesheets/govuk_frontend_toolkit/_device-pixels.scss +0 -10
  44. data/lib/assets/stylesheets/govuk_frontend_toolkit/_font_stack.scss +0 -19
  45. data/lib/assets/stylesheets/govuk_frontend_toolkit/_grid_layout.scss +0 -136
  46. data/lib/assets/stylesheets/govuk_frontend_toolkit/_helpers.scss +0 -16
  47. data/lib/assets/stylesheets/govuk_frontend_toolkit/_measurements.scss +0 -14
  48. data/lib/assets/stylesheets/govuk_frontend_toolkit/_shims.scss +0 -55
  49. data/lib/assets/stylesheets/govuk_frontend_toolkit/_typography.scss +0 -249
  50. data/lib/assets/stylesheets/govuk_frontend_toolkit/_url-helpers.scss +0 -16
  51. data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_organisation.scss +0 -103
  52. data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_palette.scss +0 -77
  53. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_alpha-beta.scss +0 -66
  54. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_breadcrumbs.scss +0 -53
  55. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_buttons.scss +0 -141
  56. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_media-player.scss +0 -242
  57. data/lib/assets/stylesheets/modules/_govuk-logo.scss +0 -47
  58. data/lib/assets/stylesheets/modules/_header.scss +0 -289
  59. data/lib/assets/stylesheets/modules/_skip-link.scss +0 -31
  60. data/lib/source/images/gov.uk_logotype_crown-2x.png +0 -0
  61. data/lib/source/images/gov.uk_logotype_crown.png +0 -0
  62. data/lib/source/images/gov.uk_logotype_crown_invert_trans.png +0 -0
  63. data/lib/source/images/govuk-crest-2x.png +0 -0
  64. data/lib/source/images/govuk-crest.png +0 -0
  65. data/lib/source/images/open-government-licence.png +0 -0
  66. data/lib/source/images/open-government-licence_2x.png +0 -0
@@ -1,8 +1,7 @@
1
- @include screen {
1
+ @include govuk-media-query($media-type: screen) {
2
2
  .toc {
3
-
4
- @include core-16;
5
- padding: $gutter-half;
3
+ @include govuk-font($size: 16);
4
+ padding: govuk-spacing(3);
6
5
 
7
6
  ul {
8
7
  list-style: none;
@@ -14,63 +13,74 @@
14
13
  display: none;
15
14
  }
16
15
 
17
- a:link, a:visited {
18
- text-decoration: none;
19
- color: $link-colour;
20
- }
16
+ &__list {
17
+ li {
18
+ a:link, a:visited {
19
+ display: block;
20
+ position: relative;
21
+ padding: 8px govuk-spacing(6) 8px govuk-spacing(3);
22
+ margin: 0 -1 * govuk-spacing(3);
23
+ border-left: 5px solid transparent;
24
+ text-decoration: none;
25
+ color: $govuk-link-colour;
26
+
27
+ @include govuk-media-query(tablet) {
28
+ &.toc-link--in-view {
29
+ color: $govuk-link-hover-colour;
30
+ border-left-color: $govuk-link-hover-colour;
31
+ background-color: govuk-colour("light-grey");
32
+ }
33
+ }
34
+ }
21
35
 
22
- a:hover {
23
- text-decoration: underline;
24
- }
36
+ a:focus {
37
+ outline: none;
25
38
 
26
- &__list {
39
+ span {
40
+ @include govuk-focused-text;
41
+ }
42
+ }
27
43
 
28
- a:link, a:visited {
29
- display: block;
30
- padding: 8px $gutter 8px $gutter-half;
31
- margin: 0 $gutter-half * -1;
32
- border-left: 5px solid transparent;
33
-
34
- @include media(tablet) {
35
- &.toc-link--in-view {
36
- color: $link-active-colour;
37
- border-left-color: $link-active-colour;
38
- background-color: $grey-4;
44
+ a:hover {
45
+ text-decoration: underline;
46
+
47
+ &:focus {
48
+ text-decoration: none;
39
49
  }
40
50
  }
41
51
  }
42
52
 
43
53
  // Top level
44
54
  > ul > li > a:link {
45
- @include bold-19;
55
+ @include govuk-font($size: 19, $weight: bold);
46
56
  }
47
57
 
48
- @include media(tablet) {
58
+ @include govuk-media-query(tablet) {
49
59
  // Level 3
50
60
  li li li {
51
61
  a:link, a:visited {
52
- padding-left: $gutter-half * 2;
62
+ padding-left: govuk-spacing(6);
53
63
  }
54
64
  }
55
65
 
56
66
  // Level 4
57
67
  li li li li {
58
68
  a:link, a:visited {
59
- padding-left: $gutter-half * 4;
69
+ padding-left: govuk-spacing(7);
60
70
  }
61
71
  }
62
72
 
63
73
  // Level 5
64
74
  li li li li li {
65
75
  a:link, a:visited {
66
- padding-left: $gutter-half * 5;
76
+ padding-left: govuk-spacing(8);
67
77
  }
68
78
  }
69
79
 
70
80
  // Level 6
71
81
  li li li li li li {
72
82
  a:link, a:visited {
73
- padding-left: $gutter-half * 6;
83
+ padding-left: govuk-spacing(9);
74
84
  }
75
85
  }
76
86
  }
@@ -81,9 +91,9 @@
81
91
  display: none;
82
92
  }
83
93
 
84
- @include media(tablet) {
94
+ @include govuk-media-query(tablet) {
85
95
  .toc {
86
- padding: 22px $gutter $gutter-half;
96
+ padding: 22px govuk-spacing(6) govuk-spacing(3)
87
97
  }
88
98
 
89
99
  // Prevent the fixedsticky spacer from appearing if the browser is resized
@@ -93,7 +103,7 @@
93
103
  }
94
104
  }
95
105
 
96
- @include media(mobile) {
106
+ @include govuk-media-query($until: tablet) {
97
107
  .js {
98
108
  .toc {
99
109
  display: none;
@@ -113,21 +123,26 @@
113
123
  z-index: 10;
114
124
 
115
125
  &__label {
126
+ @include govuk-font($size: 16);
116
127
  display: block;
117
128
  position: relative;
118
129
  z-index: 10;
119
130
 
120
- padding: $gutter-half $gutter-half 10px;
131
+ padding: govuk-spacing(3) govuk-spacing(3) 10px;
121
132
 
122
- background: $grey-4;
133
+ background: govuk-colour("light-grey");
123
134
  @supports(backdrop-filter: blur(2px)) {
124
- background: transparentize($grey-4, 0.05);
135
+ background: transparentize(govuk-colour("light-grey"), 0.05);
125
136
  backdrop-filter: blur(2px);
126
137
  }
127
- border-bottom: 1px solid $grey-2;
138
+ border-bottom: 1px solid govuk-colour("mid-grey");
128
139
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
129
- color: $text-colour;
140
+ color: $govuk-text-colour;
130
141
  text-decoration: none;
142
+
143
+ &:focus {
144
+ @include govuk-focused-text;
145
+ }
131
146
  }
132
147
 
133
148
  &__icon {
@@ -135,19 +150,19 @@
135
150
  height: 20px;
136
151
  float: right;
137
152
 
138
- background-image: file-url('govuk-icn-numbered-list.png');
153
+ background-image: url('/images/govuk-icn-numbered-list.png');
139
154
  background-repeat: no-repeat;
140
155
  background-position: left center;
141
156
 
142
- @include device-pixel-ratio {
143
- background-image: file-url('govuk-icn-numbered-list@2x.png');
157
+ @include govuk-device-pixel-ratio {
158
+ background-image: url('/images/govuk-icn-numbered-list@2x.png');
144
159
  background-size: 20px 20px;
145
160
  }
146
161
  }
147
162
  }
148
163
 
149
164
  .toc__list {
150
- margin-right: $gutter * 1.5;
165
+ margin-right: govuk-spacing(7);
151
166
  }
152
167
 
153
168
  .toc__close {
@@ -159,15 +174,29 @@
159
174
  float: right;
160
175
  width: 20px;
161
176
  height: 20px;
177
+ cursor: pointer;
162
178
 
163
- background-image: file-url('govuk-icn-close.png');
179
+ background-image: url('/images/govuk-icn-close.png');
164
180
  background-repeat: no-repeat;
165
181
  background-position: left center;
166
182
 
167
- @include device-pixel-ratio {
168
- background-image: file-url('govuk-icn-close@2x.png');
183
+ @include govuk-device-pixel-ratio {
184
+ background-image: url('/images/govuk-icn-close@2x.png');
169
185
  background-size: 20px 20px;
170
186
  }
187
+
188
+ &:focus {
189
+ background-color: $govuk-focus-colour;
190
+ outline: $govuk-focus-width solid transparent;
191
+ box-shadow: inset 0 0 0 1px $govuk-focus-colour;
192
+ }
193
+
194
+ &:focus:not(:active):not(:hover) {
195
+ border-color: $govuk-focus-colour;
196
+ color: $govuk-focus-text-colour;
197
+ background-color: $govuk-focus-colour;
198
+ box-shadow: 0 2px 0 $govuk-focus-text-colour;
199
+ }
171
200
  }
172
201
 
173
202
  /* Applied to <html> */
@@ -198,9 +227,9 @@
198
227
  -webkit-overflow-scrolling: touch;
199
228
  -ms-overflow-style: none;
200
229
 
201
- background: $white;
230
+ background: govuk-colour("white");
202
231
  @supports(backdrop-filter: blur(2px)) {
203
- background: transparentize($white, 0.05);
232
+ background: transparentize(govuk-colour("white"), 0.05);
204
233
  backdrop-filter: blur(2px);
205
234
  }
206
235
  }
@@ -209,7 +238,7 @@
209
238
  }
210
239
  }
211
240
 
212
- @include print {
241
+ @include govuk-media-query($media-type: print) {
213
242
  .toc {
214
243
  display: none;
215
244
  }
@@ -1,20 +1,20 @@
1
1
  // A Base16 palette
2
2
  // https://github.com/chriskempson/base16
3
3
 
4
- $code-00: scale-color($highlight-colour, $lightness:50%); /* Default Background */
4
+ $code-00: scale-color(govuk-colour("light-grey"), $lightness:50%); /* Default Background */
5
5
  $code-01: #f5f5f5; /* Lighter Background (Unused) */
6
6
  $code-02: #bfc1c3; /* Selection Background */
7
- $code-03: darken($secondary-text-colour, 2%);; /* Comments, Invisibles, Line Highlighting */
7
+ $code-03: darken( $govuk-secondary-text-colour, 2%);; /* Comments, Invisibles, Line Highlighting */
8
8
  $code-04: #e8e8e8; /* Dark Foreground (Unused) */
9
- $code-05: $text-colour; /* Default Foreground, Caret, Delimiters, Operators */
9
+ $code-05: $govuk-text-colour; /* Default Foreground, Caret, Delimiters, Operators */
10
10
  $code-06: #ffffff; /* Light Foreground (Unused) */
11
11
  $code-07: #ffffff; /* Light Background (Unused) */
12
12
 
13
13
  $code-08: #B26749; /* Variables, XML Tags, Markup Link Text, Markup Lists */
14
14
  $code-09: #0E7754; /* Integers, Boolean, Constants, XML Attributes, Markup Link Url */
15
15
  $code-0A: #4C4077; /* Classes, Markup Bold, Search Text Background */
16
- $code-0B: $govuk-blue; /* Strings, Inherited Class, Markup Code */
17
- $code-0C: $govuk-blue; /* Support, Regular Expressions, Escape Characters, Markup Quotes */
16
+ $code-0B: $govuk-brand-colour; /* Strings, Inherited Class, Markup Code */
17
+ $code-0C: $govuk-brand-colour; /* Support, Regular Expressions, Escape Characters, Markup Quotes */
18
18
  $code-0D: #4C4077; /* Functions, Methods, Attribute IDs, Headings */
19
19
  $code-0E: #a71d5d; /* Keywords, Storage, Selector, Markup Italic */
20
20
  $code-0F: #C92424; /* Deprecated, Opening/Closing Embedded Language Tags e.g. <?php ?> (Unused) */
@@ -31,20 +31,24 @@ module GovukTechDocs
31
31
  # extension. Hash with symbols as keys.
32
32
  def self.configure(context, options = {})
33
33
  context.activate :sprockets
34
+
35
+ context.sprockets.append_path File.join(__dir__, '../node_modules/govuk-frontend/')
36
+ context.sprockets.append_path File.join(__dir__, './source')
37
+
34
38
  context.activate :syntax
35
39
 
36
40
  context.files.watch :source, path: "#{__dir__}/source"
37
41
 
38
42
  context.set :markdown_engine, :redcarpet
39
43
  context.set :markdown,
40
- renderer: TechDocsHTMLRenderer.new(
41
- with_toc_data: true,
42
- api: true,
43
- context: context
44
- ),
45
- fenced_code_blocks: true,
46
- tables: true,
47
- no_intra_emphasis: true
44
+ renderer: TechDocsHTMLRenderer.new(
45
+ with_toc_data: true,
46
+ api: true,
47
+ context: context
48
+ ),
49
+ fenced_code_blocks: true,
50
+ tables: true,
51
+ no_intra_emphasis: true
48
52
 
49
53
  # Reload the browser automatically whenever files change
50
54
  context.configure :development do
@@ -109,9 +113,7 @@ module GovukTechDocs
109
113
  url: { index: false, store: true },
110
114
  }
111
115
 
112
- search.pipeline_remove = [
113
- 'stopWordFilter'
114
- ]
116
+ search.pipeline_remove = %w[stopWordFilter]
115
117
 
116
118
  search.tokenizer_separator = '/[\s\-/]+/'
117
119
  end
@@ -60,7 +60,7 @@ module GovukTechDocs
60
60
  key = md.captures[0]
61
61
  type = keywords[key]
62
62
 
63
- text.gsub!(/#{ Regexp.escape(key) }\s+?/, '')
63
+ text.gsub!(/#{Regexp.escape(key)}\s+?/, '')
64
64
 
65
65
  # Strip paragraph tags from text
66
66
  text = text.gsub(/<\/?[^>]*>/, '')
@@ -262,6 +262,7 @@ module GovukTechDocs
262
262
  unless text.is_a?(String)
263
263
  return nil
264
264
  end
265
+
265
266
  # Schema dictates that it's always components['schemas']
266
267
  text.gsub(/#\/components\/schemas\//, '')
267
268
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  <% unless servers.empty? %>
5
5
  <h2 id="servers">Servers</h2>
6
- <div id="server-list">
6
+ <div id="server-list">
7
7
  <% servers.each do |server| %>
8
8
  <% if server.description %>
9
9
  <p><strong><%= server.description %></strong></p>
@@ -30,6 +30,7 @@ module GovukTechDocs
30
30
 
31
31
  def owner_slack_url
32
32
  return "" unless owner_slack_workspace
33
+
33
34
  # Slack URLs don't have the # (channels) or @ (usernames)
34
35
  slack_identifier = owner_slack.to_s.delete('#').delete('@')
35
36
  "https://#{owner_slack_workspace}.slack.com/messages/#{slack_identifier}"
@@ -7,7 +7,7 @@ module GovukTechDocs
7
7
  @config = config
8
8
  end
9
9
 
10
- def to_json
10
+ def to_json(*_args)
11
11
  as_json.to_json
12
12
  end
13
13
 
@@ -1,6 +1,6 @@
1
1
  module GovukTechDocs
2
2
  class Redirects
3
- LEADING_SLASH = %r[\A\/]
3
+ LEADING_SLASH = %r[\A\/].freeze
4
4
 
5
5
  def initialize(context)
6
6
  @context = context
@@ -20,7 +20,7 @@ module GovukTechDocs
20
20
  output = ''
21
21
 
22
22
  if tree.heading
23
- output += indentation + %{<a href="#{tree.heading.href}">#{tree.heading.title}</a>\n}
23
+ output += indentation + %{<a href="#{tree.heading.href}"><span>#{tree.heading.title}</span></a>\n}
24
24
  end
25
25
 
26
26
  if tree.children.any? && level < @max_level
@@ -20,7 +20,7 @@ module GovukTechDocs
20
20
  private
21
21
 
22
22
  def page
23
- @_page ||= Nokogiri::HTML(@html)
23
+ @page ||= Nokogiri::HTML(@html)
24
24
  end
25
25
 
26
26
  def heading_elements
@@ -44,6 +44,7 @@ module GovukTechDocs
44
44
  end
45
45
  # Avoid redirect pages
46
46
  next if content.include? "http-equiv=refresh"
47
+
47
48
  # If this page has children, just print the title and recursively
48
49
  # render the children. If not, print the heading structure.
49
50
 
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "1.9.0-rc2".freeze
2
+ VERSION = "2.0.0".freeze
3
3
  end
@@ -1,10 +1,35 @@
1
- <footer class="footer">
2
- <div class="footer__licence">
3
- <a class="footer__licence-logo" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence</a>
4
- <p class="footer__licence-description">All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated</p>
5
- </div>
1
+ <footer class="govuk-footer app-footer" role="contentinfo">
2
+ <div class="govuk-footer__meta">
3
+ <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
6
4
 
7
- <div class="footer__copyright">
8
- <a class="footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
5
+ <svg
6
+ role="presentation"
7
+ focusable="false"
8
+ class="govuk-footer__licence-logo"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ viewbox="0 0 483.2 195.7"
11
+ height="17"
12
+ width="41"
13
+ >
14
+ <path
15
+ fill="currentColor"
16
+ d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
17
+ />
18
+ </svg>
19
+ <span class="govuk-footer__licence-description">
20
+ All content is available under the
21
+ <a
22
+ class="govuk-footer__link"
23
+ href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
24
+ rel="license"
25
+ >Open Government Licence v3.0</a>, except where otherwise stated
26
+ </span>
27
+ </div>
28
+ <div class="govuk-footer__meta-item">
29
+ <a
30
+ class="govuk-footer__link govuk-footer__copyright-logo"
31
+ href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
32
+ >© Crown copyright</a>
33
+ </div>
9
34
  </div>
10
35
  </footer>
@@ -1,44 +1,58 @@
1
- <header class="header header--full-width">
2
- <div class="header__container">
3
- <div class="header__brand">
1
+ <header class="govuk-header " role="banner" data-module="govuk-header">
2
+ <div class="govuk-header__container govuk-header__container--full-width">
3
+ <div class="govuk-header__logo">
4
4
  <% if config[:tech_docs][:service_link] %>
5
- <a href="<%= url_for config[:tech_docs][:service_link] %>">
5
+ <a href="/" class="govuk-header__link govuk-header__link--homepage">
6
6
  <% else %>
7
- <span>
7
+ <span class="govuk-header__link govuk-header__link--homepage">
8
8
  <% end %>
9
9
  <% if config[:tech_docs][:show_govuk_logo] %>
10
- <span class="govuk-logo">
11
- <img class="govuk-logo__printable-crown" src="/images/gov.uk_logotype_crown_invert_trans.png" height="32" width="36" alt="">
10
+ <span class="govuk-header__logotype">
11
+ <svg
12
+ role="presentation"
13
+ focusable="false"
14
+ class="govuk-header__logotype-crown"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ viewbox="0 0 132 97"
17
+ height="30"
18
+ width="36"
19
+ >
20
+ <path
21
+ fill="currentColor" fill-rule="evenodd"
22
+ 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"
23
+ ></path>
24
+ <image src="/assets/images/govuk-logotype-crown.png" xlink:href="" class="govuk-header__logotype-crown-fallback-image" width="36" height="32"></image>
25
+ </svg>
26
+ <span class="govuk-header__logotype-text">
12
27
  GOV.UK
13
28
  </span>
29
+ </span>
14
30
  <% end %>
15
- <span class="header__title">
31
+ <span class="govuk-header__product-name">
16
32
  <%= config[:tech_docs][:service_name] %>
17
- <% if config[:tech_docs][:phase] %>
18
- <strong class="govuk-tag"><%= config[:tech_docs][:phase] %></strong>
19
- <% end %>
20
33
  </span>
21
34
  <% if config[:tech_docs][:service_link] %>
22
- </a>
35
+ </a>
23
36
  <% else %>
24
- </span>
37
+ </span>
38
+ <% end %>
39
+ <% if config[:tech_docs][:phase] %>
40
+ <strong class="govuk-tag"><%= config[:tech_docs][:phase] %></strong>
25
41
  <% end %>
26
42
  </div>
27
-
28
43
  <% if config[:tech_docs][:header_links] %>
29
- <div data-module="navigation">
30
- <button type="button" class="header__navigation-toggle js-nav-toggle" aria-controls="navigation" aria-label="Show or hide top level navigation">Menu</button>
31
-
32
- <nav id="navigation" class="header__navigation js-nav" aria-label="Top Level Navigation" aria-hidden="true">
33
- <ul>
34
- <% config[:tech_docs][:header_links].each do |title, path| %>
35
- <li<% if active_page(path) %> class="active"<% end %>>
36
- <a href="<%= url_for path %>"><%= title %></a>
37
- </li>
38
- <% end %>
39
- </ul>
40
- </nav>
41
- </div>
44
+ <div class="govuk-header__content">
45
+ <button type="button" role="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="Show or hide Top Level Navigation">Menu</button>
46
+ <nav>
47
+ <ul id="navigation" class="govuk-header__navigation govuk-header__navigation--end" aria-label="Top Level Navigation">
48
+ <% config[:tech_docs][:header_links].each do |title, path| %>
49
+ <li class="govuk-header__navigation-item<% if active_page(path) %> govuk-header__navigation-item--active<% end %>">
50
+ <a class="govuk-header__link" href="<%= url_for path %>"><%= title %></a>
51
+ </li>
52
+ <% end %>
53
+ </ul>
54
+ </nav>
55
+ </div>
42
56
  <% end %>
43
57
  </div>
44
58
  </header>