@eeacms/volto-eea-website-theme 1.18.1 → 1.20.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/CHANGELOG.md +46 -12
- package/DEVELOP.md +56 -0
- package/README.md +34 -17
- package/docker-compose.yml +32 -0
- package/locales/de/LC_MESSAGES/volto.po +14 -0
- package/locales/it/LC_MESSAGES/volto.po +14 -0
- package/locales/ro/LC_MESSAGES/volto.po +14 -0
- package/locales/volto.pot +16 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/Title/schema.js +34 -1
- package/src/components/theme/Banner/View.jsx +31 -0
- package/src/components/theme/BaseTag.jsx +11 -0
- package/src/components/theme/Widgets/TokenWidget.jsx +2 -2
- package/src/components/theme/Widgets/{ThemesWidget.jsx → TopicsWidget.jsx} +4 -4
- package/src/index.js +84 -14
- package/.i18n.babel.config.js +0 -1
package/CHANGELOG.md
CHANGED
@@ -4,11 +4,55 @@ 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
|
-
### [1.
|
7
|
+
### [1.20.0](https://github.com/eea/volto-eea-website-theme/compare/1.19.0...1.20.0) - 29 August 2023
|
8
|
+
|
9
|
+
#### :bug: Bug Fixes
|
10
|
+
|
11
|
+
- fix(tests): try fixing failing test on cypress [kreafox - [`6a3f261`](https://github.com/eea/volto-eea-website-theme/commit/6a3f261a1ff11245f40899cf8f75420077b993a6)]
|
12
|
+
- fix(tests): undo changes on BaseTag [kreafox - [`b74cbf2`](https://github.com/eea/volto-eea-website-theme/commit/b74cbf28276cddaa32cda6d7edceae0a6094b2ff)]
|
13
|
+
- fix(tests): comment BaseTag [kreafox - [`d1fd9d1`](https://github.com/eea/volto-eea-website-theme/commit/d1fd9d1d801c2a4de6e08aefd6f4f91076bb17f2)]
|
14
|
+
|
15
|
+
#### :house: Internal changes
|
16
|
+
|
17
|
+
- chore: remove volto-toc-block dependency - refs #256517 [dobri1408 - [`d465e45`](https://github.com/eea/volto-eea-website-theme/commit/d465e45f27416eef10a55edb85ecc75c6deaf774)]
|
18
|
+
|
19
|
+
#### :hammer_and_wrench: Others
|
20
|
+
|
21
|
+
- increase code covreage [Dobricean Ioan Dorian - [`4ff918e`](https://github.com/eea/volto-eea-website-theme/commit/4ff918edd9acb56dcbf466b759dbdd78b61b1218)]
|
22
|
+
- Release 1.20.0 [Alin Voinea - [`5fa90e1`](https://github.com/eea/volto-eea-website-theme/commit/5fa90e12d18db593400770fe48755cedda03a5e8)]
|
23
|
+
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`de90b72`](https://github.com/eea/volto-eea-website-theme/commit/de90b72fde94c2cf2245dfa49bd74cd9ea620f9f)]
|
24
|
+
- Cleanup [Tiberiu Ichim - [`248e953`](https://github.com/eea/volto-eea-website-theme/commit/248e9534364e550b8b0770f3f336c98e73cad434)]
|
25
|
+
- Maybe now [Tiberiu Ichim - [`361d026`](https://github.com/eea/volto-eea-website-theme/commit/361d0269c5f2ec5bad5e12727903a89aa3d1607d)]
|
26
|
+
- Protect against cypress [Tiberiu Ichim - [`64361fe`](https://github.com/eea/volto-eea-website-theme/commit/64361fefa5b2136c6b91b2f7e55ff56b5bc5bf15)]
|
27
|
+
- One more step [Tiberiu Ichim - [`858a7a3`](https://github.com/eea/volto-eea-website-theme/commit/858a7a317162316642722c30d867e9d0d04d79ea)]
|
28
|
+
- One more step [Tiberiu Ichim - [`6fd31d2`](https://github.com/eea/volto-eea-website-theme/commit/6fd31d2c17043d87acbaa786e0543d9ca1072aec)]
|
29
|
+
- Just Helmet [Tiberiu Ichim - [`56d38d9`](https://github.com/eea/volto-eea-website-theme/commit/56d38d929d50f06722e638f4fe9f46f8879b25a8)]
|
30
|
+
- Fix import [Tiberiu Ichim - [`14ecc8f`](https://github.com/eea/volto-eea-website-theme/commit/14ecc8fc41d5e35d4d16021cffc3eabe53a562c5)]
|
31
|
+
- Add client condition [Tiberiu Ichim - [`8c44a99`](https://github.com/eea/volto-eea-website-theme/commit/8c44a9962056a6e2864a57c324d60aab04928f8f)]
|
32
|
+
- Use Helmet again [Tiberiu Ichim - [`82aa4f3`](https://github.com/eea/volto-eea-website-theme/commit/82aa4f306f2a654bd9f2cc35de335eeaa35c6620)]
|
33
|
+
- Let's try this to make test pass [Tiberiu Ichim - [`327fdfb`](https://github.com/eea/volto-eea-website-theme/commit/327fdfbd2b730b19a4e8ea4907d5e4ae6018163a)]
|
34
|
+
- Refs #254325; add rss autodiscovery [Tiberiu Ichim - [`64d4df1`](https://github.com/eea/volto-eea-website-theme/commit/64d4df198880d9359dd6590fa000f71299971508)]
|
35
|
+
### [1.19.0](https://github.com/eea/volto-eea-website-theme/compare/1.18.1...1.19.0) - 17 August 2023
|
8
36
|
|
9
37
|
#### :bug: Bug Fixes
|
10
38
|
|
11
|
-
- fix:
|
39
|
+
- fix(filter): switch arrows for closed and opened states as before the refactoring [David Ichim - [`e228390`](https://github.com/eea/volto-eea-website-theme/commit/e228390bdcd675360b9edd61b550dc1c382d7010)]
|
40
|
+
- fix: align token widget to EEA DS - refs #256406 [Alin Voinea - [`f936549`](https://github.com/eea/volto-eea-website-theme/commit/f9365495b7ffb748429751c47ecc70daa33a25af)]
|
41
|
+
|
42
|
+
#### :nail_care: Enhancements
|
43
|
+
|
44
|
+
- refactor: Rename ThemesWidget to TopicsWidget and register it on topics id - refs #256408 [Alin Voinea - [`7648b3d`](https://github.com/eea/volto-eea-website-theme/commit/7648b3d47f1a59a5f570465503014792b3f8ed85)]
|
45
|
+
|
46
|
+
#### :house: Documentation changes
|
47
|
+
|
48
|
+
- docs: Cleanup Makefile, update DEVELOP documentation, i18n - refs #254894 [valentinab25 - [`5e25196`](https://github.com/eea/volto-eea-website-theme/commit/5e2519698c2720e36e63723879518d972fcaad7a)]
|
49
|
+
|
50
|
+
#### :hammer_and_wrench: Others
|
51
|
+
|
52
|
+
- bump package release version [David Ichim - [`19ecef9`](https://github.com/eea/volto-eea-website-theme/commit/19ecef9a61025fc7b3095d09aff62c67d3e36b36)]
|
53
|
+
- Undo previous commit [laszlocseh - [`65db1ac`](https://github.com/eea/volto-eea-website-theme/commit/65db1acef78ecbc0a72add0bef01a5deb7cd4051)]
|
54
|
+
- Added renderLinkElement to volto-slate/editor/render.jsx customization [laszlocseh - [`21799ec`](https://github.com/eea/volto-eea-website-theme/commit/21799ecd2dca868ebcdd4c8e12b56207f1a578ac)]
|
55
|
+
### [1.18.1](https://github.com/eea/volto-eea-website-theme/compare/1.18.0...1.18.1) - 26 June 2023
|
12
56
|
|
13
57
|
### [1.18.0](https://github.com/eea/volto-eea-website-theme/compare/1.17.2...1.18.0) - 20 June 2023
|
14
58
|
|
@@ -93,7 +137,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
93
137
|
|
94
138
|
#### :house: Internal changes
|
95
139
|
|
96
|
-
- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`370dcbf`](https://github.com/eea/volto-eea-website-theme/commit/370dcbfbf1a8135ce7b1b3b271b004552a631837)]
|
97
140
|
|
98
141
|
#### :hammer_and_wrench: Others
|
99
142
|
|
@@ -249,7 +292,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
249
292
|
|
250
293
|
#### :hammer_and_wrench: Others
|
251
294
|
|
252
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
|
253
295
|
### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023
|
254
296
|
|
255
297
|
#### :bug: Bug Fixes
|
@@ -396,7 +438,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
396
438
|
|
397
439
|
- For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
|
398
440
|
- Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
|
399
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
|
400
441
|
### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023
|
401
442
|
|
402
443
|
#### :hammer_and_wrench: Others
|
@@ -430,7 +471,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
430
471
|
|
431
472
|
- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
|
432
473
|
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
|
433
|
-
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
|
434
474
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
|
435
475
|
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
436
476
|
|
@@ -440,7 +480,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
440
480
|
|
441
481
|
#### :hammer_and_wrench: Others
|
442
482
|
|
443
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
|
444
483
|
- Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
|
445
484
|
- Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
|
446
485
|
### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
|
@@ -451,7 +490,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
451
490
|
|
452
491
|
#### :hammer_and_wrench: Others
|
453
492
|
|
454
|
-
- yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
|
455
493
|
### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
|
456
494
|
|
457
495
|
#### :rocket: New Features
|
@@ -492,7 +530,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
492
530
|
- Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
|
493
531
|
- Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
|
494
532
|
- fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
|
495
|
-
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
|
496
533
|
### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
|
497
534
|
|
498
535
|
#### :nail_care: Enhancements
|
@@ -540,7 +577,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
540
577
|
|
541
578
|
#### :hammer_and_wrench: Others
|
542
579
|
|
543
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
|
544
580
|
### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
|
545
581
|
|
546
582
|
#### :hammer_and_wrench: Others
|
@@ -808,7 +844,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
808
844
|
- Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
|
809
845
|
- Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
|
810
846
|
- feature(breadcrumbs): implement eea-design-system breadcrumb as Volto component #32 #7 [ichim-david - [`181af41`](https://github.com/eea/volto-eea-website-theme/commit/181af4125ce2b9ddac56dab4723cb11c26633221)]
|
811
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
|
812
847
|
- use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
|
813
848
|
- Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
|
814
849
|
- Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
|
@@ -850,5 +885,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
850
885
|
|
851
886
|
#### :hammer_and_wrench: Others
|
852
887
|
|
853
|
-
- yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
|
854
888
|
- Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
|
package/DEVELOP.md
CHANGED
@@ -2,6 +2,28 @@
|
|
2
2
|
|
3
3
|
## Develop
|
4
4
|
|
5
|
+
1. Make sure you have `docker` and `docker compose` installed and running on your machine:
|
6
|
+
|
7
|
+
```Bash
|
8
|
+
git clone https://github.com/eea/volto-eea-website-theme.git
|
9
|
+
cd volto-eea-website-theme
|
10
|
+
git checkout -b bugfix-123456 develop
|
11
|
+
make
|
12
|
+
make start
|
13
|
+
```
|
14
|
+
|
15
|
+
1. Wait for `Volto started at 0.0.0.0:3000` meesage
|
16
|
+
|
17
|
+
1. Go to http://localhost:3000
|
18
|
+
|
19
|
+
1. Happy hacking!
|
20
|
+
|
21
|
+
```Bash
|
22
|
+
cd src/addons/volto-eea-website-theme/
|
23
|
+
```
|
24
|
+
|
25
|
+
### Or add @eeacms/volto-eea-website-theme to your Volto project
|
26
|
+
|
5
27
|
Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
|
6
28
|
|
7
29
|
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
|
@@ -49,3 +71,37 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
49
71
|
1. Happy hacking!
|
50
72
|
|
51
73
|
cd src/addons/volto-eea-website-theme/
|
74
|
+
|
75
|
+
## Cypress
|
76
|
+
|
77
|
+
To run cypress locally, first make sure you don't have any Volto/Plone running on ports `8080` and `3000`.
|
78
|
+
|
79
|
+
You don't have to be in a `clean-volto-project`, you can be in any Volto Frontend
|
80
|
+
project where you added `volto-eea-website-theme` to `mrs.developer.json`
|
81
|
+
|
82
|
+
Go to:
|
83
|
+
|
84
|
+
```BASH
|
85
|
+
cd src/addons/volto-eea-website-theme/
|
86
|
+
```
|
87
|
+
|
88
|
+
Start:
|
89
|
+
|
90
|
+
```Bash
|
91
|
+
make
|
92
|
+
make start
|
93
|
+
```
|
94
|
+
|
95
|
+
This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `volto-eea-website-theme` block installed.
|
96
|
+
|
97
|
+
Open Cypress Interface:
|
98
|
+
|
99
|
+
```Bash
|
100
|
+
make cypress-open
|
101
|
+
```
|
102
|
+
|
103
|
+
Or run it:
|
104
|
+
|
105
|
+
```Bash
|
106
|
+
make cypress-run
|
107
|
+
```
|
package/README.md
CHANGED
@@ -14,40 +14,52 @@
|
|
14
14
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-website-theme-develop)
|
15
15
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-website-theme-develop)
|
16
16
|
|
17
|
-
|
18
17
|
EEA Website [Volto](https://github.com/plone/volto) Theme
|
19
18
|
|
20
19
|
## Demo
|
21
20
|
|
22
|
-
- https://
|
21
|
+
- https://www.eea.europa.eu
|
23
22
|
|
24
23
|
## Getting started
|
25
24
|
|
25
|
+
### Try volto-eea-website-theme with Docker
|
26
|
+
|
27
|
+
git clone https://github.com/eea/volto-eea-website-theme.git
|
28
|
+
cd volto-eea-website-theme
|
29
|
+
make
|
30
|
+
make start
|
31
|
+
|
32
|
+
Go to http://localhost:3000
|
33
|
+
|
26
34
|
### Add volto-eea-website-theme to your Volto project
|
27
35
|
|
28
36
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
29
37
|
|
38
|
+
```Bash
|
39
|
+
docker compose up backend
|
40
|
+
```
|
41
|
+
|
30
42
|
1. Start Volto frontend
|
31
43
|
|
32
|
-
|
44
|
+
- If you already have a volto project, just update `package.json`:
|
33
45
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
46
|
+
```JSON
|
47
|
+
"addons": [
|
48
|
+
"@eeacms/volto-eea-website-theme"
|
49
|
+
],
|
38
50
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
51
|
+
"dependencies": {
|
52
|
+
"@eeacms/volto-eea-website-theme": "^1.0.0"
|
53
|
+
}
|
54
|
+
```
|
43
55
|
|
44
|
-
|
56
|
+
- If not, create one:
|
45
57
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
58
|
+
```
|
59
|
+
npm install -g yo @plone/generator-volto
|
60
|
+
yo @plone/volto my-volto-project --addon @eeacms/volto-eea-website-theme
|
61
|
+
cd my-volto-project
|
62
|
+
```
|
51
63
|
|
52
64
|
1. Install new add-ons and restart Volto:
|
53
65
|
|
@@ -68,6 +80,11 @@ See [RELEASE.md](https://github.com/eea/volto-eea-website-theme/blob/master/RELE
|
|
68
80
|
|
69
81
|
See [DEVELOP.md](https://github.com/eea/volto-eea-website-theme/blob/master/DEVELOP.md).
|
70
82
|
|
83
|
+
## Docusaurus and Storybook
|
84
|
+
|
85
|
+
See [Docusaurus](https://eea.github.io/).
|
86
|
+
See [Storybook](https://eea.github.io/eea-storybook/).
|
87
|
+
|
71
88
|
## Copyright and license
|
72
89
|
|
73
90
|
The Initial Owner of the Original Code is European Environment Agency (EEA).
|
@@ -0,0 +1,32 @@
|
|
1
|
+
version: "3"
|
2
|
+
services:
|
3
|
+
backend:
|
4
|
+
image: eeacms/plone-backend
|
5
|
+
ports:
|
6
|
+
- "8080:8080"
|
7
|
+
environment:
|
8
|
+
SITE: "Plone"
|
9
|
+
PROFILES: "eea.kitkat:testing"
|
10
|
+
|
11
|
+
frontend:
|
12
|
+
build:
|
13
|
+
context: ./
|
14
|
+
dockerfile: ./Dockerfile
|
15
|
+
args:
|
16
|
+
ADDON_NAME: "${ADDON_NAME}"
|
17
|
+
ADDON_PATH: "${ADDON_PATH}"
|
18
|
+
VOLTO_VERSION: ${VOLTO_VERSION:-16}
|
19
|
+
ports:
|
20
|
+
- "3000:3000"
|
21
|
+
- "3001:3001"
|
22
|
+
depends_on:
|
23
|
+
- backend
|
24
|
+
volumes:
|
25
|
+
- ./:/app/src/addons/${ADDON_PATH}
|
26
|
+
environment:
|
27
|
+
CI: "true"
|
28
|
+
NODE_ENV: "development"
|
29
|
+
RAZZLE_JEST_CONFIG: "src/addons/${ADDON_PATH}/jest-addon.config.js"
|
30
|
+
RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
|
31
|
+
RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
|
32
|
+
HOST: "0.0.0.0"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
msgid ""
|
2
|
+
msgstr ""
|
3
|
+
"Project-Id-Version: \n"
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
5
|
+
"POT-Creation-Date: \n"
|
6
|
+
"PO-Revision-Date: \n"
|
7
|
+
"Last-Translator: \n"
|
8
|
+
"Language: \n"
|
9
|
+
"Language-Team: \n"
|
10
|
+
"Content-Type: \n"
|
11
|
+
"Content-Transfer-Encoding: \n"
|
12
|
+
"Plural-Forms: \n"
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
msgid ""
|
2
|
+
msgstr ""
|
3
|
+
"Project-Id-Version: \n"
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
5
|
+
"POT-Creation-Date: \n"
|
6
|
+
"PO-Revision-Date: \n"
|
7
|
+
"Last-Translator: \n"
|
8
|
+
"Language: \n"
|
9
|
+
"Language-Team: \n"
|
10
|
+
"Content-Type: \n"
|
11
|
+
"Content-Transfer-Encoding: \n"
|
12
|
+
"Plural-Forms: \n"
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
msgid ""
|
2
|
+
msgstr ""
|
3
|
+
"Project-Id-Version: \n"
|
4
|
+
"Report-Msgid-Bugs-To: \n"
|
5
|
+
"POT-Creation-Date: \n"
|
6
|
+
"PO-Revision-Date: \n"
|
7
|
+
"Last-Translator: \n"
|
8
|
+
"Language: \n"
|
9
|
+
"Language-Team: \n"
|
10
|
+
"Content-Type: \n"
|
11
|
+
"Content-Transfer-Encoding: \n"
|
12
|
+
"Plural-Forms: \n"
|
13
|
+
|
14
|
+
|
package/locales/volto.pot
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
msgid ""
|
2
|
+
msgstr ""
|
3
|
+
"Project-Id-Version: Plone\n"
|
4
|
+
"POT-Creation-Date: 2023-06-28T10:48:22.678Z\n"
|
5
|
+
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
6
|
+
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
7
|
+
"MIME-Version: 1.0\n"
|
8
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
9
|
+
"Content-Transfer-Encoding: 8bit\n"
|
10
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
11
|
+
"Language-Code: en\n"
|
12
|
+
"Language-Name: English\n"
|
13
|
+
"Preferred-Encodings: utf-8\n"
|
14
|
+
"Domain: volto\n"
|
15
|
+
|
16
|
+
|
package/package.json
CHANGED
@@ -16,6 +16,34 @@ const infoSchema = {
|
|
16
16
|
required: [],
|
17
17
|
};
|
18
18
|
|
19
|
+
const RSSLink = {
|
20
|
+
title: 'RSS Link',
|
21
|
+
fieldsets: [
|
22
|
+
{
|
23
|
+
id: 'default',
|
24
|
+
title: 'Default',
|
25
|
+
fields: ['title', 'feedType', 'href'],
|
26
|
+
},
|
27
|
+
],
|
28
|
+
properties: {
|
29
|
+
title: {
|
30
|
+
title: 'Title',
|
31
|
+
},
|
32
|
+
feedType: {
|
33
|
+
title: 'Feed Type',
|
34
|
+
choices: [
|
35
|
+
['rss2', 'RSS2'],
|
36
|
+
['atom', 'ATOM'],
|
37
|
+
],
|
38
|
+
default: 'rss2',
|
39
|
+
},
|
40
|
+
href: {
|
41
|
+
title: 'URL Path',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
required: [],
|
45
|
+
};
|
46
|
+
|
19
47
|
export default {
|
20
48
|
title: 'Page header',
|
21
49
|
fieldsets: [
|
@@ -33,7 +61,7 @@ export default {
|
|
33
61
|
{
|
34
62
|
id: 'actions',
|
35
63
|
title: 'Actions',
|
36
|
-
fields: ['hideShareButton', 'hideDownloadButton'],
|
64
|
+
fields: ['hideShareButton', 'hideDownloadButton', 'rssLinks'],
|
37
65
|
},
|
38
66
|
{
|
39
67
|
id: 'copyright',
|
@@ -66,6 +94,11 @@ export default {
|
|
66
94
|
title: 'Hide download button',
|
67
95
|
type: 'boolean',
|
68
96
|
},
|
97
|
+
rssLinks: {
|
98
|
+
title: 'RSS Links',
|
99
|
+
widget: 'object_list',
|
100
|
+
schema: RSSLink,
|
101
|
+
},
|
69
102
|
info: {
|
70
103
|
title: 'Extra info',
|
71
104
|
widget: 'object_list',
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React, { useCallback, useMemo, useRef } from 'react';
|
2
|
+
import { Helmet } from '@plone/volto/helpers';
|
2
3
|
import { compose } from 'redux';
|
3
4
|
import { connect } from 'react-redux';
|
4
5
|
import { withRouter } from 'react-router';
|
@@ -41,6 +42,10 @@ const messages = defineMessages({
|
|
41
42
|
id: 'Modified',
|
42
43
|
defaultMessage: 'Modified',
|
43
44
|
},
|
45
|
+
rssFeed: {
|
46
|
+
id: 'rssFeed',
|
47
|
+
defaultMessage: 'RSS Feed',
|
48
|
+
},
|
44
49
|
});
|
45
50
|
|
46
51
|
const friendlyId = (id) => {
|
@@ -74,6 +79,7 @@ const View = (props) => {
|
|
74
79
|
copyright,
|
75
80
|
copyrightIcon,
|
76
81
|
copyrightPosition,
|
82
|
+
rssLinks,
|
77
83
|
// contentType,
|
78
84
|
} = props.data;
|
79
85
|
const copyrightPrefix =
|
@@ -165,6 +171,31 @@ const View = (props) => {
|
|
165
171
|
}}
|
166
172
|
/>
|
167
173
|
)}
|
174
|
+
{rssLinks?.map((rssLink, index) => (
|
175
|
+
<>
|
176
|
+
<Helmet
|
177
|
+
link={[
|
178
|
+
{
|
179
|
+
rel: 'alternate',
|
180
|
+
title:
|
181
|
+
rssLink.title ?? intl.formatMessage(messages.rssFeed),
|
182
|
+
href: rssLink.href,
|
183
|
+
type:
|
184
|
+
rssLink.feedType === 'atom'
|
185
|
+
? 'application/atom+xml'
|
186
|
+
: 'application/rss+xml',
|
187
|
+
},
|
188
|
+
]}
|
189
|
+
/>
|
190
|
+
<Banner.Action
|
191
|
+
icon="ri-rss-fill"
|
192
|
+
title={rssLink.title ?? intl.formatMessage(messages.rssFeed)}
|
193
|
+
className="rssfeed"
|
194
|
+
href={rssLink.href}
|
195
|
+
target="_blank"
|
196
|
+
/>
|
197
|
+
</>
|
198
|
+
))}
|
168
199
|
</>
|
169
200
|
}
|
170
201
|
>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { useSelector } from 'react-redux';
|
2
|
+
import { flattenToAppURL, Helmet } from '@plone/volto/helpers';
|
3
|
+
|
4
|
+
export default function BaseTag(props) {
|
5
|
+
const contentId = useSelector((store) => store?.content?.data?.['@id']);
|
6
|
+
const baseHref = contentId ? flattenToAppURL(contentId) : null;
|
7
|
+
|
8
|
+
return baseHref !== null ? (
|
9
|
+
<Helmet base={{ target: '_blank', href: `${baseHref}/` }} />
|
10
|
+
) : null;
|
11
|
+
}
|
@@ -4,7 +4,7 @@ import Tag from '@eeacms/volto-eea-design-system/ui/Tag/Tag';
|
|
4
4
|
|
5
5
|
export const TokenWidget = ({ value, children, className }) =>
|
6
6
|
value ? (
|
7
|
-
<
|
7
|
+
<div className={cx(className, 'token', 'widget', 'tags-content')}>
|
8
8
|
{value.map((tag) => (
|
9
9
|
<Tag
|
10
10
|
href={`https://www.eea.europa.eu/en/advanced-search?q=${tag}`}
|
@@ -13,7 +13,7 @@ export const TokenWidget = ({ value, children, className }) =>
|
|
13
13
|
{children ? children(tag) : tag}
|
14
14
|
</Tag>
|
15
15
|
))}
|
16
|
-
</
|
16
|
+
</div>
|
17
17
|
) : (
|
18
18
|
''
|
19
19
|
);
|
@@ -2,18 +2,18 @@ import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
3
3
|
import Tag from '@eeacms/volto-eea-design-system/ui/Tag/Tag';
|
4
4
|
|
5
|
-
export const
|
5
|
+
export const TopicsWidget = ({ value, children, className }) => {
|
6
6
|
return value ? (
|
7
|
-
<
|
7
|
+
<div className={cx(className, 'token', 'widget', 'tags-content')}>
|
8
8
|
{value.map((tag) => (
|
9
9
|
<Tag
|
10
|
-
href={`https://www.eea.europa.eu/en/advanced-search?filters[0][field]=topic&filters[0][values][0]=${tag.title}&filters[0][type]=any&filters[1][field]=language&filters[1][type]=any&filters[1][values][0]=en&sort-field=issued.date&sort-direction=desc`}
|
10
|
+
href={`https://www.eea.europa.eu/en/advanced-search?filters[0][field]=topic&filters[0][values][0]=${tag.title}&filters[0][type]=any&filters[1][field]=language&filters[1][type]=any&filters[1][values][0]=en&filters[2][field]=issued.date&filters[2][values][0]=Last 5 years&filters[2][type]=any&sort-field=issued.date&sort-direction=desc`}
|
11
11
|
key={tag.token}
|
12
12
|
>
|
13
13
|
{children ? children(tag.title) : tag.title}
|
14
14
|
</Tag>
|
15
15
|
))}
|
16
|
-
</
|
16
|
+
</div>
|
17
17
|
) : (
|
18
18
|
''
|
19
19
|
);
|
package/src/index.js
CHANGED
@@ -1,21 +1,27 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import installCustomTitle from '@eeacms/volto-eea-website-theme/components/manage/Blocks/Title';
|
4
|
-
import installLayoutSettingsBlock from '@eeacms/volto-eea-website-theme/components/manage/Blocks/LayoutSettings';
|
5
|
-
import { addStylingFieldsetSchemaEnhancer } from '@eeacms/volto-eea-website-theme/helpers/schema-utils';
|
1
|
+
import { Icon } from '@plone/volto/components';
|
2
|
+
import { getBlocks } from '@plone/volto/helpers';
|
6
3
|
import CustomCSS from '@eeacms/volto-eea-website-theme/components/theme/CustomCSS/CustomCSS';
|
7
|
-
import NotFound from '@eeacms/volto-eea-website-theme/components/theme/NotFound/NotFound';
|
8
4
|
import DraftBackground from '@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground';
|
5
|
+
import HomePageInverseView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageInverseView';
|
6
|
+
import HomePageView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageView';
|
7
|
+
import InpageNavigation from '@eeacms/volto-eea-design-system/ui/InpageNavigation/InpageNavigation';
|
8
|
+
import NotFound from '@eeacms/volto-eea-website-theme/components/theme/NotFound/NotFound';
|
9
|
+
import { TopicsWidget } from '@eeacms/volto-eea-website-theme/components/theme/Widgets/TopicsWidget';
|
9
10
|
import { TokenWidget } from '@eeacms/volto-eea-website-theme/components/theme/Widgets/TokenWidget';
|
10
|
-
|
11
|
+
|
12
|
+
import { addStylingFieldsetSchemaEnhancer } from '@eeacms/volto-eea-website-theme/helpers/schema-utils';
|
13
|
+
import installCustomTitle from '@eeacms/volto-eea-website-theme/components/manage/Blocks/Title';
|
14
|
+
import installLayoutSettingsBlock from '@eeacms/volto-eea-website-theme/components/manage/Blocks/LayoutSettings';
|
15
|
+
|
16
|
+
import BaseTag from './components/theme/BaseTag';
|
11
17
|
import SubsiteClass from './components/theme/SubsiteClass';
|
12
|
-
import HomePageView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageView';
|
13
|
-
import HomePageInverseView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageInverseView';
|
14
|
-
import { Icon } from '@plone/volto/components';
|
15
18
|
import contentBoxSVG from './icons/content-box.svg';
|
16
|
-
|
17
|
-
import okMiddleware from './middleware/ok';
|
19
|
+
|
18
20
|
import installSlate from './slate';
|
21
|
+
import okMiddleware from './middleware/ok';
|
22
|
+
import voltoCustomMiddleware from './middleware/voltoCustom';
|
23
|
+
|
24
|
+
import * as eea from './config';
|
19
25
|
|
20
26
|
const restrictedBlocks = [
|
21
27
|
'__grid', // Grid/Teaser block (kitconcept)
|
@@ -83,7 +89,26 @@ const applyConfig = (config) => {
|
|
83
89
|
};
|
84
90
|
// Apply accordion block customization
|
85
91
|
if (config.blocks.blocksConfig.accordion) {
|
86
|
-
config.blocks.blocksConfig.accordion.
|
92
|
+
config.blocks.blocksConfig.accordion.titleIcons = {
|
93
|
+
closed: {
|
94
|
+
leftPosition: 'ri-arrow-down-s-line',
|
95
|
+
rightPosition: 'ri-arrow-down-s-line',
|
96
|
+
},
|
97
|
+
opened: {
|
98
|
+
leftPosition: 'ri-arrow-up-s-line',
|
99
|
+
rightPosition: 'ri-arrow-up-s-line',
|
100
|
+
},
|
101
|
+
unfiltered: {
|
102
|
+
leftPosition: 'ri-filter-3-line',
|
103
|
+
rightPosition: 'ri-filter-3-line',
|
104
|
+
},
|
105
|
+
filtered: {
|
106
|
+
leftPosition: 'ri-close-line',
|
107
|
+
rightPosition: 'ri-close-line',
|
108
|
+
},
|
109
|
+
iconComponent: 'SemanticIcon',
|
110
|
+
};
|
111
|
+
|
87
112
|
config.blocks.blocksConfig.accordion.options = {};
|
88
113
|
config.blocks.blocksConfig.accordion.defaults.theme = 'secondary';
|
89
114
|
}
|
@@ -101,6 +126,26 @@ const applyConfig = (config) => {
|
|
101
126
|
// Apply columns block customization
|
102
127
|
if (config.blocks.blocksConfig.columnsBlock) {
|
103
128
|
config.blocks.blocksConfig.columnsBlock.available_colors = eea.colors;
|
129
|
+
config.blocks.blocksConfig.columnsBlock.tocEntries = (
|
130
|
+
block = {},
|
131
|
+
tocData,
|
132
|
+
) => {
|
133
|
+
// integration with volto-block-toc
|
134
|
+
const headlines = tocData.levels || ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
135
|
+
let entries = [];
|
136
|
+
const sorted_column_blocks = getBlocks(block?.data || {});
|
137
|
+
sorted_column_blocks.forEach((column_block) => {
|
138
|
+
const sorted_blocks = getBlocks(column_block[1]);
|
139
|
+
sorted_blocks.forEach((block) => {
|
140
|
+
const { value, plaintext } = block[1];
|
141
|
+
const type = value?.[0]?.type;
|
142
|
+
if (headlines.includes(type)) {
|
143
|
+
entries.push([parseInt(type.slice(1)), plaintext, block[0]]);
|
144
|
+
}
|
145
|
+
});
|
146
|
+
});
|
147
|
+
return entries;
|
148
|
+
};
|
104
149
|
}
|
105
150
|
|
106
151
|
// Description block custom CSS
|
@@ -113,7 +158,7 @@ const applyConfig = (config) => {
|
|
113
158
|
}
|
114
159
|
|
115
160
|
// Custom Widgets
|
116
|
-
config.widgets.views.id.
|
161
|
+
config.widgets.views.id.topics = TopicsWidget;
|
117
162
|
config.widgets.views.id.subjects = TokenWidget;
|
118
163
|
config.widgets.views.widget.tags = TokenWidget;
|
119
164
|
|
@@ -147,6 +192,10 @@ const applyConfig = (config) => {
|
|
147
192
|
match: '',
|
148
193
|
component: SubsiteClass,
|
149
194
|
},
|
195
|
+
{
|
196
|
+
match: '',
|
197
|
+
component: BaseTag,
|
198
|
+
},
|
150
199
|
];
|
151
200
|
|
152
201
|
config = installSlate(config);
|
@@ -227,6 +276,27 @@ const applyConfig = (config) => {
|
|
227
276
|
},
|
228
277
|
];
|
229
278
|
|
279
|
+
// mega menu layout settings
|
280
|
+
config.settings.menuItemsLayouts = {
|
281
|
+
'/en/topics': {
|
282
|
+
menuItemChildrenListColumns: [1, 4],
|
283
|
+
menuItemColumns: [
|
284
|
+
'at-a-glance three wide column',
|
285
|
+
'topics-right-column nine wide column',
|
286
|
+
],
|
287
|
+
hideChildrenFromNavigation: false,
|
288
|
+
},
|
289
|
+
'/en/countries': {
|
290
|
+
menuItemColumns: ['eight wide column', 'four wide column'],
|
291
|
+
menuItemChildrenListColumns: [5, 2],
|
292
|
+
appendExtraMenuItemsToLastColumn: true,
|
293
|
+
hideChildrenFromNavigation: false,
|
294
|
+
},
|
295
|
+
'/en/about': {
|
296
|
+
hideChildrenFromNavigation: false,
|
297
|
+
},
|
298
|
+
};
|
299
|
+
|
230
300
|
// layout settings
|
231
301
|
config = [installLayoutSettingsBlock].reduce(
|
232
302
|
(acc, apply) => apply(acc),
|
package/.i18n.babel.config.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require('@plone/volto/babel');
|