@eeacms/volto-bise-policy 1.0.0 → 1.0.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 +15 -2
- package/package.json +3 -1
- package/src/components/manage/Blocks/NewsletterSignup/Edit.jsx +30 -0
- package/src/components/manage/Blocks/NewsletterSignup/View.jsx +13 -0
- package/src/components/manage/Blocks/NewsletterSignup/index.js +49 -0
- package/src/components/manage/Blocks/NewsletterSignup/schema.js +25 -0
- package/src/components/manage/Blocks/index.js +2 -0
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +354 -0
- package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/SubsiteClass.jsx +70 -0
- package/src/customizations/volto/components/manage/Edit/Edit.jsx +519 -0
- package/src/customizations/volto/components/manage/Form/BlockDataForm.jsx +28 -0
- package/src/customizations/volto/components/manage/Form/BlocksToolbar.jsx +214 -0
- package/src/customizations/volto/components/manage/Form/Field.jsx +269 -0
- package/src/customizations/volto/components/manage/Form/Form.jsx +804 -0
- package/src/customizations/volto/components/theme/Header/Header.jsx +151 -131
- package/src/index.js +31 -5
- package/theme/collections/message.overrides +10 -0
- package/theme/elements/container.overrides +156 -0
- package/theme/elements/segment.variables +1 -0
- package/theme/extras/header.overrides +107 -13
- package/theme/extras/header.variables +12 -0
- package/theme/extras/keyfacts.less +3 -3
- package/theme/extras/pluggables.less +17 -16
- package/theme/fonts/OpenSans-Bold.ttf +0 -0
- package/theme/fonts/OpenSans-Regular.ttf +0 -0
- package/theme/fonts/OpenSans-Semibold.ttf +0 -0
- package/theme/fonts/Rajdhani-Bold.ttf +0 -0
- package/theme/fonts/Rajdhani-Regular.ttf +0 -0
- package/theme/globals/helpers.less +75 -0
- package/theme/globals/natura2000.less +53 -0
- package/theme/globals/site.overrides +204 -4
- package/theme/globals/site.variables +5 -0
- package/theme/modules/accordion.overrides +3 -0
- package/theme/modules/accordion.variables +7 -0
- package/theme/modules/tab.overrides +176 -0
- package/theme/theme.config +1 -0
- package/theme/views/card.variables +2 -0
- package/locales/bg/LC_MESSAGES/volto.po +0 -14
- package/locales/bg.json +0 -1
- package/locales/bs/LC_MESSAGES/volto.po +0 -14
- package/locales/bs.json +0 -1
- package/locales/cs/LC_MESSAGES/volto.po +0 -14
- package/locales/cs.json +0 -1
- package/locales/da/LC_MESSAGES/volto.po +0 -14
- package/locales/da.json +0 -1
- package/locales/de/LC_MESSAGES/volto.po +0 -29
- package/locales/de.json +0 -1
- package/locales/el/LC_MESSAGES/volto.po +0 -14
- package/locales/el.json +0 -1
- package/locales/en/LC_MESSAGES/volto.po +0 -14
- package/locales/en.json +0 -1
- package/locales/es/LC_MESSAGES/volto.po +0 -24
- package/locales/es.json +0 -1
- package/locales/et/LC_MESSAGES/volto.po +0 -14
- package/locales/et.json +0 -1
- package/locales/eu/LC_MESSAGES/volto.po +0 -19
- package/locales/eu.json +0 -1
- package/locales/fi/LC_MESSAGES/volto.po +0 -14
- package/locales/fi.json +0 -1
- package/locales/fr/LC_MESSAGES/volto.po +0 -29
- package/locales/fr.json +0 -1
- package/locales/ga/LC_MESSAGES/volto.po +0 -14
- package/locales/ga.json +0 -1
- package/locales/hr/LC_MESSAGES/volto.po +0 -14
- package/locales/hr.json +0 -1
- package/locales/hu/LC_MESSAGES/volto.po +0 -14
- package/locales/hu.json +0 -1
- package/locales/is/LC_MESSAGES/volto.po +0 -14
- package/locales/is.json +0 -1
- package/locales/it/LC_MESSAGES/volto.po +0 -14
- package/locales/it.json +0 -1
- package/locales/ja/LC_MESSAGES/volto.po +0 -21
- package/locales/ja.json +0 -1
- package/locales/lt/LC_MESSAGES/volto.po +0 -14
- package/locales/lt.json +0 -1
- package/locales/lv/LC_MESSAGES/volto.po +0 -14
- package/locales/lv.json +0 -1
- package/locales/mk/LC_MESSAGES/volto.po +0 -14
- package/locales/mk.json +0 -1
- package/locales/mt/LC_MESSAGES/volto.po +0 -14
- package/locales/mt.json +0 -1
- package/locales/nl/LC_MESSAGES/volto.po +0 -33
- package/locales/nl.json +0 -1
- package/locales/no/LC_MESSAGES/volto.po +0 -14
- package/locales/no.json +0 -1
- package/locales/pl/LC_MESSAGES/volto.po +0 -14
- package/locales/pl.json +0 -1
- package/locales/pt/LC_MESSAGES/volto.po +0 -22
- package/locales/pt.json +0 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +0 -20
- package/locales/pt_BR.json +0 -1
- package/locales/ro/LC_MESSAGES/volto.po +0 -20
- package/locales/ro.json +0 -1
- package/locales/sh/LC_MESSAGES/volto.po +0 -14
- package/locales/sh.json +0 -1
- package/locales/sk/LC_MESSAGES/volto.po +0 -14
- package/locales/sk.json +0 -1
- package/locales/sl/LC_MESSAGES/volto.po +0 -14
- package/locales/sl.json +0 -1
- package/locales/sq/LC_MESSAGES/volto.po +0 -14
- package/locales/sq.json +0 -1
- package/locales/sv/LC_MESSAGES/volto.po +0 -14
- package/locales/sv.json +0 -1
- package/locales/tr/LC_MESSAGES/volto.po +0 -14
- package/locales/tr.json +0 -1
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @module components/theme/Header/Header
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, { useCallback, useState } from 'react';
|
|
7
|
-
import { Dropdown, Image } from 'semantic-ui-react';
|
|
6
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
7
|
+
import { Dropdown, Image, Sticky } from 'semantic-ui-react';
|
|
8
8
|
import { connect, useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import Cookies from 'universal-cookie';
|
|
10
10
|
|
|
@@ -14,12 +14,10 @@ import {
|
|
|
14
14
|
getBaseUrl,
|
|
15
15
|
hasApiExpander,
|
|
16
16
|
flattenToAppURL,
|
|
17
|
-
normalizeLanguageName,
|
|
18
17
|
} from '@plone/volto/helpers';
|
|
19
18
|
import { getNavigation } from '@plone/volto/actions';
|
|
20
19
|
import { Header, Logo } from '@eeacms/volto-eea-design-system/ui';
|
|
21
20
|
import { usePrevious } from '@eeacms/volto-eea-design-system/helpers';
|
|
22
|
-
import { find } from 'lodash';
|
|
23
21
|
import globeIcon from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/global-line.svg';
|
|
24
22
|
import eeaFlag from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/eea.png';
|
|
25
23
|
|
|
@@ -49,50 +47,60 @@ function getLanguage() {
|
|
|
49
47
|
/**
|
|
50
48
|
* EEA Specific Header component.
|
|
51
49
|
*/
|
|
52
|
-
const EEAHeader = ({
|
|
50
|
+
const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
51
|
+
const dispatch = useDispatch();
|
|
53
52
|
const [language, setLanguage] = useState(getLanguage());
|
|
53
|
+
const previousToken = usePrevious(token);
|
|
54
|
+
const { items } = props;
|
|
55
|
+
const { eea } = config.settings;
|
|
56
|
+
const { headerOpts } = eea || {};
|
|
57
|
+
const { logo, logoWhite } = headerOpts || {};
|
|
58
|
+
|
|
59
|
+
const width = useSelector((state) => state.screen?.width);
|
|
54
60
|
|
|
55
|
-
const
|
|
56
|
-
(state) => state.
|
|
61
|
+
const router_pathname = useSelector(
|
|
62
|
+
(state) => removeTrailingSlash(state.router?.location?.pathname) || '',
|
|
57
63
|
);
|
|
64
|
+
let pathname = router_pathname;
|
|
58
65
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
const content_pathname = useMemo(
|
|
67
|
+
() => flattenToAppURL(content.data?.['@id']),
|
|
68
|
+
[content],
|
|
69
|
+
);
|
|
62
70
|
|
|
63
71
|
const isSubsite = subsite?.['@type'] === 'Subsite';
|
|
64
72
|
|
|
65
|
-
|
|
73
|
+
if (content.get.loading && content_pathname !== router_pathname) {
|
|
74
|
+
pathname = content_pathname;
|
|
75
|
+
}
|
|
66
76
|
|
|
67
|
-
const isHomePageInverse =
|
|
68
|
-
const layout = state.content?.data?.layout;
|
|
69
|
-
const has_home_layout =
|
|
70
|
-
layout === 'homepage_inverse_view' ||
|
|
71
|
-
(__CLIENT__ && document.body.classList.contains('homepage-inverse'));
|
|
72
|
-
return (
|
|
73
|
-
has_home_layout &&
|
|
74
|
-
(pathname === router_pathname || router_pathname.endsWith('/edit'))
|
|
75
|
-
);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const { eea, bise } = config.settings;
|
|
79
|
-
const headerOpts = eea.headerOpts || {};
|
|
80
|
-
const { logo, logoWhite } = headerOpts || {};
|
|
81
|
-
const width = useSelector((state) => state.screen?.width);
|
|
82
|
-
const dispatch = useDispatch();
|
|
83
|
-
const previousToken = usePrevious(token);
|
|
77
|
+
const isHomePageInverse = ['', '/', '/edit', '/edit/'].includes(pathname);
|
|
84
78
|
|
|
85
79
|
const isMultilingual =
|
|
86
|
-
config.settings.isMultilingual ||
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
config.settings.isMultilingual || (isSubsite && subsite.isMultilingual);
|
|
81
|
+
|
|
82
|
+
const changeLanguage = useCallback(
|
|
83
|
+
(lang) => {
|
|
84
|
+
setLanguage(lang);
|
|
85
|
+
const cookies = new Cookies();
|
|
86
|
+
cookies.set('LANGUAGE', lang);
|
|
87
|
+
},
|
|
88
|
+
[setLanguage],
|
|
89
|
+
);
|
|
89
90
|
|
|
90
|
-
const
|
|
91
|
-
|
|
91
|
+
const getSubsiteItems = useCallback(() => {
|
|
92
|
+
if (!subsite) return [];
|
|
93
|
+
const subsiteData = items.filter((item) => item.url === subsite['@id'])[0];
|
|
94
|
+
const subsiteItems = subsiteData?.items || [];
|
|
95
|
+
if (subsite.isMultilingual) {
|
|
96
|
+
const subsiteMultilingualData = subsiteItems.filter(
|
|
97
|
+
(item) => item.url === `${subsite['@id']}/${language}`,
|
|
98
|
+
)[0];
|
|
99
|
+
return subsiteMultilingualData?.items || [];
|
|
100
|
+
}
|
|
92
101
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, []);
|
|
102
|
+
return subsiteItems;
|
|
103
|
+
}, [items, language, subsite]);
|
|
96
104
|
|
|
97
105
|
React.useEffect(() => {
|
|
98
106
|
const { settings } = config;
|
|
@@ -114,12 +122,12 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
|
|
|
114
122
|
|
|
115
123
|
return (
|
|
116
124
|
<Header menuItems={items}>
|
|
117
|
-
{isHomePageInverse && <BodyClass className="homepage" />}
|
|
125
|
+
{isHomePageInverse && <BodyClass className="homepage homepage-inverse" />}
|
|
118
126
|
<Header.TopHeader>
|
|
119
127
|
<Header.TopItem className="official-union">
|
|
120
128
|
<Image src={eeaFlag} alt="eea flag"></Image>
|
|
121
129
|
<Header.TopDropdownMenu
|
|
122
|
-
text="An official website of the European Union | How do you
|
|
130
|
+
text="An official website of the European Union | How do you know?"
|
|
123
131
|
tabletText="EEA information systems"
|
|
124
132
|
mobileText=" "
|
|
125
133
|
icon="chevron down"
|
|
@@ -127,10 +135,9 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
|
|
|
127
135
|
className=""
|
|
128
136
|
viewportWidth={width}
|
|
129
137
|
>
|
|
138
|
+
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
|
|
130
139
|
<div
|
|
131
140
|
className="content"
|
|
132
|
-
role="menu"
|
|
133
|
-
tabIndex="0"
|
|
134
141
|
onClick={(evt) => evt.stopPropagation()}
|
|
135
142
|
onKeyDown={(evt) => evt.stopPropagation()}
|
|
136
143
|
>
|
|
@@ -142,8 +149,6 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
|
|
|
142
149
|
href="https://europa.eu/european-union/contact/institutions-bodies_en"
|
|
143
150
|
target="_blank"
|
|
144
151
|
rel="noreferrer"
|
|
145
|
-
role="option"
|
|
146
|
-
aria-selected="false"
|
|
147
152
|
>
|
|
148
153
|
See all EU institutions and bodies
|
|
149
154
|
</a>
|
|
@@ -161,7 +166,7 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
|
|
|
161
166
|
<div className="wrapper">
|
|
162
167
|
<Dropdown.Item>
|
|
163
168
|
<UniversalLink
|
|
164
|
-
href={`/natura2000
|
|
169
|
+
href={`/natura2000/${language}`}
|
|
165
170
|
className="site"
|
|
166
171
|
target="_self"
|
|
167
172
|
rel="noreferrer"
|
|
@@ -187,103 +192,117 @@ const EEAHeader = ({ pathname, token, history, subsite, ...props }) => {
|
|
|
187
192
|
)}
|
|
188
193
|
|
|
189
194
|
{isMultilingual && (
|
|
190
|
-
<Header.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
<Header.TopItem>
|
|
196
|
+
<Header.TopDropdownMenu
|
|
197
|
+
id="language-switcher"
|
|
198
|
+
className="item"
|
|
199
|
+
text={`${language.toUpperCase()}`}
|
|
200
|
+
mobileText={`${language.toUpperCase()}`}
|
|
201
|
+
hasLanguageDropdown={true}
|
|
202
|
+
icon={
|
|
203
|
+
<Image
|
|
204
|
+
src={globeIcon}
|
|
205
|
+
alt="language dropdown globe icon"
|
|
206
|
+
></Image>
|
|
207
|
+
}
|
|
208
|
+
viewportWidth={width}
|
|
204
209
|
>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
<ul
|
|
211
|
+
className="wrapper language-list"
|
|
212
|
+
role="listbox"
|
|
213
|
+
aria-label="language switcher"
|
|
214
|
+
>
|
|
215
|
+
{eea.languages.map((item, index) => (
|
|
216
|
+
<Dropdown.Item
|
|
217
|
+
as="li"
|
|
218
|
+
key={index}
|
|
219
|
+
text={
|
|
220
|
+
<span>
|
|
221
|
+
{item.name}
|
|
222
|
+
<span className="country-code">
|
|
223
|
+
{item.code.toUpperCase()}
|
|
224
|
+
</span>
|
|
214
225
|
</span>
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
}
|
|
227
|
+
onClick={() => {
|
|
228
|
+
if (isSubsite && subsite.isMultilingual) {
|
|
229
|
+
for (const language of eea.languages) {
|
|
230
|
+
const multilingualSubsiteRe = new RegExp(
|
|
231
|
+
`^(${subsite['@id']})(/${language.code}($|/))(.*)`,
|
|
232
|
+
'g',
|
|
233
|
+
);
|
|
234
|
+
const matches = [
|
|
235
|
+
...router_pathname.matchAll(multilingualSubsiteRe),
|
|
236
|
+
][0];
|
|
237
|
+
if (matches && matches[2] !== `/${item.code}/`) {
|
|
238
|
+
changeLanguage(item.code);
|
|
239
|
+
history.push(
|
|
240
|
+
`${matches[1]}/${item.code}${
|
|
241
|
+
matches[4] ? '/' + matches[4] : ''
|
|
242
|
+
}`,
|
|
243
|
+
);
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}}
|
|
249
|
+
></Dropdown.Item>
|
|
250
|
+
))}
|
|
251
|
+
</ul>
|
|
252
|
+
</Header.TopDropdownMenu>
|
|
253
|
+
</Header.TopItem>
|
|
231
254
|
)}
|
|
232
255
|
</Header.TopHeader>
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
256
|
+
<Sticky
|
|
257
|
+
active={isSubsite && subsite['@id'] === '/natura2000'}
|
|
258
|
+
context={__CLIENT__ && document.querySelector('.content-area')}
|
|
259
|
+
>
|
|
260
|
+
<Header.Main
|
|
261
|
+
pathname={router_pathname}
|
|
262
|
+
inverted={isHomePageInverse ? true : false}
|
|
263
|
+
transparency={isHomePageInverse ? true : false}
|
|
264
|
+
hideSearch={isSubsite}
|
|
265
|
+
logo={
|
|
240
266
|
<Logo
|
|
241
267
|
src={isHomePageInverse ? logoWhite : logo}
|
|
242
268
|
title={eea.websiteTitle}
|
|
243
269
|
alt={eea.organisationName}
|
|
244
270
|
url={eea.logoTargetUrl}
|
|
245
271
|
/>
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
>
|
|
281
|
-
{props?.iconPosition !== 'right' && props?.children}
|
|
282
|
-
<span>{item.title}</span>
|
|
283
|
-
{props?.iconPosition === 'right' && props?.children}
|
|
284
|
-
</UniversalLink>
|
|
285
|
-
)}
|
|
286
|
-
></Header.Main>
|
|
272
|
+
}
|
|
273
|
+
menuItems={
|
|
274
|
+
isSubsite && !subsite.isRoot
|
|
275
|
+
? getSubsiteItems()
|
|
276
|
+
: items.filter((item) => item.url !== '/natura2000')
|
|
277
|
+
}
|
|
278
|
+
renderGlobalMenuItem={(item, { onClick }) => (
|
|
279
|
+
<a
|
|
280
|
+
href={item.url || '/'}
|
|
281
|
+
title={item.title}
|
|
282
|
+
onClick={(e) => {
|
|
283
|
+
e.preventDefault();
|
|
284
|
+
onClick(e, item);
|
|
285
|
+
}}
|
|
286
|
+
>
|
|
287
|
+
{item.title}
|
|
288
|
+
</a>
|
|
289
|
+
)}
|
|
290
|
+
renderMenuItem={(item, options, props) => (
|
|
291
|
+
<UniversalLink
|
|
292
|
+
href={item.url || '/'}
|
|
293
|
+
title={item.nav_title || item.title}
|
|
294
|
+
{...(options || {})}
|
|
295
|
+
className={cx(options?.className, {
|
|
296
|
+
active: item.url === router_pathname,
|
|
297
|
+
})}
|
|
298
|
+
>
|
|
299
|
+
{props?.iconPosition !== 'right' && props?.children}
|
|
300
|
+
<span>{item.nav_title || item.title}</span>
|
|
301
|
+
{props?.iconPosition === 'right' && props?.children}
|
|
302
|
+
</UniversalLink>
|
|
303
|
+
)}
|
|
304
|
+
/>
|
|
305
|
+
</Sticky>
|
|
287
306
|
</Header>
|
|
288
307
|
);
|
|
289
308
|
};
|
|
@@ -294,7 +313,8 @@ export default compose(
|
|
|
294
313
|
(state) => ({
|
|
295
314
|
token: state.userSession.token,
|
|
296
315
|
items: state.navigation.items,
|
|
297
|
-
subsite: state.
|
|
316
|
+
subsite: state.subsite.data,
|
|
317
|
+
content: state.content,
|
|
298
318
|
}),
|
|
299
319
|
{ getNavigation },
|
|
300
320
|
),
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import installStyles from './components/manage/Styles';
|
|
|
6
6
|
import biseLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo.svg';
|
|
7
7
|
import biseWhiteLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo-white.svg';
|
|
8
8
|
|
|
9
|
+
import { getBlocksTocEntries } from '@eeacms/volto-block-toc/Block/TocView';
|
|
10
|
+
|
|
9
11
|
const applyConfig = (config) => {
|
|
10
12
|
// Volto specific settings
|
|
11
13
|
config.settings = {
|
|
@@ -17,9 +19,6 @@ const applyConfig = (config) => {
|
|
|
17
19
|
config.settings.isMultilingual = false;
|
|
18
20
|
config.settings.defaultLanguage =
|
|
19
21
|
config.settings.eea?.defaultLanguage || 'en';
|
|
20
|
-
config.settings.supportedLanguages = config.settings.eea?.languages?.map(
|
|
21
|
-
(item) => item.code,
|
|
22
|
-
) || ['en'];
|
|
23
22
|
|
|
24
23
|
// EEA customizations
|
|
25
24
|
config.settings.eea = {
|
|
@@ -43,12 +42,22 @@ const applyConfig = (config) => {
|
|
|
43
42
|
buttonTitle: 'Go to full site search',
|
|
44
43
|
},
|
|
45
44
|
],
|
|
46
|
-
logoTargetUrl: '/
|
|
45
|
+
logoTargetUrl: '/',
|
|
47
46
|
};
|
|
48
47
|
|
|
49
48
|
// BISE config
|
|
50
49
|
config.settings.bise = {
|
|
51
|
-
|
|
50
|
+
subsites: [
|
|
51
|
+
{
|
|
52
|
+
'@id': '/natura2000',
|
|
53
|
+
'@type': 'Subsite',
|
|
54
|
+
title: 'Natura 2000',
|
|
55
|
+
subsite_css_class: {
|
|
56
|
+
token: 'natura2000',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
multilingualSubsites: ['/natura2000'],
|
|
52
61
|
};
|
|
53
62
|
|
|
54
63
|
config.settings.apiExpanders.push({
|
|
@@ -68,6 +77,23 @@ const applyConfig = (config) => {
|
|
|
68
77
|
toolbarButtons.splice(linkIndex, 1, 'a');
|
|
69
78
|
toolbarButtons.splice(advancedLinkIndex, 1);
|
|
70
79
|
|
|
80
|
+
config.blocks.blocksConfig.columnsBlock.tocEntries = (blockData, data) => {
|
|
81
|
+
const columns = blockData.data.blocks_layout.items || [];
|
|
82
|
+
let entries = [];
|
|
83
|
+
|
|
84
|
+
columns.forEach((column) => {
|
|
85
|
+
const { blocksFormEntries } = getBlocksTocEntries(
|
|
86
|
+
{
|
|
87
|
+
...blockData.data.blocks[column],
|
|
88
|
+
},
|
|
89
|
+
data,
|
|
90
|
+
);
|
|
91
|
+
entries = [...entries, ...blocksFormEntries];
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return entries;
|
|
95
|
+
};
|
|
96
|
+
|
|
71
97
|
return [installBlocks, installStyles].reduce(
|
|
72
98
|
(acc, apply) => apply(acc),
|
|
73
99
|
config,
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/*******************************
|
|
2
|
+
Container
|
|
3
|
+
*******************************/
|
|
4
|
+
|
|
5
|
+
.has--size--full:not(.block-editor-columnsBlock),
|
|
6
|
+
.full-width {
|
|
7
|
+
width: calc(100vw - var(--scrollbar-width, @scrollbarWidth)) !important;
|
|
8
|
+
margin-left: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
|
|
9
|
+
margin-right: calc(-50vw + var(--scrollbar-width, @scrollbarWidth) / 2) !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media only screen and (min-width: @largestMobileScreen) {
|
|
13
|
+
body.has-toolbar {
|
|
14
|
+
.has--size--full:not(.block-editor-columnsBlock),
|
|
15
|
+
.full-width {
|
|
16
|
+
width: calc(100vw - @toolbarWidth - var(--scrollbar-width, @scrollbarWidth)) !important;
|
|
17
|
+
margin-left: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
|
|
18
|
+
margin-right: calc(-50vw + (@toolbarWidth + var(--scrollbar-width, @scrollbarWidth)) / 2) !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body.has-toolbar-collapsed {
|
|
23
|
+
.has--size--full:not(.block-editor-columnsBlock),
|
|
24
|
+
.full-width {
|
|
25
|
+
width: calc(100vw - @toolbarWidthMin - var(--scrollbar-width, @scrollbarWidth)) !important;
|
|
26
|
+
margin-left: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
|
|
27
|
+
margin-right: calc(-50vw + (var(--scrollbar-width, @scrollbarWidth) + @toolbarWidthMin) / 2) !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.section-add,
|
|
33
|
+
.section-edit {
|
|
34
|
+
#page-add .container,
|
|
35
|
+
#page-edit .container {
|
|
36
|
+
max-width: @containerWidth !important;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Mobile */
|
|
41
|
+
@media only screen and (max-width: @largestMobileScreen) {
|
|
42
|
+
.ui.container {
|
|
43
|
+
width: @mobileWidth !important;
|
|
44
|
+
margin-left: @mobileGutter !important;
|
|
45
|
+
margin-right: @mobileGutter !important;
|
|
46
|
+
}
|
|
47
|
+
.ui.grid.container {
|
|
48
|
+
width: @mobileGridWidth !important;
|
|
49
|
+
}
|
|
50
|
+
.ui.relaxed.grid.container {
|
|
51
|
+
width: @mobileRelaxedGridWidth !important;
|
|
52
|
+
}
|
|
53
|
+
.ui.very.relaxed.grid.container {
|
|
54
|
+
width: @mobileVeryRelaxedGridWidth !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
body.has-toolbar {
|
|
59
|
+
/* Tablet */
|
|
60
|
+
@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
|
|
61
|
+
.ui.container {
|
|
62
|
+
width: calc(@tabletWidth - @toolbarWidth);
|
|
63
|
+
}
|
|
64
|
+
.ui.grid.container {
|
|
65
|
+
width: calc(@tabletGridWidth - @toolbarWidth) !important;
|
|
66
|
+
}
|
|
67
|
+
.ui.relaxed.grid.container {
|
|
68
|
+
width: calc(@tabletRelaxedGridWidth - @toolbarWidth) !important;
|
|
69
|
+
}
|
|
70
|
+
.ui.very.relaxed.grid.container {
|
|
71
|
+
width: calc(@tabletVeryRelaxedGridWidth - @toolbarWidth) !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Small Monitor */
|
|
76
|
+
@media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) {
|
|
77
|
+
.ui.container {
|
|
78
|
+
width: calc(@computerWidth - @toolbarWidth);
|
|
79
|
+
}
|
|
80
|
+
.ui.grid.container {
|
|
81
|
+
width: calc(@computerGridWidth - @toolbarWidth) !important;
|
|
82
|
+
}
|
|
83
|
+
.ui.relaxed.grid.container {
|
|
84
|
+
width: calc(@computerRelaxedGridWidth - @toolbarWidth) !important;
|
|
85
|
+
}
|
|
86
|
+
.ui.very.relaxed.grid.container {
|
|
87
|
+
width: calc(@computerVeryRelaxedGridWidth - @toolbarWidth) !important;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Large Monitor */
|
|
92
|
+
@media only screen and (min-width: @largeMonitorBreakpoint) {
|
|
93
|
+
.ui.container {
|
|
94
|
+
width: calc(@largeMonitorWidth - @toolbarWidth);
|
|
95
|
+
}
|
|
96
|
+
.ui.grid.container {
|
|
97
|
+
width: calc(@largeMonitorGridWidth - @toolbarWidth) !important;
|
|
98
|
+
}
|
|
99
|
+
.ui.relaxed.grid.container {
|
|
100
|
+
width: calc(@largeMonitorRelaxedGridWidth - @toolbarWidth) !important;
|
|
101
|
+
}
|
|
102
|
+
.ui.very.relaxed.grid.container {
|
|
103
|
+
width: calc(@largeMonitorVeryRelaxedGridWidth - @toolbarWidth) !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
body.has-toolbar-collapsed {
|
|
109
|
+
/* Tablet */
|
|
110
|
+
@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
|
|
111
|
+
.ui.container {
|
|
112
|
+
width: calc(@tabletWidth - @toolbarWidthMin);
|
|
113
|
+
}
|
|
114
|
+
.ui.grid.container {
|
|
115
|
+
width: calc(@tabletGridWidth - @toolbarWidthMin) !important;
|
|
116
|
+
}
|
|
117
|
+
.ui.relaxed.grid.container {
|
|
118
|
+
width: calc(@tabletRelaxedGridWidth - @toolbarWidthMin) !important;
|
|
119
|
+
}
|
|
120
|
+
.ui.very.relaxed.grid.container {
|
|
121
|
+
width: calc(@tabletVeryRelaxedGridWidth - @toolbarWidthMin) !important;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Small Monitor */
|
|
126
|
+
@media only screen and (min-width: @computerBreakpoint) and (max-width: @largestSmallMonitor) {
|
|
127
|
+
.ui.container {
|
|
128
|
+
width: calc(@computerWidth - @toolbarWidthMin);
|
|
129
|
+
}
|
|
130
|
+
.ui.grid.container {
|
|
131
|
+
width: calc(@computerGridWidth - @toolbarWidthMin) !important;
|
|
132
|
+
}
|
|
133
|
+
.ui.relaxed.grid.container {
|
|
134
|
+
width: calc(@computerRelaxedGridWidth - @toolbarWidthMin) !important;
|
|
135
|
+
}
|
|
136
|
+
.ui.very.relaxed.grid.container {
|
|
137
|
+
width: calc(@computerVeryRelaxedGridWidth - @toolbarWidthMin) !important;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Large Monitor */
|
|
142
|
+
@media only screen and (min-width: @largeMonitorBreakpoint) {
|
|
143
|
+
.ui.container {
|
|
144
|
+
width: calc(@largeMonitorWidth - @toolbarWidthMin);
|
|
145
|
+
}
|
|
146
|
+
.ui.grid.container {
|
|
147
|
+
width: calc(@largeMonitorGridWidth - @toolbarWidthMin) !important;
|
|
148
|
+
}
|
|
149
|
+
.ui.relaxed.grid.container {
|
|
150
|
+
width: calc(@largeMonitorRelaxedGridWidth - @toolbarWidthMin) !important;
|
|
151
|
+
}
|
|
152
|
+
.ui.very.relaxed.grid.container {
|
|
153
|
+
width: calc(@largeMonitorVeryRelaxedGridWidth - @toolbarWidthMin) !important;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@medium: @fontSize;
|