@eeacms/volto-eea-website-theme 3.9.2 → 3.10.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/CHANGELOG.md +17 -2
- package/package.json +1 -1
- package/src/components/manage/Blocks/ContextNavigation/variations/Accordion.jsx +1 -0
- package/src/components/theme/CustomCSS/CustomCSS.jsx +3 -2
- package/src/index.js +4 -2
- package/src/index.test.js +2 -2
- package/src/middleware/voltoCustom.js +30 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,26 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [3.
|
|
7
|
+
### [3.10.1](https://github.com/eea/volto-eea-website-theme/compare/3.10.0...3.10.1) - 26 September 2025
|
|
8
|
+
|
|
9
|
+
#### :nail_care: Enhancements
|
|
10
|
+
|
|
11
|
+
- change(app): Update CustomCSS to use relative paths for resources [David Ichim - [`0b377f1`](https://github.com/eea/volto-eea-website-theme/commit/0b377f19c1e9ca474cd5ae89283235a143609f6b)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Remove unused import of config from registry [David Ichim - [`5f16220`](https://github.com/eea/volto-eea-website-theme/commit/5f16220ca34cf51721fd6b1099996a3c8ebb8bb6)]
|
|
16
|
+
### [3.10.0](https://github.com/eea/volto-eea-website-theme/compare/3.9.2...3.10.0) - 25 September 2025
|
|
17
|
+
|
|
18
|
+
#### :nail_care: Enhancements
|
|
19
|
+
|
|
20
|
+
- change(custom-js): removed App.jsx override in favor of adding to CustomCSS.jsx [David Ichim - [`3d180ec`](https://github.com/eea/volto-eea-website-theme/commit/3d180ec365ee7d4b7a96f8ad3cdae532b4834ec3)]
|
|
8
21
|
|
|
9
22
|
#### :hammer_and_wrench: Others
|
|
10
23
|
|
|
11
|
-
-
|
|
24
|
+
- Bump package version to 3.10.0 [David Ichim - [`1c88a94`](https://github.com/eea/volto-eea-website-theme/commit/1c88a94de85ebd2aec72f2d2c1cfdd31a36ca3f5)]
|
|
25
|
+
### [3.9.2](https://github.com/eea/volto-eea-website-theme/compare/3.9.1...3.9.2) - 22 September 2025
|
|
26
|
+
|
|
12
27
|
### [3.9.1](https://github.com/eea/volto-eea-website-theme/compare/3.9.0...3.9.1) - 26 August 2025
|
|
13
28
|
|
|
14
29
|
### [3.9.0](https://github.com/eea/volto-eea-website-theme/compare/3.8.0...3.9.0) - 20 August 2025
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import config from '@plone/volto/registry';
|
|
3
2
|
|
|
4
3
|
const CustomCSS = (props) => {
|
|
5
|
-
const href =
|
|
4
|
+
const href = `/voltoCustom.css`;
|
|
5
|
+
const src = `/voltoCustom.js`;
|
|
6
6
|
return (
|
|
7
7
|
<>
|
|
8
8
|
<link rel="stylesheet" href={href} />
|
|
9
|
+
<script type="text/javascript" src={src}></script>
|
|
9
10
|
</>
|
|
10
11
|
);
|
|
11
12
|
};
|
package/src/index.js
CHANGED
|
@@ -44,7 +44,8 @@ import SubsiteClass from './components/theme/SubsiteClass';
|
|
|
44
44
|
import contentBoxSVG from './icons/content-box.svg';
|
|
45
45
|
|
|
46
46
|
import okMiddleware from './middleware/ok';
|
|
47
|
-
import
|
|
47
|
+
import voltoCustomCSSMiddleware from './middleware/voltoCustom';
|
|
48
|
+
import { voltoCustomJsMiddleware } from './middleware/voltoCustom';
|
|
48
49
|
import installSlate from './slate';
|
|
49
50
|
import { print, navigationSettings } from './reducers';
|
|
50
51
|
|
|
@@ -397,7 +398,8 @@ const applyConfig = (config) => {
|
|
|
397
398
|
const express = require('express');
|
|
398
399
|
config.settings.expressMiddleware = [
|
|
399
400
|
...(config.settings.expressMiddleware || []),
|
|
400
|
-
|
|
401
|
+
voltoCustomCSSMiddleware(express),
|
|
402
|
+
voltoCustomJsMiddleware(express),
|
|
401
403
|
okMiddleware(express),
|
|
402
404
|
];
|
|
403
405
|
}
|
package/src/index.test.js
CHANGED
|
@@ -146,7 +146,7 @@ describe('applyConfig', () => {
|
|
|
146
146
|
);
|
|
147
147
|
|
|
148
148
|
expect(config.widgets.views.id.subjects).toBe('MockedTokenWidget');
|
|
149
|
-
expect(config.settings.expressMiddleware.length).toEqual(
|
|
149
|
+
expect(config.settings.expressMiddleware.length).toEqual(3);
|
|
150
150
|
expect(config.settings.appExtras).toEqual([
|
|
151
151
|
{ match: '/**', component: 'MockedInpageNavigation' },
|
|
152
152
|
{ match: '', component: 'MockedCustomCSS' },
|
|
@@ -313,7 +313,7 @@ describe('applyConfig', () => {
|
|
|
313
313
|
expect(config.blocks.blocksConfig['hero'].copyrightPrefix).toBe('Image');
|
|
314
314
|
|
|
315
315
|
expect(config.widgets.views.id.subjects).toBe('MockedTokenWidget');
|
|
316
|
-
expect(config.settings.expressMiddleware.length).toEqual(
|
|
316
|
+
expect(config.settings.expressMiddleware.length).toEqual(3);
|
|
317
317
|
expect(config.settings.appExtras).toEqual([
|
|
318
318
|
{ match: '/**', component: 'MockedInpageNavigation' },
|
|
319
319
|
{ match: '', component: 'MockedCustomCSS' },
|
|
@@ -29,11 +29,39 @@ function voltoCustomMiddleware(req, res, next) {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
function getVoltoCustomJsMiddleware(req, res, next) {
|
|
33
|
+
getBackendResourceWithAuth(req)
|
|
34
|
+
.then((resource) => {
|
|
35
|
+
// Just forward the headers that we need
|
|
36
|
+
HEADERS.forEach((header) => {
|
|
37
|
+
if (resource?.get?.(header)) {
|
|
38
|
+
res.set(header, resource.get(header));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
res.status(resource.statusCode);
|
|
42
|
+
res.send(resource.body);
|
|
43
|
+
})
|
|
44
|
+
.catch(() => {
|
|
45
|
+
res.set('Content-Type', 'text/javascript; charset=utf-8');
|
|
46
|
+
res.status(200);
|
|
47
|
+
res.send(
|
|
48
|
+
'/* Override this by adding a File called voltoCustom.js to backend at portal_skins/custom/manage_main */',
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const registerVoltoCustomMiddleware = function (express) {
|
|
33
54
|
const middleware = express.Router();
|
|
34
55
|
middleware.all(['**/voltoCustom.css$'], voltoCustomMiddleware);
|
|
35
56
|
middleware.id = 'voltoCustom.css';
|
|
36
57
|
return middleware;
|
|
37
58
|
};
|
|
38
59
|
|
|
39
|
-
export
|
|
60
|
+
export const voltoCustomJsMiddleware = function (express) {
|
|
61
|
+
const middleware = express.Router();
|
|
62
|
+
middleware.all(['**/voltoCustom.js$'], getVoltoCustomJsMiddleware);
|
|
63
|
+
middleware.id = 'voltoCustom.js';
|
|
64
|
+
return middleware;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default registerVoltoCustomMiddleware;
|