@x-govuk/govuk-eleventy-plugin 7.1.0 → 7.1.1
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.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{% from "govuk/components/service-navigation/macro.njk" import govukServiceNavigation %}
|
|
3
3
|
|
|
4
4
|
{{ govukServiceNavigation({
|
|
5
|
-
classes: "app-service-navigation" + (" govuk-service-navigation--inverse" if
|
|
5
|
+
classes: "app-service-navigation" + (" govuk-service-navigation--inverse" if inverseMasthead) + (" " + params.classes if params.classes),
|
|
6
6
|
attributes: params.attributes,
|
|
7
7
|
ariaLabel: params.ariaLabel,
|
|
8
8
|
menuButtonText: params.menuButtonText,
|
package/src/data/options.js
CHANGED
|
@@ -31,17 +31,18 @@ export function defaultPluginOptions(options, pathPrefix) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Rewrite default GOV.UK icon asset paths if rebrand enabled
|
|
34
|
-
defaults.icons =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
defaults.icons =
|
|
35
|
+
options.rebrand !== false
|
|
36
|
+
? {
|
|
37
|
+
mask: '/assets/rebrand/images/govuk-mask-icon.svg',
|
|
38
|
+
shortcut: '/assets/rebrand/images/favicon.ico',
|
|
39
|
+
touch: '/assets/rebrand/images/govuk-icon-180.png'
|
|
40
|
+
}
|
|
41
|
+
: {
|
|
42
|
+
mask: '/assets/images/govuk-mask-icon.svg',
|
|
43
|
+
shortcut: '/assets/images/favicon.ico',
|
|
44
|
+
touch: '/assets/images/govuk-icon-180.png'
|
|
45
|
+
}
|
|
45
46
|
|
|
46
47
|
// Rewrite default GOV.UK Opengraph asset path if rebrand enabled
|
|
47
48
|
defaults.opengraphImageUrl = options.rebrand
|
package/src/index.js
CHANGED
|
@@ -52,9 +52,8 @@ export async function govukEleventyPlugin(eleventyConfig, pluginOptions = {}) {
|
|
|
52
52
|
eleventyConfig.addPlugin(EleventyHtmlBasePlugin)
|
|
53
53
|
eleventyConfig.addPlugin(eleventyNavigation)
|
|
54
54
|
|
|
55
|
-
// GOV.UK rebrand
|
|
56
|
-
|
|
57
|
-
eleventyConfig.addNunjucksGlobal('govukRebrand', options.rebrand || false)
|
|
55
|
+
// GOV.UK rebrand (defaults to `true`)
|
|
56
|
+
eleventyConfig.addNunjucksGlobal('govukRebrand', options.rebrand)
|
|
58
57
|
|
|
59
58
|
// Events
|
|
60
59
|
eleventyConfig.on('eleventy.after', async ({ dir }) => {
|
package/src/layouts/product.njk
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{% extends "layouts/base.njk" %}
|
|
2
2
|
|
|
3
|
-
{% set
|
|
3
|
+
{% set inverseMasthead = inverseMasthead | default(true) %}
|
|
4
4
|
|
|
5
5
|
{% block main %}
|
|
6
6
|
<main id="main-content" role="main" {%- if mainLang %} lang="{{ mainLang }}"{% endif %}>
|
|
7
7
|
{{ xGovukMasthead({
|
|
8
|
-
inverse:
|
|
8
|
+
inverse: inverseMasthead,
|
|
9
9
|
title: {
|
|
10
10
|
html: title | smart
|
|
11
11
|
} if title,
|