@eeacms/volto-bise-policy 1.0.7 → 1.0.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.
- package/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/Navigation/View.jsx +3 -2
- package/src/components/manage/Blocks/Redirect/Edit.jsx +2 -1
- package/src/components/manage/Blocks/Redirect/View.jsx +2 -2
- package/src/components/manage/Blocks/index.js +0 -2
- package/src/customizations/volto/components/theme/Header/Header.jsx +112 -57
- package/src/helpers.js +19 -0
- package/src/index.js +11 -3
- package/theme/extras/header.overrides +0 -4
- package/theme/globals/natura2000.less +91 -0
- package/theme/globals/site.overrides +6 -6
- package/theme/modules/sticky.overrides +7 -0
- package/src/components/manage/Blocks/NewsletterSignup/Edit.jsx +0 -30
- package/src/components/manage/Blocks/NewsletterSignup/View.jsx +0 -13
- package/src/components/manage/Blocks/NewsletterSignup/index.js +0 -49
- package/src/components/manage/Blocks/NewsletterSignup/schema.js +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ 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.0.8](https://github.com/eea/volto-bise-policy/compare/1.0.7...1.0.8) - 29 May 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- update [Miu Razvan - [`baf4a08`](https://github.com/eea/volto-bise-policy/commit/baf4a082ddb5841cf3380cc30ff94b77ed9e168f)]
|
|
12
|
+
- update [Miu Razvan - [`c75abcb`](https://github.com/eea/volto-bise-policy/commit/c75abcb25b1f0984567ec6e9afc0d61820edb32d)]
|
|
13
|
+
- clean up [Miu Razvan - [`0fcd494`](https://github.com/eea/volto-bise-policy/commit/0fcd494a87c2c3cdf519e16ffa6c43403dbe8315)]
|
|
14
|
+
- fix z-index on navigation menu [Miu Razvan - [`5fbd3fd`](https://github.com/eea/volto-bise-policy/commit/5fbd3fdb2c0705ec15d7968651900f9f7bba9f6f)]
|
|
15
|
+
- update for url widget [tedw87 - [`78df6cb`](https://github.com/eea/volto-bise-policy/commit/78df6cb7f944ce718c0bf89b97a462ccc1d1dcb7)]
|
|
16
|
+
- fix import [tedw87 - [`7bb66ba`](https://github.com/eea/volto-bise-policy/commit/7bb66badc31b872532e3a528af2cd496b4455344)]
|
|
17
|
+
- update [tedw87 - [`3d502b1`](https://github.com/eea/volto-bise-policy/commit/3d502b1054d03e1bf5114eaa08c7c064c52474d0)]
|
|
18
|
+
- fix prettier [tedw87 - [`2632d29`](https://github.com/eea/volto-bise-policy/commit/2632d294b4859da014635c72ffcc231fc4b09287)]
|
|
19
|
+
- update with getFieldUrl function [tedw87 - [`bea0cf1`](https://github.com/eea/volto-bise-policy/commit/bea0cf1572496ef159d5b12c59b1c20cb9948ee7)]
|
|
7
20
|
### [1.0.7](https://github.com/eea/volto-bise-policy/compare/1.0.6...1.0.7) - 23 May 2023
|
|
8
21
|
|
|
9
22
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
|
|
|
3
3
|
import { Menu } from 'semantic-ui-react';
|
|
4
4
|
import { UniversalLink } from '@plone/volto/components';
|
|
5
5
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
6
|
+
import { getFieldURL } from '@eeacms/volto-bise-policy/helpers';
|
|
6
7
|
|
|
7
8
|
import './styles.less';
|
|
8
9
|
|
|
@@ -13,9 +14,9 @@ const View = ({ history, data, navigation, ...props }) => {
|
|
|
13
14
|
const items = useMemo(() => {
|
|
14
15
|
return [
|
|
15
16
|
...(navigation.filter(
|
|
16
|
-
(item) => flattenToAppURL(item.url) ===
|
|
17
|
+
(item) => flattenToAppURL(item.url) === getFieldURL(data.parent),
|
|
17
18
|
)[0]?.items || []),
|
|
18
|
-
...pages,
|
|
19
|
+
...pages.map((page) => ({ ...page, url: getFieldURL(page.url) })),
|
|
19
20
|
];
|
|
20
21
|
}, [navigation, pages, data.parent]);
|
|
21
22
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
|
|
3
3
|
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
4
|
+
import { getFieldURL } from '@eeacms/volto-bise-policy/helpers';
|
|
4
5
|
import schema from './schema';
|
|
5
6
|
|
|
6
7
|
const Edit = (props) => {
|
|
7
8
|
return (
|
|
8
9
|
<>
|
|
9
|
-
{props.data.url && <p>Redirect to {props.data.url}</p>}
|
|
10
|
+
{props.data.url && <p>Redirect to {getFieldURL(props.data.url)}</p>}
|
|
10
11
|
{!props.data.url && <p>Select redirect target</p>}
|
|
11
12
|
|
|
12
13
|
<SidebarPortal selected={props.selected}>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getFieldURL } from '@eeacms/volto-bise-policy/helpers';
|
|
3
3
|
|
|
4
4
|
const View = (props) => {
|
|
5
5
|
useEffect(() => {
|
|
6
|
-
props.history.push(
|
|
6
|
+
props.history.push(getFieldURL(props.data.url));
|
|
7
7
|
/* eslint-disable-next-line */
|
|
8
8
|
}, []);
|
|
9
9
|
|
|
@@ -4,7 +4,6 @@ import installFactsheetsListing from './FactsheetsListing';
|
|
|
4
4
|
import installKeyFacts from './KeyFacts';
|
|
5
5
|
import installMaesViewer from './MaesViewer';
|
|
6
6
|
import installNavigation from './Navigation';
|
|
7
|
-
import installNewsletter from './NewsletterSignup';
|
|
8
7
|
|
|
9
8
|
export default (config) => {
|
|
10
9
|
return [
|
|
@@ -14,6 +13,5 @@ export default (config) => {
|
|
|
14
13
|
installKeyFacts,
|
|
15
14
|
installMaesViewer,
|
|
16
15
|
installNavigation,
|
|
17
|
-
installNewsletter,
|
|
18
16
|
].reduce((acc, apply) => apply(acc), config);
|
|
19
17
|
};
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
7
|
-
import { Dropdown, Image, Sticky } from 'semantic-ui-react';
|
|
7
|
+
import { Container, Dropdown, Grid, Image, Sticky } from 'semantic-ui-react';
|
|
8
8
|
import { connect, useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import Cookies from 'universal-cookie';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { matchPath } from 'react-router';
|
|
12
|
+
import { withRouter, useParams } from 'react-router-dom';
|
|
12
13
|
import { UniversalLink } from '@plone/volto/components';
|
|
13
14
|
import {
|
|
14
15
|
getBaseUrl,
|
|
@@ -51,6 +52,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
51
52
|
const dispatch = useDispatch();
|
|
52
53
|
const [language, setLanguage] = useState(getLanguage());
|
|
53
54
|
const previousToken = usePrevious(token);
|
|
55
|
+
const params = useParams();
|
|
54
56
|
const { items } = props;
|
|
55
57
|
const { eea } = config.settings;
|
|
56
58
|
const { headerOpts, headerSearchBox } = eea || {};
|
|
@@ -58,10 +60,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
58
60
|
|
|
59
61
|
const width = useSelector((state) => state.screen?.width);
|
|
60
62
|
|
|
61
|
-
const
|
|
62
|
-
(state) => removeTrailingSlash(state.router?.location?.pathname) || '',
|
|
63
|
-
);
|
|
64
|
-
let pathname = router_pathname;
|
|
63
|
+
const pathname = removeTrailingSlash(props.pathname);
|
|
65
64
|
|
|
66
65
|
const content_pathname = useMemo(
|
|
67
66
|
() => flattenToAppURL(content.data?.['@id']),
|
|
@@ -70,9 +69,26 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
70
69
|
|
|
71
70
|
const isSubsite = subsite?.['@type'] === 'Subsite';
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
pathname
|
|
75
|
-
|
|
72
|
+
const isN2KSite = useMemo(() => {
|
|
73
|
+
return !!matchPath(pathname, {
|
|
74
|
+
path: ['/natura2000/sites/site', '/natura2000/sites/site_cdda'],
|
|
75
|
+
exact: false,
|
|
76
|
+
});
|
|
77
|
+
}, [pathname]);
|
|
78
|
+
|
|
79
|
+
const isN2KSpecies = useMemo(() => {
|
|
80
|
+
return !!matchPath(pathname, {
|
|
81
|
+
path: '/natura2000/species/species',
|
|
82
|
+
exact: false,
|
|
83
|
+
});
|
|
84
|
+
}, [pathname]);
|
|
85
|
+
|
|
86
|
+
const isN2KHabitat = useMemo(() => {
|
|
87
|
+
return !!matchPath(pathname, {
|
|
88
|
+
path: '/natura2000/habitats/habitat',
|
|
89
|
+
exact: false,
|
|
90
|
+
});
|
|
91
|
+
}, [pathname]);
|
|
76
92
|
|
|
77
93
|
const isHomePageInverse =
|
|
78
94
|
content_pathname === '' && ['', '/'].includes(pathname);
|
|
@@ -124,6 +140,10 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
124
140
|
return (
|
|
125
141
|
<Header menuItems={items}>
|
|
126
142
|
{isHomePageInverse && <BodyClass className="homepage homepage-inverse" />}
|
|
143
|
+
{isSubsite && !subsite.isRoot && !isN2KSpecies && !isN2KHabitat && (
|
|
144
|
+
<BodyClass className="with-n2k-navigation" />
|
|
145
|
+
)}
|
|
146
|
+
|
|
127
147
|
<Header.TopHeader>
|
|
128
148
|
<Header.TopItem className="official-union">
|
|
129
149
|
<Image src={eeaFlag} alt="eea flag"></Image>
|
|
@@ -194,7 +214,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
194
214
|
</Header.TopItem>
|
|
195
215
|
)}
|
|
196
216
|
|
|
197
|
-
{isMultilingual && (
|
|
217
|
+
{isMultilingual && !isN2KSite && !isN2KSpecies && !isN2KHabitat && (
|
|
198
218
|
<Header.TopItem>
|
|
199
219
|
<Header.TopDropdownMenu
|
|
200
220
|
id="language-switcher"
|
|
@@ -235,7 +255,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
235
255
|
'g',
|
|
236
256
|
);
|
|
237
257
|
const matches = [
|
|
238
|
-
...
|
|
258
|
+
...pathname.matchAll(multilingualSubsiteRe),
|
|
239
259
|
][0];
|
|
240
260
|
if (matches && matches[2] !== `/${item.code}/`) {
|
|
241
261
|
changeLanguage(item.code);
|
|
@@ -260,52 +280,87 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
260
280
|
active={isSubsite && subsite['@id'] === '/natura2000'}
|
|
261
281
|
context={__CLIENT__ && document.querySelector('.content-area')}
|
|
262
282
|
>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
e
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
283
|
+
{!isN2KSite ? (
|
|
284
|
+
<Header.Main
|
|
285
|
+
pathname={pathname}
|
|
286
|
+
headerSearchBox={headerSearchBox}
|
|
287
|
+
inverted={isHomePageInverse ? true : false}
|
|
288
|
+
transparency={isHomePageInverse ? true : false}
|
|
289
|
+
hideSearch={isSubsite}
|
|
290
|
+
logo={
|
|
291
|
+
<Logo
|
|
292
|
+
src={isHomePageInverse ? logoWhite : logo}
|
|
293
|
+
title={eea.websiteTitle}
|
|
294
|
+
alt={eea.organisationName}
|
|
295
|
+
url={eea.logoTargetUrl}
|
|
296
|
+
/>
|
|
297
|
+
}
|
|
298
|
+
menuItems={
|
|
299
|
+
isSubsite && !subsite.isRoot && !isN2KSpecies && !isN2KHabitat
|
|
300
|
+
? getSubsiteItems()
|
|
301
|
+
: items.filter((item) => item.url !== '/natura2000')
|
|
302
|
+
}
|
|
303
|
+
renderGlobalMenuItem={(item, { onClick }) => (
|
|
304
|
+
<a
|
|
305
|
+
href={item.url || '/'}
|
|
306
|
+
title={item.title}
|
|
307
|
+
onClick={(e) => {
|
|
308
|
+
e.preventDefault();
|
|
309
|
+
onClick(e, item);
|
|
310
|
+
}}
|
|
311
|
+
>
|
|
312
|
+
{item.title}
|
|
313
|
+
</a>
|
|
314
|
+
)}
|
|
315
|
+
renderMenuItem={(item, options, props) => (
|
|
316
|
+
<UniversalLink
|
|
317
|
+
href={item.url || '/'}
|
|
318
|
+
title={item.nav_title || item.title}
|
|
319
|
+
{...(options || {})}
|
|
320
|
+
className={cx(options?.className, {
|
|
321
|
+
active: item.url === pathname,
|
|
322
|
+
})}
|
|
323
|
+
>
|
|
324
|
+
{props?.iconPosition !== 'right' && props?.children}
|
|
325
|
+
<span>{item.nav_title || item.title}</span>
|
|
326
|
+
{props?.iconPosition === 'right' && props?.children}
|
|
327
|
+
</UniversalLink>
|
|
328
|
+
)}
|
|
329
|
+
/>
|
|
330
|
+
) : (
|
|
331
|
+
<div className="main bar transparency n2k-site">
|
|
332
|
+
<Container>
|
|
333
|
+
<Grid>
|
|
334
|
+
<Grid.Column>
|
|
335
|
+
<button
|
|
336
|
+
title="At a glance"
|
|
337
|
+
className="item firstLevel at-glance"
|
|
338
|
+
onClick={() => {
|
|
339
|
+
window.scrollTo({
|
|
340
|
+
top: document.body.scrollHeight,
|
|
341
|
+
behavior: 'smooth',
|
|
342
|
+
});
|
|
343
|
+
}}
|
|
344
|
+
>
|
|
345
|
+
AT A GLANCE
|
|
346
|
+
</button>
|
|
347
|
+
<UniversalLink
|
|
348
|
+
href={
|
|
349
|
+
params.site_code
|
|
350
|
+
? `https://natura2000.eea.europa.eu/Natura2000/SDF.aspx?site=${params.site_code}`
|
|
351
|
+
: '#'
|
|
352
|
+
}
|
|
353
|
+
openLinkInNewTab={true}
|
|
354
|
+
title="Go to expert view"
|
|
355
|
+
className="item firstLevel deep-dive"
|
|
356
|
+
>
|
|
357
|
+
GO TO EXPERT VIEW
|
|
358
|
+
</UniversalLink>
|
|
359
|
+
</Grid.Column>
|
|
360
|
+
</Grid>
|
|
361
|
+
</Container>
|
|
362
|
+
</div>
|
|
363
|
+
)}
|
|
309
364
|
</Sticky>
|
|
310
365
|
</Header>
|
|
311
366
|
);
|
package/src/helpers.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import isArray from 'lodash/isArray';
|
|
2
|
+
import isObject from 'lodash/isObject';
|
|
3
|
+
import isString from 'lodash/isString';
|
|
4
|
+
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
5
|
+
|
|
6
|
+
export const getFieldURL = (data) => {
|
|
7
|
+
let url = data;
|
|
8
|
+
const _isObject = data && isObject(data) && !isArray(data);
|
|
9
|
+
if (_isObject && data['@type'] === 'URL') {
|
|
10
|
+
url = data['value'] ?? data['url'] ?? data['href'] ?? data;
|
|
11
|
+
} else if (_isObject) {
|
|
12
|
+
url = data['@id'] ?? data['url'] ?? data['href'] ?? data;
|
|
13
|
+
}
|
|
14
|
+
if (isArray(data)) {
|
|
15
|
+
url = data.map((item) => getFieldURL(item));
|
|
16
|
+
}
|
|
17
|
+
if (isString(url) && isInternalURL(url)) return flattenToAppURL(url);
|
|
18
|
+
return url;
|
|
19
|
+
};
|
package/src/index.js
CHANGED
|
@@ -123,11 +123,19 @@ const applyConfig = (config) => {
|
|
|
123
123
|
// Plotly bise color
|
|
124
124
|
config.settings.plotlyCustomColors = [
|
|
125
125
|
{
|
|
126
|
-
title: '
|
|
127
|
-
colorscale: [
|
|
126
|
+
title: 'A2',
|
|
127
|
+
colorscale: [
|
|
128
|
+
'#3D2201',
|
|
129
|
+
'#603808',
|
|
130
|
+
'#8B5E34',
|
|
131
|
+
'#BC8A5F',
|
|
132
|
+
'#E7BC91',
|
|
133
|
+
'#FFEDD8',
|
|
134
|
+
'#FFF6EC',
|
|
135
|
+
],
|
|
128
136
|
},
|
|
129
137
|
{
|
|
130
|
-
title: '',
|
|
138
|
+
title: 'A1',
|
|
131
139
|
colorscale: ['#12957D', '#F9EA8A', '#DD552B', '#AEB0B3'],
|
|
132
140
|
},
|
|
133
141
|
];
|
|
@@ -50,4 +50,95 @@
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.eea.header .main.bar.n2k-site {
|
|
56
|
+
.ui.grid {
|
|
57
|
+
height: 100%;
|
|
58
|
+
|
|
59
|
+
.column {
|
|
60
|
+
justify-content: center;
|
|
61
|
+
|
|
62
|
+
> * {
|
|
63
|
+
flex: unset !important;
|
|
64
|
+
|
|
65
|
+
&:not(:last-child) {
|
|
66
|
+
margin-right: 1rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.at-glance {
|
|
74
|
+
height: 100%;
|
|
75
|
+
padding: 0 2rem;
|
|
76
|
+
background: #00a390 0% 0% no-repeat padding-box;
|
|
77
|
+
border: none;
|
|
78
|
+
color: #fff !important;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
color: #fff !important;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.deep-dive {
|
|
87
|
+
font-weight: bold;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.with-n2k-navigation {
|
|
91
|
+
.eea.header {
|
|
92
|
+
.main.bar .ui.grid {
|
|
93
|
+
> :first-child {
|
|
94
|
+
width: 200px !important;
|
|
95
|
+
|
|
96
|
+
img {
|
|
97
|
+
object-fit: fill;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
> :last-child {
|
|
102
|
+
width: calc(100% - 200px) !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media @smallMonitorUp {
|
|
106
|
+
.main-menu {
|
|
107
|
+
justify-content: center;
|
|
108
|
+
|
|
109
|
+
ul {
|
|
110
|
+
padding-inline-start: 0;
|
|
111
|
+
justify-content: center !important;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
.tabs-block {
|
|
122
|
+
.columns-header {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.tabs-block.carousel_n2k {
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
|
|
130
|
+
.slick-arrows {
|
|
131
|
+
.learn-more {
|
|
132
|
+
position: absolute;
|
|
133
|
+
left: 0;
|
|
134
|
+
width: 130px;
|
|
135
|
+
color: #fff !important;
|
|
136
|
+
text-align: left;
|
|
137
|
+
transform: translate(-100%, 0);
|
|
138
|
+
|
|
139
|
+
@media only screen and (max-width: 1700px) {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
53
144
|
}
|
|
@@ -255,9 +255,9 @@ p.has--clear--both:empty {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
.ui.overlay.sidebar {
|
|
259
|
-
|
|
260
|
-
}
|
|
258
|
+
// .ui.overlay.sidebar {
|
|
259
|
+
// z-index: 800;
|
|
260
|
+
// }
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
.subsite.subsite-natura2000:not(.subsite-root) {
|
|
@@ -266,9 +266,9 @@ p.has--clear--both:empty {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
#toolbar {
|
|
270
|
-
|
|
271
|
-
}
|
|
269
|
+
// #toolbar {
|
|
270
|
+
// z-index: 6;
|
|
271
|
+
// }
|
|
272
272
|
|
|
273
273
|
.simple-data-table {
|
|
274
274
|
padding: 0;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BlockDataForm, SidebarPortal } from '@plone/volto/components';
|
|
3
|
-
import View from './View';
|
|
4
|
-
|
|
5
|
-
import schema from './schema';
|
|
6
|
-
|
|
7
|
-
const Edit = (props) => {
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<View {...props} mode="edit" />
|
|
11
|
-
<SidebarPortal selected={props.selected}>
|
|
12
|
-
<BlockDataForm
|
|
13
|
-
schema={schema}
|
|
14
|
-
title={schema.title}
|
|
15
|
-
onChangeField={(id, value) => {
|
|
16
|
-
props.onChangeBlock(props.block, {
|
|
17
|
-
...props.data,
|
|
18
|
-
[id]: value,
|
|
19
|
-
});
|
|
20
|
-
}}
|
|
21
|
-
onChangeBlock={props.onChangeBlock}
|
|
22
|
-
formData={props.data}
|
|
23
|
-
block={props.block}
|
|
24
|
-
/>
|
|
25
|
-
</SidebarPortal>
|
|
26
|
-
</>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default Edit;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import imageSVG from '@plone/volto/icons/image.svg';
|
|
2
|
-
import NavigationBlockView from './View';
|
|
3
|
-
import NavigationBlockEdit from './Edit';
|
|
4
|
-
|
|
5
|
-
export default (config) => {
|
|
6
|
-
config.blocks.blocksConfig.newsletterSignup = {
|
|
7
|
-
id: 'newsletterSignup',
|
|
8
|
-
title: 'Newsletter signup',
|
|
9
|
-
icon: imageSVG,
|
|
10
|
-
group: 'common',
|
|
11
|
-
view: NavigationBlockView,
|
|
12
|
-
edit: NavigationBlockEdit,
|
|
13
|
-
restricted: false,
|
|
14
|
-
mostUsed: false,
|
|
15
|
-
variations: [
|
|
16
|
-
{
|
|
17
|
-
id: 'default',
|
|
18
|
-
title: 'Default',
|
|
19
|
-
isDefault: true,
|
|
20
|
-
render: (props) => {
|
|
21
|
-
const { hasImage, imgSrc } = props.data;
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<>
|
|
25
|
-
View mode
|
|
26
|
-
{hasImage && imgSrc && (
|
|
27
|
-
<img src={`${props.data.imgSrc}/@@images/image`} alt="asda" />
|
|
28
|
-
)}
|
|
29
|
-
</>
|
|
30
|
-
);
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'enisa_newsletter',
|
|
35
|
-
title: 'Enisa newsletter',
|
|
36
|
-
render: () => 'is enisa newsletter',
|
|
37
|
-
schemaEnhancer: ({ schema, formData, intl }) => {
|
|
38
|
-
return schema;
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
sidebarTab: 1,
|
|
43
|
-
security: {
|
|
44
|
-
addPermission: [],
|
|
45
|
-
view: [],
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
return config;
|
|
49
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Newsletter signup',
|
|
3
|
-
|
|
4
|
-
fieldsets: [
|
|
5
|
-
{
|
|
6
|
-
id: 'default',
|
|
7
|
-
title: 'Default',
|
|
8
|
-
fields: ['hasImage', 'imgSrc'],
|
|
9
|
-
},
|
|
10
|
-
],
|
|
11
|
-
|
|
12
|
-
properties: {
|
|
13
|
-
hasImage: {
|
|
14
|
-
title: 'Has image',
|
|
15
|
-
type: 'boolean',
|
|
16
|
-
default: true,
|
|
17
|
-
},
|
|
18
|
-
imgSrc: {
|
|
19
|
-
title: 'Image',
|
|
20
|
-
widget: 'attachedimage',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
required: [],
|
|
25
|
-
};
|