@eeacms/volto-cca-policy 0.1.8 → 0.1.9

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 CHANGED
@@ -4,6 +4,17 @@ 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
+ ### [0.1.9](https://github.com/eea/volto-cca-policy/compare/0.1.8...0.1.9) - 20 March 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Set all paths not contaning /en/mission as external routes. (Disabled in development mode to prevent infinite redirect.) [GhitaB - [`42c76ae`](https://github.com/eea/volto-cca-policy/commit/42c76ae36687077c33f87c752310ad170b0a639e)]
12
+ - Remove unused import [kreafox - [`32229f6`](https://github.com/eea/volto-cca-policy/commit/32229f671fa11260da4441aab625c4b731c03744)]
13
+ - Fix eslint [kreafox - [`dc023e7`](https://github.com/eea/volto-cca-policy/commit/dc023e76b660ad6fd4880287df2a03c82284e6cf)]
14
+ - Use latest eea-design-system [kreafox - [`460a28b`](https://github.com/eea/volto-cca-policy/commit/460a28b99d7aa17d1eab27052772841e08ba44fe)]
15
+ - Better logo [kreafox - [`5dda132`](https://github.com/eea/volto-cca-policy/commit/5dda132268f5943e3fbfcf0689088afbc9a85d25)]
16
+ - Update footer [kreafox - [`680f29a`](https://github.com/eea/volto-cca-policy/commit/680f29acf1458ea238df114ad464c3d0025cd707)]
17
+ - Add override for volto-banner [Tiberiu Ichim - [`16d921a`](https://github.com/eea/volto-cca-policy/commit/16d921a65948c1c5adda6a5e16e18b5ccf262fdc)]
7
18
  ### [0.1.8](https://github.com/eea/volto-cca-policy/compare/0.1.7...0.1.8) - 16 March 2023
8
19
 
9
20
  #### :hammer_and_wrench: Others
@@ -268,7 +279,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
268
279
  #### :hammer_and_wrench: Others
269
280
 
270
281
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
271
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
272
282
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
273
283
 
274
284
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -21,7 +21,7 @@
21
21
  "@eeacms/volto-eea-design-system"
22
22
  ],
23
23
  "dependencies": {
24
- "@eeacms/volto-eea-design-system": "1.0.0-beta.4",
24
+ "@eeacms/volto-eea-design-system": "*",
25
25
  "@eeacms/volto-openlayers-map": "*"
26
26
  },
27
27
  "devDependencies": {
@@ -0,0 +1,3 @@
1
+ export default function dummyConfig(config) {
2
+ return config;
3
+ }
@@ -7,7 +7,7 @@ import React from 'react';
7
7
  import { Dropdown, Image } from 'semantic-ui-react';
8
8
  import { connect, useDispatch, useSelector } from 'react-redux';
9
9
 
10
- import { withRouter, Link } from 'react-router-dom';
10
+ import { withRouter } from 'react-router-dom';
11
11
  import { UniversalLink } from '@plone/volto/components';
12
12
  import {
13
13
  getBaseUrl,
@@ -204,7 +204,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
204
204
  transparency={isHomePageInverse ? true : false}
205
205
  logo={
206
206
  <div {...(isSubsite ? { className: 'logo-wrapper' } : {})}>
207
- {!!subsite && subsite.title && (
207
+ {!!subsite && subsite.title ? (
208
208
  <>
209
209
  {subsite.subsite_logo ? (
210
210
  <Logo
@@ -216,14 +216,23 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
216
216
  ) : (
217
217
  subsite.title
218
218
  )}
219
+ <div className="subsite-logo">
220
+ <Logo
221
+ src={isHomePageInverse ? logoWhite : logo}
222
+ title={eea.websiteTitle}
223
+ alt={eea.organisationName}
224
+ url={eea.logoTargetUrl}
225
+ />
226
+ </div>
219
227
  </>
220
- )}
221
- <Link to={eea.logoTargetUrl} className="subsite-logo">
222
- <Image
228
+ ) : (
229
+ <Logo
223
230
  src={isHomePageInverse ? logoWhite : logo}
224
- alt={eea.websiteTitle}
231
+ title={eea.websiteTitle}
232
+ alt={eea.organisationName}
233
+ url={eea.logoTargetUrl}
225
234
  />
226
- </Link>
235
+ )}
227
236
  </div>
228
237
  }
229
238
  menuItems={items}
package/src/index.js CHANGED
@@ -17,6 +17,20 @@ import europeanComissionLogo from '@eeacms/volto-cca-policy/../theme//assets/ima
17
17
  import installBlocks from './components/manage/Blocks';
18
18
 
19
19
  const applyConfig = (config) => {
20
+ const notInEnMission = /^(?!(\/en\/mission)).*$/;
21
+ if (!__DEVELOPMENT__) {
22
+ config.settings.externalRoutes = [
23
+ ...(config.settings.externalRoutes || []),
24
+ {
25
+ match: {
26
+ path: notInEnMission,
27
+ exact: false,
28
+ strict: false,
29
+ },
30
+ },
31
+ ];
32
+ }
33
+
20
34
  config.settings.dateLocale = 'en-gb';
21
35
  config.settings.isMultilingual = true;
22
36
  config.settings.defaultLanguage =
@@ -62,17 +76,23 @@ const applyConfig = (config) => {
62
76
  },
63
77
  ],
64
78
  social: [],
79
+ actions: [
80
+ {
81
+ link: '/en/mission/login',
82
+ title: 'CMS Login',
83
+ },
84
+ ],
65
85
  contacts: [
66
86
  {
67
87
  icon: 'comment outline',
68
88
  text: 'About us',
69
- link: '/about',
89
+ link: '/en/mission/about-us',
70
90
  children: [],
71
91
  },
72
92
  {
73
93
  icon: 'comment outline',
74
94
  text: 'Contact us',
75
- link: '/contact-us',
95
+ link: '/en/mission/contact-us',
76
96
  },
77
97
  // {
78
98
  // icon: 'envelope outline',
@@ -145,10 +165,6 @@ const applyConfig = (config) => {
145
165
  config = installExpressMiddleware(config);
146
166
  }
147
167
 
148
- config.settings.eea.footerOpts.actions = [
149
- { link: '/en/mission/login', title: 'CMS Login' },
150
- ];
151
-
152
168
  return installBlocks(config);
153
169
  };
154
170
 
@@ -93,10 +93,6 @@ body.subsite-mkh {
93
93
  max-width: 252px;
94
94
  }
95
95
 
96
- .eea.header .subsite-logo {
97
- left: 280px;
98
- }
99
-
100
96
  .subfooter .footer-description {
101
97
  margin-top: 3em;
102
98
  margin-bottom: 1em;
@@ -138,8 +134,15 @@ body.subsite-mkh {
138
134
  }
139
135
 
140
136
  .eea.header .subsite-logo {
141
- .ui.image {
142
- max-height: 60px;
137
+ height: 100%;
138
+
139
+ .logo {
140
+ display: inline-block;
141
+ height: 100%;
142
+
143
+ img {
144
+ max-width: 320px;
145
+ }
143
146
  }
144
147
 
145
148
  &:before {
@@ -157,3 +160,9 @@ body.subsite-mkh {
157
160
  background: @subsiteBackgroundGradient;
158
161
  }
159
162
  }
163
+
164
+ @media only screen and (min-width: @largestSmallMonitor) {
165
+ .eea.header .subsite-logo {
166
+ left: 280px !important;
167
+ }
168
+ }