hof 23.0.0-frontend-v4-beta.6 → 23.0.0-frontend-v4-beta.8
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.
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
htmlLang: '{{htmlLang}}',
|
|
5
5
|
assetPath: '{{govukAssetPath}}',
|
|
6
|
+
assetRebrandPath: '{{govukAssetPath}}rebrand/',
|
|
6
7
|
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
|
|
7
8
|
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
|
|
8
9
|
bodyStart: '{{$bodyStart}}{{/bodyStart}}',
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
<meta name="theme-color" content="#1d70b8">
|
|
11
11
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
12
|
-
<link rel="icon" sizes="48x48" href="{{
|
|
13
|
-
<link rel="icon" sizes="any" href="{{
|
|
14
|
-
<link rel="mask-icon" href="{{
|
|
15
|
-
<link rel="apple-touch-icon" href="{{
|
|
16
|
-
<link rel="manifest" href="{{
|
|
17
|
-
<meta property="og:image" content="{{
|
|
12
|
+
<link rel="icon" sizes="48x48" href="{{assetRebrandPath}}images/favicon.ico">
|
|
13
|
+
<link rel="icon" sizes="any" href="{{assetRebrandPath}}images/favicon.svg" type="image/svg+xml">
|
|
14
|
+
<link rel="mask-icon" href="{{assetRebrandPath}}images/govuk-icon-mask.svg" color="#1d70b8">
|
|
15
|
+
<link rel="apple-touch-icon" href="{{assetRebrandPath}}images/govuk-icon-180.png">
|
|
16
|
+
<link rel="manifest" href="{{assetRebrandPath}}manifest.json">
|
|
17
|
+
<meta property="og:image" content="{{assetRebrandPath}}images/govuk-opengraph-image.png">
|
|
18
18
|
</head>
|
|
19
19
|
|
|
20
20
|
<body class="{{ bodyClasses }} govuk-template__body js-enabled" >
|
|
@@ -35,10 +35,9 @@
|
|
|
35
35
|
<!--[if gt IE 8]><!-->
|
|
36
36
|
<div id="govuk-header__logo"></div>
|
|
37
37
|
<img src="/public/images/govuk-logo-opt.svg" id="govuk-header__logo" alt="Logo" loading="lazy" />
|
|
38
|
-
<!-- <img src="/assets/images/gov-uk-logo-opt" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt=""> -->
|
|
39
38
|
<!--<![endif]-->
|
|
40
39
|
<!--[if IE 8]>
|
|
41
|
-
<img src="{{
|
|
40
|
+
<img src="{{ assetRebrandPath }}images/govuk-logotype-tudor-crown.png" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt="">
|
|
42
41
|
<![endif]-->
|
|
43
42
|
</a>
|
|
44
43
|
</div>
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
<meta name="theme-color" content="#1d70b8">
|
|
11
11
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
12
|
-
<link rel="icon" sizes="48x48" href="{{govukAssetPath}}images/favicon.ico">
|
|
13
|
-
<link rel="icon" sizes="any" href="{{govukAssetPath}}images/favicon.svg" type="image/svg+xml">
|
|
14
|
-
<link rel="mask-icon" href="{{govukAssetPath}}images/govuk-icon-mask.svg" color="#1d70b8">
|
|
15
|
-
<link rel="apple-touch-icon" href="{{govukAssetPath}}images/govuk-icon-180.png">
|
|
16
|
-
<link rel="manifest" href="{{govukAssetPath}}manifest.json">
|
|
17
|
-
<meta property="og:image" content="{{govukAssetPath}}images/govuk-opengraph-image.png">
|
|
12
|
+
<link rel="icon" sizes="48x48" href="{{govukAssetPath}}rebrand/images/favicon.ico">
|
|
13
|
+
<link rel="icon" sizes="any" href="{{govukAssetPath}}rebrand/images/favicon.svg" type="image/svg+xml">
|
|
14
|
+
<link rel="mask-icon" href="{{govukAssetPath}}rebrand/images/govuk-icon-mask.svg" color="#1d70b8">
|
|
15
|
+
<link rel="apple-touch-icon" href="{{govukAssetPath}}rebrand/images/govuk-icon-180.png">
|
|
16
|
+
<link rel="manifest" href="{{govukAssetPath}}rebrand/manifest.json">
|
|
17
|
+
<meta property="og:image" content="{{govukAssetPath}}rebrand/images/govuk-opengraph-image.png">
|
|
18
18
|
</head>
|
|
19
19
|
|
|
20
20
|
<body class="{{$bodyClasses}}{{/bodyClasses}} govuk-template__body js-enabled" >
|
|
@@ -35,10 +35,9 @@
|
|
|
35
35
|
<!--[if gt IE 8]><!-->
|
|
36
36
|
<div id="govuk-header__logo"></div>
|
|
37
37
|
<img src="/public/images/govuk-logo-opt.svg" id="govuk-header__logo" alt="Logo" loading="lazy" />
|
|
38
|
-
<!-- <img src="/assets/images/gov-uk-logo-opt" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt=""> -->
|
|
39
38
|
<!--<![endif]-->
|
|
40
39
|
<!--[if IE 8]>
|
|
41
|
-
<img src="{{govukAssetPath}}images/govuk-logotype-tudor-crown.png" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt="">
|
|
40
|
+
<img src="{{govukAssetPath}}rebrand/images/govuk-logotype-tudor-crown.png" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt="">
|
|
42
41
|
<![endif]-->
|
|
43
42
|
</a>
|
|
44
43
|
</div>
|
|
@@ -10,9 +10,9 @@ const basedir = path.dirname(require.resolve('govuk-frontend/package.json'));
|
|
|
10
10
|
const setup = (opts, router) => {
|
|
11
11
|
buildTemplateLayout();
|
|
12
12
|
const options = opts || {};
|
|
13
|
-
options.path = options.path || '/assets
|
|
13
|
+
options.path = options.path || '/assets';
|
|
14
14
|
|
|
15
|
-
router.use(options.path, servestatic(path.join(basedir, './govuk/assets
|
|
15
|
+
router.use(options.path, servestatic(path.join(basedir, './govuk/assets'), options));
|
|
16
16
|
router.use((req, res, next) => {
|
|
17
17
|
res.locals.govukAssetPath = req.baseUrl + options.path + '/';
|
|
18
18
|
res.locals.partials = res.locals.partials || {};
|
package/index.js
CHANGED
|
@@ -238,7 +238,7 @@ function bootstrap(options) {
|
|
|
238
238
|
app.use(hofMiddleware.rateLimiter(config, 'requests'));
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
// Set up routing so <YOUR-SITE-URL>/assets are served from /node_modules/govuk-frontend/govuk/assets
|
|
241
|
+
// Set up routing so <YOUR-SITE-URL>/assets are served from /node_modules/govuk-frontend/govuk/assets/rebrand
|
|
242
242
|
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/govuk/assets/rebrand')));
|
|
243
243
|
// Check if service has been paused and redirect accordingly
|
|
244
244
|
const bypassPaths = ['/assets', '/healthcheck', '/service-unavailable'];
|