@eeacms/volto-bise-policy 1.0.8 → 1.0.10
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 +16 -0
- package/package.json +1 -1
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +45 -30
- package/src/customizations/volto/components/theme/Header/Header.jsx +84 -80
- package/src/icons/content-box.svg +14 -0
- package/src/index.js +26 -24
- package/src/{components/manage/Styles/index.js → styles-config.js} +38 -15
- package/theme/extras/stylemenu.less +8 -7
- package/theme/globals/natura2000.less +47 -15
- package/theme/globals/site.overrides +22 -0
- package/theme/modules/sticky.overrides +16 -2
- package/theme/theme.config +1 -1
- package/theme/tokens/colors.less +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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.10](https://github.com/eea/volto-bise-policy/compare/1.0.9...1.0.10) - 7 June 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- add light-green contentbox + separate custom blocks [Miu Razvan - [`bd959d4`](https://github.com/eea/volto-bise-policy/commit/bd959d492e6c30f4f892bf37729b5dbe137f78dc)]
|
|
12
|
+
### [1.0.9](https://github.com/eea/volto-bise-policy/compare/1.0.8...1.0.9) - 6 June 2023
|
|
13
|
+
|
|
14
|
+
#### :nail_care: Enhancements
|
|
15
|
+
|
|
16
|
+
- change(inline-styles): enabled only primary secondary and tertiary inline styles [David Ichim - [`b9392ba`](https://github.com/eea/volto-bise-policy/commit/b9392baba2bd7255d7afe07fd7c82d43543bd7ec)]
|
|
17
|
+
|
|
18
|
+
#### :hammer_and_wrench: Others
|
|
19
|
+
|
|
20
|
+
- update slate inline styles [Miu Razvan - [`ad5f9db`](https://github.com/eea/volto-bise-policy/commit/ad5f9db710ca50586aba1ba96e04dc8f84b33ac9)]
|
|
21
|
+
- fixes [Miu Razvan - [`cb680f2`](https://github.com/eea/volto-bise-policy/commit/cb680f268f297f7ed577081a00b358f60cc627ad)]
|
|
22
|
+
- update [Miu Razvan - [`4c0d4f2`](https://github.com/eea/volto-bise-policy/commit/4c0d4f269c7b05976a4de5dc915fdb3338c976a6)]
|
|
7
23
|
### [1.0.8](https://github.com/eea/volto-bise-policy/compare/1.0.7...1.0.8) - 29 May 2023
|
|
8
24
|
|
|
9
25
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -239,39 +239,54 @@ const NestedAccordion = ({ menuItems, renderMenuItem, pathName }) => {
|
|
|
239
239
|
if (pathName.indexOf(element.url) !== -1) {
|
|
240
240
|
defaultIndex = index;
|
|
241
241
|
}
|
|
242
|
+
const hasItems = element.items?.length > 0;
|
|
243
|
+
let overview = cloneDeep(element);
|
|
244
|
+
|
|
242
245
|
x.title = (
|
|
243
|
-
<Accordion.Title
|
|
244
|
-
{
|
|
245
|
-
|
|
246
|
+
<Accordion.Title
|
|
247
|
+
key={`title-${index}`}
|
|
248
|
+
index={index}
|
|
249
|
+
as="button"
|
|
250
|
+
active={hasItems ? false : undefined}
|
|
251
|
+
>
|
|
252
|
+
{hasItems ? (
|
|
253
|
+
<>
|
|
254
|
+
{element.title}
|
|
255
|
+
<Icon className="ri-arrow-down-s-line" size="small" />
|
|
256
|
+
</>
|
|
257
|
+
) : (
|
|
258
|
+
renderMenuItem(overview)
|
|
259
|
+
)}
|
|
246
260
|
</Accordion.Title>
|
|
247
261
|
);
|
|
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
|
-
|
|
262
|
+
if (hasItems) {
|
|
263
|
+
x.content = (
|
|
264
|
+
<Accordion.Content key={index}>
|
|
265
|
+
<div className="mega-menu-title">
|
|
266
|
+
{/* Inverted right labeled button as a category title - Mobile */}
|
|
267
|
+
{renderMenuItem(
|
|
268
|
+
overview,
|
|
269
|
+
{ className: 'ui button inverted icon right labeled' },
|
|
270
|
+
{
|
|
271
|
+
iconPosition: 'right',
|
|
272
|
+
children: (
|
|
273
|
+
<>
|
|
274
|
+
{/* Add word overview to titles */}
|
|
275
|
+
<span> overview</span>
|
|
276
|
+
<Icon className={'arrow right icon'} alt={'Title icon'} />
|
|
277
|
+
</>
|
|
278
|
+
),
|
|
279
|
+
},
|
|
280
|
+
)}
|
|
281
|
+
</div>
|
|
282
|
+
<FirstLevelContent
|
|
283
|
+
element={element}
|
|
284
|
+
renderMenuItem={renderMenuItem}
|
|
285
|
+
pathName={pathName}
|
|
286
|
+
/>
|
|
287
|
+
</Accordion.Content>
|
|
288
|
+
);
|
|
289
|
+
}
|
|
275
290
|
rootPanels.push(x);
|
|
276
291
|
});
|
|
277
292
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
7
|
-
import {
|
|
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
|
|
|
@@ -62,6 +62,8 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
62
62
|
|
|
63
63
|
const pathname = removeTrailingSlash(props.pathname);
|
|
64
64
|
|
|
65
|
+
const _pathname = removeTrailingSlash(history.location.pathname);
|
|
66
|
+
|
|
65
67
|
const content_pathname = useMemo(
|
|
66
68
|
() => flattenToAppURL(content.data?.['@id']),
|
|
67
69
|
[content],
|
|
@@ -90,8 +92,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
90
92
|
});
|
|
91
93
|
}, [pathname]);
|
|
92
94
|
|
|
93
|
-
const isHomePageInverse =
|
|
94
|
-
content_pathname === '' && ['', '/'].includes(pathname);
|
|
95
|
+
const isHomePageInverse = content_pathname === '' && _pathname === '';
|
|
95
96
|
|
|
96
97
|
const isMultilingual =
|
|
97
98
|
config.settings.isMultilingual || (isSubsite && subsite.isMultilingual);
|
|
@@ -143,6 +144,7 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
143
144
|
{isSubsite && !subsite.isRoot && !isN2KSpecies && !isN2KHabitat && (
|
|
144
145
|
<BodyClass className="with-n2k-navigation" />
|
|
145
146
|
)}
|
|
147
|
+
{isSubsite && isN2KSite && <BodyClass className="is-n2k-site" />}
|
|
146
148
|
|
|
147
149
|
<Header.TopHeader>
|
|
148
150
|
<Header.TopItem className="official-union">
|
|
@@ -280,87 +282,89 @@ const EEAHeader = ({ token, history, subsite, content, ...props }) => {
|
|
|
280
282
|
active={isSubsite && subsite['@id'] === '/natura2000'}
|
|
281
283
|
context={__CLIENT__ && document.querySelector('.content-area')}
|
|
282
284
|
>
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
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={() => {
|
|
285
|
+
<Header.Main
|
|
286
|
+
pathname={pathname}
|
|
287
|
+
headerSearchBox={headerSearchBox}
|
|
288
|
+
inverted={isHomePageInverse ? true : false}
|
|
289
|
+
transparency={isHomePageInverse ? true : false}
|
|
290
|
+
hideSearch={isSubsite}
|
|
291
|
+
logo={
|
|
292
|
+
<Logo
|
|
293
|
+
src={isHomePageInverse ? logoWhite : logo}
|
|
294
|
+
title={eea.websiteTitle}
|
|
295
|
+
alt={eea.organisationName}
|
|
296
|
+
url={eea.logoTargetUrl}
|
|
297
|
+
/>
|
|
298
|
+
}
|
|
299
|
+
menuItems={
|
|
300
|
+
isN2KSite
|
|
301
|
+
? [
|
|
302
|
+
{
|
|
303
|
+
title: 'AT A GLANCE',
|
|
304
|
+
url: '#',
|
|
305
|
+
items: [],
|
|
306
|
+
className: 'at-glance',
|
|
307
|
+
onClick: (e) => {
|
|
308
|
+
e.preventDefault();
|
|
339
309
|
window.scrollTo({
|
|
340
310
|
top: document.body.scrollHeight,
|
|
341
311
|
behavior: 'smooth',
|
|
342
312
|
});
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
title: 'GO TO EXPERT VIEW',
|
|
317
|
+
url: params.site_code
|
|
318
|
+
? `https://natura2000.eea.europa.eu/Natura2000/SDF.aspx?site=${params.site_code}`
|
|
319
|
+
: '#',
|
|
320
|
+
items: [],
|
|
321
|
+
className: 'deep-dive',
|
|
322
|
+
target: params.site_code ? '_blank' : null,
|
|
323
|
+
},
|
|
324
|
+
]
|
|
325
|
+
: isSubsite && !subsite.isRoot && !isN2KSpecies && !isN2KHabitat
|
|
326
|
+
? getSubsiteItems()
|
|
327
|
+
: items.filter((item) => item.url !== '/natura2000')
|
|
328
|
+
}
|
|
329
|
+
renderGlobalMenuItem={(item, { onClick }) => (
|
|
330
|
+
<a
|
|
331
|
+
href={item.url || '/'}
|
|
332
|
+
title={item.title}
|
|
333
|
+
target={item.target || '_self'}
|
|
334
|
+
className={item.className}
|
|
335
|
+
onClick={(e) => {
|
|
336
|
+
if (!isN2KSite) {
|
|
337
|
+
e.preventDefault();
|
|
338
|
+
onClick(e, item);
|
|
339
|
+
}
|
|
340
|
+
if (item.onClick) {
|
|
341
|
+
item.onClick(e, item);
|
|
342
|
+
}
|
|
343
|
+
}}
|
|
344
|
+
>
|
|
345
|
+
{item.title}
|
|
346
|
+
</a>
|
|
347
|
+
)}
|
|
348
|
+
renderMenuItem={(item, options, props) => (
|
|
349
|
+
<UniversalLink
|
|
350
|
+
href={item.url || '/'}
|
|
351
|
+
title={item.nav_title || item.title}
|
|
352
|
+
{...(options || {})}
|
|
353
|
+
className={cx(options?.className, {
|
|
354
|
+
active: item.url === pathname,
|
|
355
|
+
})}
|
|
356
|
+
onClick={(e) => {
|
|
357
|
+
if (item.onClick) {
|
|
358
|
+
item.onClick(e);
|
|
359
|
+
}
|
|
360
|
+
}}
|
|
361
|
+
>
|
|
362
|
+
{props?.iconPosition !== 'right' && props?.children}
|
|
363
|
+
<span>{item.nav_title || item.title}</span>
|
|
364
|
+
{props?.iconPosition === 'right' && props?.children}
|
|
365
|
+
</UniversalLink>
|
|
366
|
+
)}
|
|
367
|
+
/>
|
|
364
368
|
</Sticky>
|
|
365
369
|
</Header>
|
|
366
370
|
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg width="90mm" height="90mm" version="1.1" viewBox="0 0 90 90" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g stroke-width=".26458" aria-label="ContentBox">
|
|
3
|
+
<path d="m21.961 27.071v1.7611q-0.84334-0.78547-1.8024-1.1741-0.95083-0.3886-2.0257-0.3886-2.1166 0-3.2411 1.2981-1.1245 1.2898-1.1245 3.7372 0 2.4391 1.1245 3.7372 1.1245 1.2898 3.2411 1.2898 1.0748 0 2.0257-0.3886 0.9591-0.3886 1.8024-1.1741v1.7446q-0.87642 0.5953-1.8603 0.89295-0.97563 0.29765-2.067 0.29765-2.8029 0-4.4151-1.7115-1.6123-1.7198-1.6123-4.688 0-2.9765 1.6123-4.688 1.6123-1.7198 4.4151-1.7198 1.1079 0 2.0836 0.29765 0.9839 0.28938 1.8438 0.87642z"/>
|
|
4
|
+
<path d="m28.063 30.27q-1.2237 0-1.9347 0.9591-0.71105 0.95083-0.71105 2.6127 0 1.6619 0.70278 2.621 0.71105 0.95083 1.943 0.95083 1.2154 0 1.9265-0.9591 0.71105-0.9591 0.71105-2.6127 0-1.6453-0.71105-2.6044-0.71105-0.96736-1.9265-0.96736zm0-1.2898q1.9843 0 3.1171 1.2898 1.1327 1.2898 1.1327 3.5718 0 2.2737-1.1327 3.5718-1.1327 1.2898-3.1171 1.2898-1.9926 0-3.1253-1.2898-1.1245-1.2981-1.1245-3.5718 0-2.282 1.1245-3.5718 1.1327-1.2898 3.1253-1.2898z"/>
|
|
5
|
+
<path d="m42.532 32.875v5.5892h-1.5213v-5.5396q0-1.3146-0.51262-1.9678-0.51262-0.65318-1.5379-0.65318-1.2319 0-1.943 0.78547-0.71105 0.78547-0.71105 2.1414v5.2337h-1.5296v-9.2602h1.5296v1.4386q0.54569-0.83508 1.2816-1.2485 0.74413-0.4134 1.7115-0.4134 1.5957 0 2.4143 0.99217 0.81854 0.9839 0.81854 2.9021z"/>
|
|
6
|
+
<path d="m47.071 26.574v2.6292h3.1336v1.1823h-3.1336v5.027q0 1.1327 0.30592 1.4552 0.31419 0.32246 1.265 0.32246h1.5627v1.2733h-1.5627q-1.7611 0-2.4308-0.65318-0.66971-0.66145-0.66971-2.3977v-5.027h-1.1162v-1.1823h1.1162v-2.6292z"/>
|
|
7
|
+
<path d="m60.126 33.454v0.74413h-6.9948q0.09922 1.5709 0.94256 2.3977 0.85161 0.81854 2.3647 0.81854 0.87642 0 1.695-0.21497 0.82681-0.21497 1.6371-0.64491v1.4386q-0.81854 0.34726-1.6784 0.52916-0.85988 0.1819-1.7446 0.1819-2.2158 0-3.5139-1.2898-1.2898-1.2898-1.2898-3.4891 0-2.2737 1.2237-3.6049 1.2319-1.3394 3.3155-1.3394 1.8686 0 2.9517 1.2071 1.0914 1.1989 1.0914 3.2659zm-1.5213-0.44648q-0.01654-1.2485-0.70279-1.9926-0.67798-0.74413-1.8024-0.74413-1.2733 0-2.0422 0.71932-0.76066 0.71932-0.87642 2.0257z"/>
|
|
8
|
+
<path d="m70.321 32.875v5.5892h-1.5213v-5.5396q0-1.3146-0.51262-1.9678-0.51262-0.65318-1.5379-0.65318-1.2319 0-1.943 0.78547-0.71105 0.78547-0.71105 2.1414v5.2337h-1.5296v-9.2602h1.5296v1.4386q0.54569-0.83508 1.2816-1.2485 0.74413-0.4134 1.7115-0.4134 1.5957 0 2.4143 0.99217 0.81854 0.9839 0.81854 2.9021z"/>
|
|
9
|
+
<path d="m74.86 26.574v2.6292h3.1336v1.1823h-3.1336v5.027q0 1.1327 0.30592 1.4552 0.31419 0.32246 1.265 0.32246h1.5627v1.2733h-1.5627q-1.7611 0-2.4308-0.65318-0.66971-0.66145-0.66971-2.3977v-5.027h-1.1162v-1.1823h1.1162v-2.6292z"/>
|
|
10
|
+
<path d="m32.321 57.969v4.5226h2.6789q1.3477 0 1.9926-0.55396 0.65318-0.56223 0.65318-1.7115 0-1.1575-0.65318-1.7032-0.64491-0.55396-1.9926-0.55396zm0-5.0766v3.7206h2.4722q1.2237 0 1.819-0.45474 0.60357-0.46301 0.60357-1.4056 0-0.93429-0.60357-1.3973-0.5953-0.46301-1.819-0.46301zm-1.6702-1.3725h4.2663q1.9099 0 2.9434 0.79374 1.0335 0.79373 1.0335 2.2572 0 1.1327-0.52916 1.8024-0.52916 0.66971-1.5544 0.83507 1.2319 0.26458 1.9099 1.1079 0.68625 0.83508 0.68625 2.0918 0 1.6536-1.1245 2.5548-1.1245 0.90122-3.1997 0.90122h-4.4317z"/>
|
|
11
|
+
<path d="m45.79 55.67q-1.2237 0-1.9347 0.9591-0.71105 0.95083-0.71105 2.6127 0 1.6619 0.70279 2.621 0.71105 0.95083 1.943 0.95083 1.2154 0 1.9265-0.9591 0.71105-0.9591 0.71105-2.6127 0-1.6453-0.71105-2.6044-0.71105-0.96736-1.9265-0.96736zm0-1.2898q1.9843 0 3.1171 1.2898 1.1327 1.2898 1.1327 3.5718 0 2.2737-1.1327 3.5718-1.1327 1.2898-3.1171 1.2898-1.9926 0-3.1253-1.2898-1.1245-1.2981-1.1245-3.5718 0-2.282 1.1245-3.5718 1.1327-1.2898 3.1253-1.2898z"/>
|
|
12
|
+
<path d="m59.738 54.604-3.3486 4.5061 3.5222 4.7541h-1.7942l-2.6954-3.6379-2.6954 3.6379h-1.7942l3.5966-4.8451-3.2907-4.4151h1.7942l2.4556 3.299 2.4556-3.299z"/>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import installLink from '@plone/volto-slate/editor/plugins/AdvancedLink';
|
|
|
3
3
|
import { addStylingFieldsetSchemaEnhancer } from '@eeacms/volto-bise-policy/components/manage/Blocks/schema';
|
|
4
4
|
|
|
5
5
|
import installBlocks from './components/manage/Blocks';
|
|
6
|
-
import installStyles from './
|
|
6
|
+
import installStyles from './styles-config';
|
|
7
7
|
|
|
8
8
|
import biseLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo.svg';
|
|
9
9
|
import biseWhiteLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo-white.svg';
|
|
@@ -14,6 +14,15 @@ const restrictedBlocks = [
|
|
|
14
14
|
'embed_eea_map_block',
|
|
15
15
|
];
|
|
16
16
|
|
|
17
|
+
const customBlocks = [
|
|
18
|
+
'html',
|
|
19
|
+
'countryFlag',
|
|
20
|
+
'tableau_block',
|
|
21
|
+
'body_classname',
|
|
22
|
+
'redirect',
|
|
23
|
+
'navigationBlock',
|
|
24
|
+
];
|
|
25
|
+
|
|
17
26
|
const applyConfig = (config) => {
|
|
18
27
|
// Volto specific settings
|
|
19
28
|
config.settings = {
|
|
@@ -120,25 +129,10 @@ const applyConfig = (config) => {
|
|
|
120
129
|
config.blocks.blocksConfig.hero_image_left.schemaEnhancer = addStylingFieldsetSchemaEnhancer;
|
|
121
130
|
}
|
|
122
131
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
colorscale: [
|
|
128
|
-
'#3D2201',
|
|
129
|
-
'#603808',
|
|
130
|
-
'#8B5E34',
|
|
131
|
-
'#BC8A5F',
|
|
132
|
-
'#E7BC91',
|
|
133
|
-
'#FFEDD8',
|
|
134
|
-
'#FFF6EC',
|
|
135
|
-
],
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
title: 'A1',
|
|
139
|
-
colorscale: ['#12957D', '#F9EA8A', '#DD552B', '#AEB0B3'],
|
|
140
|
-
},
|
|
141
|
-
];
|
|
132
|
+
config = [installBlocks, installStyles].reduce(
|
|
133
|
+
(acc, apply) => apply(acc),
|
|
134
|
+
config,
|
|
135
|
+
);
|
|
142
136
|
|
|
143
137
|
// Disable some blocks
|
|
144
138
|
restrictedBlocks.forEach((block) => {
|
|
@@ -147,10 +141,18 @@ const applyConfig = (config) => {
|
|
|
147
141
|
}
|
|
148
142
|
});
|
|
149
143
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
config,
|
|
153
|
-
|
|
144
|
+
// Set custom blocks
|
|
145
|
+
config.blocks.groupBlocksOrder = [
|
|
146
|
+
...config.blocks.groupBlocksOrder,
|
|
147
|
+
{ id: 'custom_blocks', title: 'Custom blocks' },
|
|
148
|
+
];
|
|
149
|
+
customBlocks.forEach((block) => {
|
|
150
|
+
if (config.blocks.blocksConfig[block]) {
|
|
151
|
+
config.blocks.blocksConfig[block].group = 'custom_blocks';
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
return config;
|
|
154
156
|
};
|
|
155
157
|
|
|
156
158
|
export default applyConfig;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// '#ee252c',
|
|
4
|
-
// '#d5e843',
|
|
5
|
-
// '#33b540',
|
|
6
|
-
// '#352d4e',
|
|
7
|
-
// '#f9ae79',
|
|
8
|
-
// '#87d6cb',
|
|
9
|
-
// ...(config.settings.plotlyChartsColorScale || []),
|
|
10
|
-
// ];
|
|
1
|
+
import { Icon } from '@plone/volto/components';
|
|
2
|
+
import contentBoxSVG from '@eeacms/volto-bise-policy/icons/content-box.svg';
|
|
11
3
|
|
|
4
|
+
export default (config) => {
|
|
12
5
|
config.settings.available_colors = [
|
|
13
6
|
'#005248', // primary color
|
|
14
7
|
'#00A390', // secondary color
|
|
@@ -83,20 +76,30 @@ export default (config) => {
|
|
|
83
76
|
{ cssClass: 'white-text', label: 'White text' },
|
|
84
77
|
{ cssClass: 'primary-text', label: 'Primary text' },
|
|
85
78
|
{ cssClass: 'secondary-text', label: 'Secondary text' },
|
|
79
|
+
{ cssClass: 'tertiary-text', label: 'Tertiary text' },
|
|
86
80
|
{ cssClass: 'dark-green-text', label: 'Dark green text' },
|
|
87
81
|
{ cssClass: 'blue-text', label: 'Blue text' },
|
|
88
82
|
{ cssClass: 'red-text', label: 'Red text' },
|
|
89
83
|
{ cssClass: 'yellow-text', label: 'Yellow text' },
|
|
90
84
|
{ cssClass: 'grey-text', label: 'Grey text' },
|
|
91
85
|
];
|
|
92
|
-
// config.settings.slate.styleMenu.blockStyles = [
|
|
93
|
-
// ...config.settings.slate.styleMenu.blockStyles,
|
|
94
|
-
// { cssClass: 'green-block-text', label: 'Green Text' },
|
|
95
|
-
// { cssClass: 'underline-block-text', label: 'Underline Text' },
|
|
96
|
-
// ];
|
|
97
86
|
|
|
98
87
|
config.settings.pluggableStyles = [
|
|
99
88
|
...(config.settings.pluggableStyles || []),
|
|
89
|
+
{
|
|
90
|
+
id: 'content-box-light-green',
|
|
91
|
+
title: 'Light green',
|
|
92
|
+
previewComponent: () => (
|
|
93
|
+
<Icon name={contentBoxSVG} size="88px" className="light-green" />
|
|
94
|
+
),
|
|
95
|
+
viewComponent: (props) => {
|
|
96
|
+
return (
|
|
97
|
+
<div className="content-box light-green">
|
|
98
|
+
<div className="content-box-inner">{props.children}</div>
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
},
|
|
102
|
+
},
|
|
100
103
|
{
|
|
101
104
|
id: 'borderBlock',
|
|
102
105
|
title: 'Border',
|
|
@@ -159,5 +162,25 @@ export default (config) => {
|
|
|
159
162
|
},
|
|
160
163
|
];
|
|
161
164
|
|
|
165
|
+
// Plotly bise color
|
|
166
|
+
config.settings.plotlyCustomColors = [
|
|
167
|
+
{
|
|
168
|
+
title: 'A2',
|
|
169
|
+
colorscale: [
|
|
170
|
+
'#3D2201',
|
|
171
|
+
'#603808',
|
|
172
|
+
'#8B5E34',
|
|
173
|
+
'#BC8A5F',
|
|
174
|
+
'#E7BC91',
|
|
175
|
+
'#FFEDD8',
|
|
176
|
+
'#FFF6EC',
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
title: 'A1',
|
|
181
|
+
colorscale: ['#12957D', '#F9EA8A', '#DD552B', '#AEB0B3'],
|
|
182
|
+
},
|
|
183
|
+
];
|
|
184
|
+
|
|
162
185
|
return config;
|
|
163
186
|
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
.primary-big-text {
|
|
2
|
-
font-size:
|
|
3
|
-
line-height: 45px;
|
|
2
|
+
font-size: 1.625rem;
|
|
4
3
|
}
|
|
5
4
|
|
|
6
5
|
.medium-text {
|
|
7
|
-
font-size:
|
|
8
|
-
line-height: 30px;
|
|
6
|
+
font-size: 1.25rem;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
.small-text {
|
|
12
|
-
font-size:
|
|
13
|
-
line-height: 20px;
|
|
10
|
+
font-size: 0.8rem;
|
|
14
11
|
}
|
|
15
12
|
|
|
16
13
|
.white-text {
|
|
@@ -27,6 +24,10 @@
|
|
|
27
24
|
color: @secondaryColor;
|
|
28
25
|
}
|
|
29
26
|
|
|
27
|
+
.tertiary-text {
|
|
28
|
+
color: @tertiaryColor;
|
|
29
|
+
}
|
|
30
|
+
|
|
30
31
|
.dark-green-text {
|
|
31
32
|
color: @bottleGreen;
|
|
32
33
|
}
|
|
@@ -45,4 +46,4 @@
|
|
|
45
46
|
|
|
46
47
|
.grey-text {
|
|
47
48
|
color: @tertiaryColor;
|
|
48
|
-
}
|
|
49
|
+
}
|
|
@@ -52,37 +52,69 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
|
|
55
|
+
.is-n2k-site {
|
|
56
|
+
.eea.header .main.bar {
|
|
57
|
+
.ui.grid, .main-menu, .main-menu > ul, .main-menu > ul > li {
|
|
58
|
+
height: 100%;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
.eea.header .main.bar .main-menu > ul > li {
|
|
63
|
+
padding: 0 0.5rem !important;
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
> a {
|
|
66
|
+
align-self: center;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
#mega-menu {
|
|
71
|
+
display: grid !important;
|
|
72
|
+
align-content: center;
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
.ui.container {
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding-bottom: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ui.accordion > button > a {
|
|
81
|
+
color: #fff !important;
|
|
69
82
|
}
|
|
70
83
|
}
|
|
71
84
|
}
|
|
72
85
|
|
|
86
|
+
|
|
73
87
|
.at-glance {
|
|
74
88
|
height: 100%;
|
|
75
89
|
padding: 0 2rem;
|
|
76
|
-
background:
|
|
77
|
-
border:
|
|
90
|
+
background: @secondaryColor 0% 0% no-repeat padding-box;
|
|
91
|
+
border-bottom: 4px solid @secondaryColor !important;
|
|
92
|
+
margin-bottom: -16px;
|
|
93
|
+
padding-bottom: 16px;
|
|
94
|
+
height: calc(100% + 16px);
|
|
95
|
+
border-bottom-left-radius: 10px;
|
|
96
|
+
border-bottom-right-radius: 10px;
|
|
78
97
|
color: #fff !important;
|
|
79
98
|
cursor: pointer;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
80
101
|
|
|
81
102
|
&:hover {
|
|
82
103
|
color: #fff !important;
|
|
104
|
+
border-bottom: 4px solid @secondaryColor !important;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.deep-dive {
|
|
109
|
+
color: @secondaryColor !important;
|
|
110
|
+
border-bottom: 4px solid transparent !important;
|
|
111
|
+
|
|
112
|
+
&:hover {
|
|
113
|
+
border-bottom: 4px solid transparent !important;
|
|
83
114
|
}
|
|
84
115
|
}
|
|
85
116
|
|
|
117
|
+
.at-glance,
|
|
86
118
|
.deep-dive {
|
|
87
119
|
font-weight: bold;
|
|
88
120
|
}
|
|
@@ -90,7 +122,7 @@
|
|
|
90
122
|
.with-n2k-navigation {
|
|
91
123
|
.eea.header {
|
|
92
124
|
.main.bar .ui.grid {
|
|
93
|
-
> :first-child {
|
|
125
|
+
> :first-child:not(:last-child) {
|
|
94
126
|
width: 200px !important;
|
|
95
127
|
|
|
96
128
|
img {
|
|
@@ -98,7 +130,7 @@
|
|
|
98
130
|
}
|
|
99
131
|
}
|
|
100
132
|
|
|
101
|
-
> :last-child {
|
|
133
|
+
> :last-child:not(:first-child) {
|
|
102
134
|
width: calc(100% - 200px) !important;
|
|
103
135
|
}
|
|
104
136
|
|
|
@@ -272,4 +272,26 @@ p.has--clear--both:empty {
|
|
|
272
272
|
|
|
273
273
|
.simple-data-table {
|
|
274
274
|
padding: 0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.content-box {
|
|
278
|
+
&.light-green {
|
|
279
|
+
background-color: @green-1;
|
|
280
|
+
color: @tertiaryColor;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.style-select-widget {
|
|
285
|
+
svg.light-green {
|
|
286
|
+
background-color:@green-1;
|
|
287
|
+
fill: @tertiaryColor !important;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
#sidebar > .sidebar-container > .tabs-wrapper > .ui.menu {
|
|
292
|
+
flex-wrap: nowrap;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.ui.button.full-size-sidenav-btn {
|
|
296
|
+
padding: 6px !important;
|
|
275
297
|
}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
.eea.header {
|
|
2
|
+
z-index: @zIndex;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
.eea.header .ui.sticky {
|
|
2
6
|
z-index: @zIndex;
|
|
3
7
|
}
|
|
4
8
|
|
|
5
|
-
.sticky-navigation-anchors.full-width {
|
|
9
|
+
.sticky-navigation-anchors.full-width:not(.sticky-broken) {
|
|
6
10
|
z-index: @zIndex;
|
|
7
|
-
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sticky-broken {
|
|
14
|
+
.ui.sticky {
|
|
15
|
+
z-index: unset !important;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// #toolbar {
|
|
20
|
+
// z-index: @zIndex + 1;
|
|
21
|
+
// }
|
package/theme/theme.config
CHANGED
package/theme/tokens/colors.less
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@green-0: #C8FFF8;
|
|
2
|
-
@green-1: #
|
|
3
|
-
@green-2: #
|
|
4
|
-
@green-3: #
|
|
5
|
-
@green-4: #
|
|
6
|
-
@green-5: #007B6C;
|
|
2
|
+
@green-1: #A0E5DC;
|
|
3
|
+
@green-2: #78CAC0;
|
|
4
|
+
@green-3: #50B0A4;
|
|
5
|
+
@green-4: #289588; // @secondaryColor
|
|
6
|
+
@green-5: #007B6C;
|
|
7
7
|
@green-6: #005248; // @primaryColor
|
|
8
8
|
|
|
9
9
|
@yellow-0: #FEF6CD;
|