@x-govuk/nhsuk-eleventy-plugin 1.2.0 → 1.3.0
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-govuk/nhsuk-eleventy-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using NHS.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nhsuk",
|
|
@@ -52,45 +52,45 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@11ty/eleventy": "^3.
|
|
56
|
-
"@11ty/eleventy-navigation": "^1.0.
|
|
57
|
-
"@rollup/plugin-commonjs": "^29.0.
|
|
58
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
55
|
+
"@11ty/eleventy": "^3.1.5",
|
|
56
|
+
"@11ty/eleventy-navigation": "^1.0.5",
|
|
57
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
58
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
59
59
|
"@rollup/plugin-terser": "^1.0.0",
|
|
60
60
|
"@x-govuk/govuk-eleventy-plugin": "^9.0.1",
|
|
61
61
|
"accessible-autocomplete": "^3.0.1",
|
|
62
|
-
"deepmerge": "^4.
|
|
63
|
-
"highlight.js": "^11.
|
|
62
|
+
"deepmerge": "^4.3.1",
|
|
63
|
+
"highlight.js": "^11.11.1",
|
|
64
64
|
"markdown-it-abbr": "^2.0.0",
|
|
65
|
-
"markdown-it-anchor": "^9.
|
|
65
|
+
"markdown-it-anchor": "^9.2.0",
|
|
66
66
|
"markdown-it-attribution": "^0.1.4",
|
|
67
|
-
"markdown-it-attrs": "^
|
|
68
|
-
"markdown-it-deflist": "^3.0.
|
|
67
|
+
"markdown-it-attrs": "^5.0.0",
|
|
68
|
+
"markdown-it-deflist": "^3.0.1",
|
|
69
69
|
"markdown-it-footnote": "^4.0.0",
|
|
70
|
-
"markdown-it-github-alerts": "^1.0.
|
|
70
|
+
"markdown-it-github-alerts": "^1.0.1",
|
|
71
71
|
"markdown-it-govuk": "^0.9.0",
|
|
72
|
-
"markdown-it-image-figures": "^2.
|
|
72
|
+
"markdown-it-image-figures": "^2.1.1",
|
|
73
73
|
"markdown-it-ins": "^4.0.0",
|
|
74
74
|
"markdown-it-mark": "^4.0.0",
|
|
75
75
|
"markdown-it-sub": "^2.0.0",
|
|
76
76
|
"markdown-it-sup": "^2.0.0",
|
|
77
|
-
"markdown-it-table-of-contents": "^1.
|
|
77
|
+
"markdown-it-table-of-contents": "^1.2.0",
|
|
78
78
|
"nhsuk-frontend": "^10.4.2",
|
|
79
|
-
"rollup": "^4.
|
|
80
|
-
"sass": "^1.
|
|
79
|
+
"rollup": "^4.61.0",
|
|
80
|
+
"sass": "^1.100.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@x-govuk/eslint-config": "^0.0.2",
|
|
84
84
|
"@x-govuk/nhsuk-eleventy-plugin": "file:./",
|
|
85
|
-
"np": "^11.
|
|
86
|
-
"prettier": "^3.
|
|
87
|
-
"stylelint": "^
|
|
88
|
-
"stylelint-config-gds": "^
|
|
89
|
-
"stylelint-order": "^
|
|
85
|
+
"np": "^11.2.1",
|
|
86
|
+
"prettier": "^3.8.3",
|
|
87
|
+
"stylelint": "^17.12.0",
|
|
88
|
+
"stylelint-config-gds": "^3.0.0",
|
|
89
|
+
"stylelint-order": "^8.1.1"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@sindresorhus/slugify": "^
|
|
93
|
-
"markdown-it": "^14.
|
|
92
|
+
"@sindresorhus/slugify": "^3.0.0",
|
|
93
|
+
"markdown-it": "^14.2.0",
|
|
94
94
|
"nunjucks": "^3.2.4"
|
|
95
95
|
},
|
|
96
96
|
"engines": {
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
{% from "nhsuk/components/button/macro.njk" import button as nhsukButton %}
|
|
2
|
+
|
|
3
|
+
{%- set classNamesHeading = "nhsuk-hero__heading" -%}
|
|
4
|
+
|
|
5
|
+
{%- if params.headingSize and
|
|
6
|
+
params.headingSize in ["xxs", "xs", "s", "m", "l", "xl"] and (
|
|
7
|
+
not params.headingClasses or (
|
|
8
|
+
not "nhsuk-heading-xxs" in params.headingClasses and
|
|
9
|
+
not "nhsuk-heading-xs" in params.headingClasses and
|
|
10
|
+
not "nhsuk-heading-s" in params.headingClasses and
|
|
11
|
+
not "nhsuk-heading-m" in params.headingClasses and
|
|
12
|
+
not "nhsuk-heading-l" in params.headingClasses and
|
|
13
|
+
not "nhsuk-heading-xl" in params.headingClasses
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
%}
|
|
17
|
+
{% set classNamesHeading = classNamesHeading ~ " nhsuk-heading-" ~ params.headingSize %}
|
|
18
|
+
{% endif %}
|
|
19
|
+
|
|
20
|
+
{%- if params.headingClasses %}
|
|
21
|
+
{% set classNamesHeading = classNamesHeading ~ " " ~ params.headingClasses %}
|
|
22
|
+
{% endif %}
|
|
23
|
+
|
|
2
24
|
<div class="nhsuk-hero">
|
|
3
25
|
<div class="nhsuk-width-container nhsuk-hero--border">
|
|
4
26
|
<div class="nhsuk-grid-row">
|
|
@@ -10,7 +32,7 @@
|
|
|
10
32
|
</span>
|
|
11
33
|
{% endif %}
|
|
12
34
|
{% if params.title %}
|
|
13
|
-
<h1 class="
|
|
35
|
+
<h1 class="{{ classNamesHeading }}">
|
|
14
36
|
{{- params.title | smart -}}
|
|
15
37
|
</h1>
|
|
16
38
|
{% endif %}
|
|
@@ -60,7 +60,7 @@ $_input-padding-right: nhsuk-px-to-rem(12px + $_icon-size);
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.app-search__menu--overlay {
|
|
63
|
-
box-shadow: 0 0 3px 0
|
|
63
|
+
box-shadow: 0 0 3px 0 rgb(nhsuk-colour("grey-1"), 0.5);
|
|
64
64
|
left: 0;
|
|
65
65
|
position: absolute;
|
|
66
66
|
top: 100%;
|
package/src/layouts/base.njk
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
{% set pageCount = pagination.pages | length %}
|
|
13
13
|
|
|
14
14
|
{# Navigation #}
|
|
15
|
-
{% set breadcrumbItems = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key, { includeSelf: includeInBreadcrumbs, allowMissing: true }) | itemsFromNavigation(page.url
|
|
15
|
+
{% set breadcrumbItems = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key, { includeSelf: includeInBreadcrumbs, allowMissing: true }) | itemsFromNavigation(page.url) if eleventyNavigation.key %}
|
|
16
16
|
{% set showBreadcrumbs = options.showBreadcrumbs != false and breadcrumbItems | length > 0 %}
|
|
17
17
|
|
|
18
18
|
{% from "nhsuk/components/breadcrumb/macro.njk" import breadcrumb as nhsukBreadcrumb %}
|