@moduk/frontend 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/lib/nunjucks/moduk/components/accordion/__examples__/default.njk +2 -2
  2. package/dist/lib/nunjucks/moduk/components/accordion/__examples__/with-summary-lines.njk +2 -2
  3. package/dist/lib/nunjucks/moduk/components/accordion/macro.njk +2 -2
  4. package/dist/lib/nunjucks/moduk/components/back-link/__examples__/default.njk +2 -2
  5. package/dist/lib/nunjucks/moduk/components/back-link/macro.njk +2 -2
  6. package/dist/lib/nunjucks/moduk/components/breadcrumbs/__examples__/default.njk +2 -2
  7. package/dist/lib/nunjucks/moduk/components/breadcrumbs/macro.njk +2 -2
  8. package/dist/lib/nunjucks/moduk/components/button/__examples__/default.njk +2 -2
  9. package/dist/lib/nunjucks/moduk/components/button/__examples__/disabled.njk +2 -2
  10. package/dist/lib/nunjucks/moduk/components/button/__examples__/group-link.njk +2 -2
  11. package/dist/lib/nunjucks/moduk/components/button/__examples__/grouping.njk +4 -4
  12. package/dist/lib/nunjucks/moduk/components/button/__examples__/prevent-double-click.njk +1 -2
  13. package/dist/lib/nunjucks/moduk/components/button/__examples__/secondary.njk +2 -2
  14. package/dist/lib/nunjucks/moduk/components/button/__examples__/start.njk +2 -2
  15. package/dist/lib/nunjucks/moduk/components/button/__examples__/warning.njk +2 -2
  16. package/dist/lib/nunjucks/moduk/components/button/macro.njk +2 -2
  17. package/dist/lib/nunjucks/moduk/components/character-count/__examples__/default.njk +2 -2
  18. package/dist/lib/nunjucks/moduk/components/character-count/__examples__/not-as-page-heading.njk +2 -2
  19. package/dist/lib/nunjucks/moduk/components/character-count/__examples__/with-error-message.njk +2 -2
  20. package/dist/lib/nunjucks/moduk/components/character-count/__examples__/with-threshold.njk +2 -2
  21. package/dist/lib/nunjucks/moduk/components/character-count/__examples__/word-count.njk +2 -2
  22. package/dist/lib/nunjucks/moduk/components/character-count/macro.njk +2 -2
  23. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/default.njk +2 -2
  24. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/not-as-page-heading.njk +2 -2
  25. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/small.njk +2 -2
  26. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-conditional-reveal.njk +9 -9
  27. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-error-message.njk +2 -2
  28. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-item-hint.njk +2 -2
  29. package/dist/lib/nunjucks/moduk/components/checkboxes/__examples__/with-none-option.njk +2 -2
  30. package/dist/lib/nunjucks/moduk/components/checkboxes/macro.njk +2 -2
  31. package/dist/lib/nunjucks/moduk/components/cookie-banner/__examples__/accepted.njk +4 -4
  32. package/dist/lib/nunjucks/moduk/components/cookie-banner/__examples__/default.njk +2 -2
  33. package/dist/lib/nunjucks/moduk/components/cookie-banner/__examples__/rejected.njk +4 -5
  34. package/dist/lib/nunjucks/moduk/components/cookie-banner/macro.njk +3 -3
  35. package/dist/lib/nunjucks/moduk/components/date-input/__examples__/default.njk +2 -2
  36. package/dist/lib/nunjucks/moduk/components/date-input/__examples__/not-as-page-heading.njk +2 -2
  37. package/dist/lib/nunjucks/moduk/components/date-input/__examples__/with-date-part-error.njk +2 -2
  38. package/dist/lib/nunjucks/moduk/components/date-input/__examples__/with-whole-date-error.njk +2 -2
  39. package/dist/lib/nunjucks/moduk/components/date-input/macro.njk +3 -3
  40. package/dist/lib/nunjucks/moduk/components/details/__examples__/default.njk +2 -2
  41. package/dist/lib/nunjucks/moduk/components/details/__examples__/open.njk +2 -2
  42. package/dist/lib/nunjucks/moduk/components/error-message/__examples__/default.njk +2 -2
  43. package/dist/lib/nunjucks/moduk/components/error-message/macro.njk +2 -2
  44. package/dist/lib/nunjucks/moduk/components/error-summary/__examples__/default.njk +2 -2
  45. package/dist/lib/nunjucks/moduk/components/error-summary/__examples__/with-error-linked-to-checkbox.njk +4 -4
  46. package/dist/lib/nunjucks/moduk/components/error-summary/__examples__/with-error-linked-to-date-part.njk +3 -3
  47. package/dist/lib/nunjucks/moduk/components/error-summary/macro.njk +2 -2
  48. package/dist/lib/nunjucks/moduk/components/fieldset/__examples__/default.njk +8 -8
  49. package/dist/lib/nunjucks/moduk/components/file-upload/__examples__/default.njk +2 -2
  50. package/dist/lib/nunjucks/moduk/components/file-upload/__examples__/with-error.njk +2 -2
  51. package/dist/lib/nunjucks/moduk/components/file-upload/macro.njk +2 -2
  52. package/dist/lib/nunjucks/moduk/components/footer/__examples__/default.njk +2 -2
  53. package/dist/lib/nunjucks/moduk/components/footer/__examples__/with-links.njk +2 -2
  54. package/dist/lib/nunjucks/moduk/components/footer/__examples__/with-secondary-navigation-and-links.njk +2 -2
  55. package/dist/lib/nunjucks/moduk/components/footer/__examples__/with-secondary-navigation.njk +2 -2
  56. package/dist/lib/nunjucks/moduk/components/footer/macro.njk +2 -2
  57. package/dist/lib/nunjucks/moduk/components/header/__examples__/default.njk +2 -2
  58. package/dist/lib/nunjucks/moduk/components/header/__examples__/with-service-name-and-navigation.njk +2 -2
  59. package/dist/lib/nunjucks/moduk/components/header/__examples__/with-service-name-and-no-service-url.njk +2 -2
  60. package/dist/lib/nunjucks/moduk/components/header/__examples__/with-service-name.njk +2 -2
  61. package/dist/lib/nunjucks/moduk/components/header/macro.njk +30 -31
  62. package/dist/lib/nunjucks/moduk/components/input/__examples__/default.njk +2 -2
  63. package/dist/lib/nunjucks/moduk/components/input/__examples__/not-as-page-heading.njk +2 -2
  64. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-error.njk +2 -2
  65. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-fixed-width.njk +15 -15
  66. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-fluid-width.njk +8 -8
  67. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-hint.njk +2 -2
  68. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-numeric.njk +2 -2
  69. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix-and-suffix-error.njk +2 -2
  70. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix-and-suffix.njk +2 -2
  71. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-prefix.njk +2 -2
  72. package/dist/lib/nunjucks/moduk/components/input/__examples__/with-suffix.njk +2 -2
  73. package/dist/lib/nunjucks/moduk/components/input/macro.njk +2 -2
  74. package/dist/lib/nunjucks/moduk/components/inset-text/__examples__/default.njk +3 -3
  75. package/dist/lib/nunjucks/moduk/components/inset-text/macro.njk +1 -1
  76. package/dist/lib/nunjucks/moduk/components/notification-banner/__examples__/default.njk +2 -2
  77. package/dist/lib/nunjucks/moduk/components/notification-banner/__examples__/success.njk +3 -3
  78. package/dist/lib/nunjucks/moduk/components/notification-banner/__examples__/with-html.njk +3 -3
  79. package/dist/lib/nunjucks/moduk/components/notification-banner/macro.njk +2 -2
  80. package/dist/lib/nunjucks/moduk/components/pagination/__examples__/default.njk +2 -2
  81. package/dist/lib/nunjucks/moduk/components/pagination/__examples__/on-the-first-page.njk +2 -2
  82. package/dist/lib/nunjucks/moduk/components/pagination/__examples__/on-the-last-page.njk +2 -2
  83. package/dist/lib/nunjucks/moduk/components/pagination/__examples__/with-ellipses.njk +2 -2
  84. package/dist/lib/nunjucks/moduk/components/pagination/__examples__/with-link-labels.njk +2 -2
  85. package/dist/lib/nunjucks/moduk/components/pagination/__examples__/with-next-and-previous-only.njk +2 -2
  86. package/dist/lib/nunjucks/moduk/components/pagination/macro.njk +3 -3
  87. package/dist/lib/nunjucks/moduk/components/panel/__examples__/default.njk +2 -2
  88. package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/beta.njk +2 -2
  89. package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/default.njk +2 -2
  90. package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/with-tag-override.njk +2 -2
  91. package/dist/lib/nunjucks/moduk/components/phase-banner/__examples__/with-text.njk +2 -2
  92. package/dist/lib/nunjucks/moduk/components/phase-banner/macro.njk +3 -4
  93. package/dist/lib/nunjucks/moduk/components/radios/__examples__/default.njk +2 -2
  94. package/dist/lib/nunjucks/moduk/components/radios/__examples__/inline.njk +2 -2
  95. package/dist/lib/nunjucks/moduk/components/radios/__examples__/not-as-page-heading.njk +2 -2
  96. package/dist/lib/nunjucks/moduk/components/radios/__examples__/small.njk +2 -2
  97. package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-conditional-reveal.njk +9 -9
  98. package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-divider-option.njk +2 -2
  99. package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-error-message.njk +2 -2
  100. package/dist/lib/nunjucks/moduk/components/radios/__examples__/with-item-hint.njk +2 -2
  101. package/dist/lib/nunjucks/moduk/components/radios/macro.njk +3 -3
  102. package/dist/lib/nunjucks/moduk/components/select/__examples__/default.njk +2 -2
  103. package/dist/lib/nunjucks/moduk/components/select/__examples__/with-hint.njk +2 -2
  104. package/dist/lib/nunjucks/moduk/components/select/macro.njk +3 -3
  105. package/dist/lib/nunjucks/moduk/components/skip-link/__examples__/default.njk +2 -3
  106. package/dist/lib/nunjucks/moduk/components/skip-link/macro.njk +2 -2
  107. package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/cards-with-action.njk +2 -2
  108. package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/cards.njk +3 -3
  109. package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/default.njk +2 -2
  110. package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/with-no-actions.njk +2 -2
  111. package/dist/lib/nunjucks/moduk/components/summary-list/__examples__/with-no-border.njk +2 -2
  112. package/dist/lib/nunjucks/moduk/components/summary-list/macro.njk +2 -2
  113. package/dist/lib/nunjucks/moduk/components/table/__examples__/default.njk +2 -2
  114. package/dist/lib/nunjucks/moduk/components/table/__examples__/with-comparative-numbers.njk +2 -2
  115. package/dist/lib/nunjucks/moduk/components/table/__examples__/with-customised-column-widths.njk +2 -2
  116. package/dist/lib/nunjucks/moduk/components/table/__examples__/with-large-caption.njk +2 -2
  117. package/dist/lib/nunjucks/moduk/components/table/macro.njk +2 -2
  118. package/dist/lib/nunjucks/moduk/components/tabs/__examples__/default.njk +7 -7
  119. package/dist/lib/nunjucks/moduk/components/tabs/macro.njk +2 -2
  120. package/dist/lib/nunjucks/moduk/components/tag/__examples__/blue.njk +2 -2
  121. package/dist/lib/nunjucks/moduk/components/tag/__examples__/default.njk +2 -2
  122. package/dist/lib/nunjucks/moduk/components/tag/__examples__/green.njk +2 -2
  123. package/dist/lib/nunjucks/moduk/components/tag/__examples__/grey.njk +2 -2
  124. package/dist/lib/nunjucks/moduk/components/tag/__examples__/orange.njk +2 -2
  125. package/dist/lib/nunjucks/moduk/components/tag/__examples__/pink.njk +2 -2
  126. package/dist/lib/nunjucks/moduk/components/tag/__examples__/purple.njk +2 -2
  127. package/dist/lib/nunjucks/moduk/components/tag/__examples__/red.njk +2 -2
  128. package/dist/lib/nunjucks/moduk/components/tag/__examples__/turquoise.njk +2 -2
  129. package/dist/lib/nunjucks/moduk/components/tag/__examples__/yellow.njk +2 -2
  130. package/dist/lib/nunjucks/moduk/components/tag/macro.njk +3 -3
  131. package/dist/lib/nunjucks/moduk/components/textarea/__examples__/default.njk +2 -2
  132. package/dist/lib/nunjucks/moduk/components/textarea/__examples__/not-as-page-heading.njk +2 -2
  133. package/dist/lib/nunjucks/moduk/components/textarea/__examples__/with-custom-height.njk +2 -2
  134. package/dist/lib/nunjucks/moduk/components/textarea/__examples__/with-error.njk +2 -2
  135. package/dist/lib/nunjucks/moduk/components/textarea/macro.njk +2 -2
  136. package/dist/lib/nunjucks/moduk/components/warning-text/__examples__/default.njk +2 -2
  137. package/dist/lib/nunjucks/moduk/components/warning-text/macro.njk +2 -2
  138. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
2
- {% from "moduk/components/fieldset/macro.njk" import modukFieldset %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
+ {% from "moduk/components/fieldset/macro.njk" import modukFieldset -%}
3
3
 
4
4
  {% call modukFieldset({
5
5
  legend: {
@@ -7,7 +7,7 @@
7
7
  classes: "govuk-fieldset__legend--l",
8
8
  isPageHeading: true
9
9
  }
10
- }) %}
10
+ }) -%}
11
11
  {{ modukInput({
12
12
  label: {
13
13
  text: 'Address line 1'
@@ -15,7 +15,7 @@
15
15
  id: "address-line-1",
16
16
  name: "address-line-1",
17
17
  autocomplete: "address-line1"
18
- }) }}
18
+ }) -}}
19
19
  {{ modukInput({
20
20
  label: {
21
21
  text: 'Address line 2 (optional)'
@@ -23,7 +23,7 @@
23
23
  id: "address-line-2",
24
24
  name: "address-line-2",
25
25
  autocomplete: "address-line2"
26
- }) }}
26
+ }) -}}
27
27
  {{ modukInput({
28
28
  label: {
29
29
  text: "Town or city"
@@ -32,7 +32,7 @@
32
32
  id: "address-town",
33
33
  name: "address-town",
34
34
  autocomplete: "address-level2"
35
- }) }}
35
+ }) -}}
36
36
  {{ modukInput({
37
37
  label: {
38
38
  text: "Postcode"
@@ -41,5 +41,5 @@
41
41
  id: "address-postcode",
42
42
  name: "address-postcode",
43
43
  autocomplete: "postal-code"
44
- }) }}
45
- {% endcall %}
44
+ }) -}}
45
+ {% endcall -%}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/file-upload/macro.njk" import modukFileUpload %}
1
+ {% from "moduk/components/file-upload/macro.njk" import modukFileUpload -%}
2
2
 
3
3
  {{ modukFileUpload({
4
4
  id: "file-upload-1",
@@ -6,4 +6,4 @@
6
6
  label: {
7
7
  text: "Upload a file"
8
8
  }
9
- }) }}
9
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/file-upload/macro.njk" import modukFileUpload %}
1
+ {% from "moduk/components/file-upload/macro.njk" import modukFileUpload -%}
2
2
 
3
3
  {{ modukFileUpload({
4
4
  id: "file-upload-with-error",
@@ -9,4 +9,4 @@
9
9
  errorMessage: {
10
10
  text: "The CSV must be smaller than 2MB"
11
11
  }
12
- }) }}
12
+ }) -}}
@@ -1,5 +1,5 @@
1
1
  {% from "govuk/components/file-upload/macro.njk" import govukFileUpload %}
2
2
 
3
- {% macro modukFileUpload(params) %}
3
+ {% macro modukFileUpload(params) -%}
4
4
  {{ govukFileUpload(params) }}
5
- {% endmacro %}
5
+ {%- endmacro %}
@@ -1,3 +1,3 @@
1
- {%- from "moduk/components/footer/macro.njk" import modukFooter -%}
1
+ {% from "moduk/components/footer/macro.njk" import modukFooter -%}
2
2
 
3
- {{ modukFooter({}) }}
3
+ {{ modukFooter({}) -}}
@@ -1,4 +1,4 @@
1
- {%- from "moduk/components/footer/macro.njk" import modukFooter -%}
1
+ {% from "moduk/components/footer/macro.njk" import modukFooter -%}
2
2
 
3
3
  {{ modukFooter({
4
4
  meta: {
@@ -17,4 +17,4 @@
17
17
  }
18
18
  ]
19
19
  }
20
- }) }}
20
+ }) -}}
@@ -1,4 +1,4 @@
1
- {%- from "moduk/components/footer/macro.njk" import modukFooter -%}
1
+ {% from "moduk/components/footer/macro.njk" import modukFooter -%}
2
2
 
3
3
  {{ modukFooter({
4
4
  navigation: [
@@ -69,4 +69,4 @@
69
69
  ],
70
70
  html: 'Built by <a href="#" class="govuk-footer__link">Defence Digital</a>'
71
71
  }
72
- }) }}
72
+ }) -}}
@@ -1,4 +1,4 @@
1
- {%- from "moduk/components/footer/macro.njk" import modukFooter -%}
1
+ {% from "moduk/components/footer/macro.njk" import modukFooter -%}
2
2
 
3
3
  {{ modukFooter({
4
4
  navigation: [
@@ -52,4 +52,4 @@
52
52
  ]
53
53
  }
54
54
  ]
55
- }) }}
55
+ }) -}}
@@ -1,5 +1,5 @@
1
1
  {% from "govuk/components/footer/macro.njk" import govukFooter %}
2
2
 
3
- {% macro modukFooter(params) %}
3
+ {% macro modukFooter(params) -%}
4
4
  {{ govukFooter(params) }}
5
- {% endmacro %}
5
+ {%- endmacro %}
@@ -1,3 +1,3 @@
1
- {%- from "moduk/components/header/macro.njk" import modukHeader -%}
1
+ {% from "moduk/components/header/macro.njk" import modukHeader -%}
2
2
 
3
- {{ modukHeader({}) }}
3
+ {{ modukHeader({}) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/header/macro.njk" import modukHeader %}
1
+ {% from "moduk/components/header/macro.njk" import modukHeader -%}
2
2
 
3
3
  {{ modukHeader({
4
4
  homepageUrl: "#",
@@ -23,4 +23,4 @@
23
23
  text: "Navigation item 4"
24
24
  }
25
25
  ]
26
- }) }}
26
+ }) -}}
@@ -1,6 +1,6 @@
1
- {% from "moduk/components/header/macro.njk" import modukHeader %}
1
+ {% from "moduk/components/header/macro.njk" import modukHeader -%}
2
2
 
3
3
  {{ modukHeader({
4
4
  homepageUrl: "#",
5
5
  serviceName: "Service name"
6
- }) }}
6
+ }) -}}
@@ -1,7 +1,7 @@
1
- {% from "moduk/components/header/macro.njk" import modukHeader %}
1
+ {%- from "moduk/components/header/macro.njk" import modukHeader -%}
2
2
 
3
3
  {{ modukHeader({
4
4
  homepageUrl: "#",
5
5
  serviceName: "Service name",
6
6
  serviceUrl: "#"
7
- }) }}
7
+ }) -}}
@@ -5,9 +5,9 @@
5
5
  The logo has been changed, some CSS classes have been added and there are some slight markup changes.
6
6
  #}
7
7
 
8
- {% macro modukHeader(params) %}
8
+ {% macro modukHeader(params) -%}
9
9
 
10
- {% set menuButtonText = params.menuButtonText if params.menuButtonText else 'Menu' %}
10
+ {% set menuButtonText = params.menuButtonText if params.menuButtonText else 'Menu' -%}
11
11
 
12
12
  <header class="govuk-header {{ params.classes if params.classes }}" role="banner" data-module="govuk-header"
13
13
  {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
@@ -35,43 +35,42 @@
35
35
  </span>
36
36
  </a>
37
37
  </div>
38
- {% if params.serviceName or params.navigation %}
38
+ {%- if params.serviceName or params.navigation %}
39
39
  <div class="govuk-header__content">
40
- {% if params.serviceName %}
41
- {% if params.serviceUrl %}
40
+ {%- if params.serviceName %}
41
+ {%- if params.serviceUrl %}
42
42
  <a href="{{ params.serviceUrl }}" class="govuk-header__link moduk-header__service-name govuk-header__service-name">
43
43
  {{ params.serviceName }}
44
44
  </a>
45
- {% else%}
45
+ {%- else %}
46
46
  <span class="moduk-header__service-name govuk-header__service-name">
47
47
  {{ params.serviceName }}
48
48
  </span>
49
- {% endif %}
50
- {% endif %}
51
- {% if params.navigation %}
52
- <nav aria-label="{{ params.navigationLabel | default(menuButtonText) }}" class="govuk-header__navigation {{ params.navigationClasses if params.navigationClasses }}">
53
- <button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="{{ params.menuButtonLabel | default('Show or hide menu') }}" hidden>{{ menuButtonText }}</button>
54
-
55
- <ul id="navigation" class="govuk-header__navigation-list">
56
- {% for item in params.navigation %}
57
- {% if item.text or item.html %}
58
- <li class="govuk-header__navigation-item{{ ' govuk-header__navigation-item--active moduk-header__navigation-item--active' if item.active }}">
59
- {% if item.href %}
60
- <a class="govuk-header__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
61
- {% endif %}
62
- {{ item.html | safe if item.html else item.text }}
63
- {% if item.href %}
64
- </a>
65
- {% endif %}
66
- </li>
67
- {% endif %}
68
- {% endfor %}
69
- </ul>
70
- </nav>
71
- {% endif %}
49
+ {% endif -%}
50
+ {%- endif -%}
51
+ {%- if params.navigation %}
52
+ <nav aria-label="{{ params.navigationLabel | default(menuButtonText) }}" class="govuk-header__navigation {{ params.navigationClasses if params.navigationClasses }}">
53
+ <button type="button" class="govuk-header__menu-button govuk-js-header-toggle" aria-controls="navigation" aria-label="{{ params.menuButtonLabel | default('Show or hide menu') }}" hidden>{{ menuButtonText }}</button>
54
+ <ul id="navigation" class="govuk-header__navigation-list">
55
+ {%- for item in params.navigation -%}
56
+ {%- if item.text or item.html %}
57
+ <li class="govuk-header__navigation-item{{ ' govuk-header__navigation-item--active moduk-header__navigation-item--active' if item.active }}">
58
+ {% if item.href -%}
59
+ <a class="govuk-header__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
60
+ {%- endif -%}
61
+ {{ item.html | safe if item.html else item.text }}
62
+ {%- if item.href -%}
63
+ </a>
64
+ {%- endif %}
65
+ </li>
66
+ {%- endif %}
67
+ {%- endfor %}
68
+ </ul>
69
+ </nav>
70
+ {%- endif %}
72
71
  </div>
73
- {% endif %}
72
+ {%- endif %}
74
73
  </div>
75
74
  </header>
76
75
 
77
- {% endmacro %}
76
+ {%- endmacro -%}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  label: {
@@ -8,4 +8,4 @@
8
8
  },
9
9
  id: "default",
10
10
  name: "event-name-default"
11
- }) }}
11
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  label: {
@@ -6,4 +6,4 @@
6
6
  },
7
7
  id: "with-not-as-page-heading",
8
8
  name: "event-name-with-not-as-page-heading"
9
- }) }}
9
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  label: {
@@ -14,4 +14,4 @@
14
14
  errorMessage: {
15
15
  text: "Enter an event name"
16
16
  }
17
- }) }}
17
+ }) -}}
@@ -1,14 +1,14 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  <div>
4
- {{ modukInput({
4
+ {{- modukInput({
5
5
  label: {
6
6
  text: "20 character width"
7
7
  },
8
8
  classes: "govuk-input--width-20",
9
9
  id: "width-20",
10
10
  name: "width-20"
11
- }) }}
11
+ }) -}}
12
12
 
13
13
  {{ modukInput({
14
14
  label: {
@@ -17,7 +17,7 @@
17
17
  classes: "govuk-input--width-10",
18
18
  id: "width-10",
19
19
  name: "width-10"
20
- }) }}
20
+ }) -}}
21
21
 
22
22
  {{ modukInput({
23
23
  label: {
@@ -26,7 +26,7 @@
26
26
  classes: "govuk-input--width-5",
27
27
  id: "width-5",
28
28
  name: "width-5"
29
- }) }}
29
+ }) -}}
30
30
 
31
31
  {{ modukInput({
32
32
  label: {
@@ -35,7 +35,7 @@
35
35
  classes: "govuk-input--width-4",
36
36
  id: "width-4",
37
37
  name: "width-4"
38
- }) }}
38
+ }) -}}
39
39
 
40
40
  {{ modukInput({
41
41
  label: {
@@ -44,14 +44,14 @@
44
44
  classes: "govuk-input--width-3",
45
45
  id: "width-3",
46
46
  name: "width-3"
47
- }) }}
47
+ }) -}}
48
48
 
49
- {{ modukInput({
50
- label: {
51
- text: "2 character width"
52
- },
53
- classes: "govuk-input--width-2",
54
- id: "width-2",
55
- name: "width-2"
56
- }) }}
49
+ {{ modukInput({
50
+ label: {
51
+ text: "2 character width"
52
+ },
53
+ classes: "govuk-input--width-2",
54
+ id: "width-2",
55
+ name: "width-2"
56
+ }) -}}
57
57
  </div>
@@ -1,14 +1,14 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  <div>
4
- {{ modukInput({
4
+ {{- modukInput({
5
5
  label: {
6
6
  text: "Full width"
7
7
  },
8
8
  classes: "govuk-!-width-full",
9
9
  id: "full",
10
10
  name: "full"
11
- }) }}
11
+ }) -}}
12
12
 
13
13
  {{ modukInput({
14
14
  label: {
@@ -17,7 +17,7 @@
17
17
  classes: "govuk-!-width-three-quarters",
18
18
  id: "three-quarters",
19
19
  name: "three-quarters"
20
- }) }}
20
+ }) -}}
21
21
 
22
22
  {{ modukInput({
23
23
  label: {
@@ -26,7 +26,7 @@
26
26
  classes: "govuk-!-width-two-thirds",
27
27
  id: "two-thirds",
28
28
  name: "two-thirds"
29
- }) }}
29
+ }) -}}
30
30
 
31
31
  {{ modukInput({
32
32
  label: {
@@ -35,7 +35,7 @@
35
35
  classes: "govuk-!-width-one-half",
36
36
  id: "one-half",
37
37
  name: "one-half"
38
- }) }}
38
+ }) -}}
39
39
 
40
40
  {{ modukInput({
41
41
  label: {
@@ -44,7 +44,7 @@
44
44
  classes: "govuk-!-width-one-third",
45
45
  id: "one-third",
46
46
  name: "one-third"
47
- }) }}
47
+ }) -}}
48
48
 
49
49
  {{ modukInput({
50
50
  label: {
@@ -53,5 +53,5 @@
53
53
  classes: "govuk-!-width-one-quarter",
54
54
  id: "one-quarter",
55
55
  name: "one-quarter"
56
- }) }}
56
+ }) -}}
57
57
  </div>
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  label: {
@@ -11,4 +11,4 @@
11
11
  },
12
12
  id: "with-hint",
13
13
  name: "event-name-with-hint"
14
- }) }}
14
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  label: {
@@ -14,4 +14,4 @@
14
14
  name: "account-number-with-numeric",
15
15
  inputmode: "numeric",
16
16
  spellcheck: false
17
- }) }}
17
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  id: "with-prefix-and-suffix-error",
@@ -19,4 +19,4 @@
19
19
  },
20
20
  classes: "govuk-input--width-5",
21
21
  spellcheck: false
22
- }) }}
22
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  id: "with-prefix-and-suffix",
@@ -16,4 +16,4 @@
16
16
  },
17
17
  classes: "govuk-input--width-5",
18
18
  spellcheck: false
19
- }) }}
19
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  id: "with-prefix",
@@ -13,4 +13,4 @@
13
13
  },
14
14
  classes: "govuk-input--width-5",
15
15
  spellcheck: false
16
- }) }}
16
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/input/macro.njk" import modukInput %}
1
+ {% from "moduk/components/input/macro.njk" import modukInput -%}
2
2
 
3
3
  {{ modukInput({
4
4
  id: "with-suffix",
@@ -13,4 +13,4 @@
13
13
  },
14
14
  classes: "govuk-input--width-5",
15
15
  spellcheck: false
16
- }) }}
16
+ }) -}}
@@ -1,5 +1,5 @@
1
1
  {% from "govuk/components/input/macro.njk" import govukInput %}
2
2
 
3
- {% macro modukInput(params) %}
3
+ {% macro modukInput(params) -%}
4
4
  {{ govukInput(params) }}
5
- {% endmacro %}
5
+ {%- endmacro %}
@@ -1,5 +1,5 @@
1
- {%- from "moduk/components/inset-text/macro.njk" import modukInsetText -%}
1
+ {% from "moduk/components/inset-text/macro.njk" import modukInsetText -%}
2
2
 
3
- {{ modukInsetText({
3
+ {{ modukInsetText({
4
4
  text: "You’ll get confirmation that we have received your report within 5 working days."
5
- }) }}
5
+ }) -}}
@@ -7,5 +7,5 @@
7
7
  {%- endcall %}
8
8
  {%- else -%}
9
9
  {{ govukInsetText(params) }}
10
- {%- endif %}
10
+ {%- endif -%}
11
11
  {%- endmacro %}
@@ -1,5 +1,5 @@
1
- {% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner %}
1
+ {% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner -%}
2
2
 
3
3
  {{ modukNotificationBanner({
4
4
  text: 'There may be a delay in processing your application because of the coronavirus outbreak.'
5
- }) }}
5
+ }) -}}
@@ -1,13 +1,13 @@
1
- {% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner %}
1
+ {% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner -%}
2
2
 
3
3
  {% set html %}
4
4
  <h3 class="govuk-notification-banner__heading">
5
5
  Training outcome recorded and trainee withdrawn
6
6
  </h3>
7
7
  <p class="govuk-body">Contact <a class="govuk-notification-banner__link" href="#">example@department.gov.uk</a> if you think there’s a problem.</p>
8
- {% endset %}
8
+ {% endset -%}
9
9
 
10
10
  {{ modukNotificationBanner({
11
11
  html: html,
12
12
  type: 'success'
13
- }) }}
13
+ }) -}}
@@ -1,12 +1,12 @@
1
- {% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner %}
1
+ {% from "moduk/components/notification-banner/macro.njk" import modukNotificationBanner -%}
2
2
 
3
3
  {% set html %}
4
4
  <p class="govuk-notification-banner__heading">
5
5
  You have 7 days left to send your application.
6
6
  <a class="govuk-notification-banner__link" href="#">View application</a>.
7
7
  </p>
8
- {% endset %}
8
+ {% endset -%}
9
9
 
10
10
  {{ modukNotificationBanner({
11
11
  html: html
12
- }) }}
12
+ }) -}}
@@ -3,9 +3,9 @@
3
3
  {% macro modukNotificationBanner(params) -%}
4
4
  {% if caller -%}
5
5
  {% call govukNotificationBanner(params) -%}
6
- {{ caller() }}
6
+ {{- caller() -}}
7
7
  {%- endcall %}
8
8
  {%- else -%}
9
- {{ govukNotificationBanner(params) }}
9
+ {{- govukNotificationBanner(params) -}}
10
10
  {%- endif %}
11
11
  {%- endmacro %}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/pagination/macro.njk" import modukPagination %}
1
+ {% from "moduk/components/pagination/macro.njk" import modukPagination -%}
2
2
 
3
3
  {{ modukPagination({
4
4
  previous: {
@@ -22,4 +22,4 @@
22
22
  href: "#"
23
23
  }
24
24
  ]
25
- }) }}
25
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/pagination/macro.njk" import modukPagination %}
1
+ {% from "moduk/components/pagination/macro.njk" import modukPagination -%}
2
2
 
3
3
  {{ modukPagination({
4
4
  next: {
@@ -19,4 +19,4 @@
19
19
  href: "#"
20
20
  }
21
21
  ]
22
- }) }}
22
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/pagination/macro.njk" import modukPagination %}
1
+ {% from "moduk/components/pagination/macro.njk" import modukPagination -%}
2
2
 
3
3
  {{ modukPagination({
4
4
  previous: {
@@ -19,4 +19,4 @@
19
19
  href: "#"
20
20
  }
21
21
  ]
22
- }) }}
22
+ }) -}}
@@ -1,4 +1,4 @@
1
- {% from "moduk/components/pagination/macro.njk" import modukPagination %}
1
+ {% from "moduk/components/pagination/macro.njk" import modukPagination -%}
2
2
 
3
3
  {{ modukPagination({
4
4
  previous: {
@@ -36,4 +36,4 @@
36
36
  href: "#"
37
37
  }
38
38
  ]
39
- }) }}
39
+ }) -}}
@@ -1,6 +1,6 @@
1
- {%- from "moduk/components/pagination/macro.njk" import modukPagination -%}
1
+ {% from "moduk/components/pagination/macro.njk" import modukPagination -%}
2
2
 
3
- {{- modukPagination({
3
+ {{ modukPagination({
4
4
  previous: {
5
5
  labelText: "Understanding military personnel",
6
6
  href: "#"