@eeacms/volto-n2k 1.0.29 → 1.0.31
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 -2
- package/jest-addon.config.js +2 -2
- package/package.json +1 -1
- package/src/components/manage/Blocks/BubbleChart/Chart.jsx +0 -5
- package/src/components/manage/Blocks/CDDACountryProfileMap/Edit.jsx +34 -0
- package/src/components/manage/Blocks/CDDACountryProfileMap/View.jsx +208 -0
- package/src/components/manage/Blocks/CDDACountryProfileMap/index.js +24 -0
- package/src/components/manage/Blocks/CDDACountryProfileMap/schema.js +19 -0
- package/src/components/manage/Blocks/CDDACountryProfileMap/style.less +240 -0
- package/src/components/manage/Blocks/CddaShape/View.jsx +1 -2
- package/src/components/manage/Blocks/ExploreHabitats/View.jsx +1 -2
- package/src/components/manage/Blocks/ExploreSites/View.jsx +1 -1
- package/src/components/manage/Blocks/ExploreSpecies/View.jsx +1 -1
- package/src/components/manage/Blocks/HabitatDistribution/View.jsx +1 -1
- package/src/components/manage/Blocks/HabitatProtectedSites/View.jsx +1 -1
- package/src/components/manage/Blocks/HabitatsBanner/View.jsx +3 -0
- package/src/components/manage/Blocks/Landing/Edit.jsx +6 -2
- package/src/components/manage/Blocks/N2KCountryProfileMap/Edit.jsx +34 -0
- package/src/components/manage/Blocks/N2KCountryProfileMap/View.jsx +165 -0
- package/src/components/manage/Blocks/N2KCountryProfileMap/index.js +24 -0
- package/src/components/manage/Blocks/N2KCountryProfileMap/schema.js +19 -0
- package/src/components/manage/Blocks/N2KCountryProfileMap/style.less +240 -0
- package/src/components/manage/Blocks/SiteProtectedSpecies/style.less +1 -1
- package/src/components/manage/Blocks/SiteShape/View.jsx +1 -2
- package/src/components/manage/Blocks/SiteSpeciesList/View.jsx +1 -2
- package/src/components/manage/Blocks/SpeciesBanner/View.jsx +3 -0
- package/src/components/manage/Blocks/SpeciesClassification/View.jsx +0 -2
- package/src/components/manage/Blocks/SpeciesDistribution/View.jsx +1 -1
- package/src/components/manage/Blocks/SpeciesProtectedSites/View.jsx +1 -1
- package/src/components/manage/Blocks/StackedBarChart/Chart.jsx +0 -6
- package/src/components/theme/Sitemap/Sitemap.jsx +1 -2
- package/src/helpers.js +3 -3
- package/src/index.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,25 @@ 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.
|
|
7
|
+
### [1.0.31](https://github.com/eea/volto-n2k/compare/1.0.30...1.0.31) - 16 June 2023
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
- update [Miu Razvan - [`
|
|
11
|
+
- update [Miu Razvan - [`f4ea5ea`](https://github.com/eea/volto-n2k/commit/f4ea5ea381a015c32cff24957bd677e47fc0df05)]
|
|
12
|
+
- don't swipe carousel with touch moves [Miu Razvan - [`057088d`](https://github.com/eea/volto-n2k/commit/057088d411874c9b8c2fe7731107b8da97be0515)]
|
|
13
|
+
### [1.0.30](https://github.com/eea/volto-n2k/compare/1.0.29...1.0.30) - 12 June 2023
|
|
14
|
+
|
|
15
|
+
#### :bug: Bug Fixes
|
|
16
|
+
|
|
17
|
+
- fix: Solve issues identified by Sonarqube [dana-cfc4 - [`be9e367`](https://github.com/eea/volto-n2k/commit/be9e367923fe953aed879e51b078026224a2c817)]
|
|
18
|
+
|
|
19
|
+
#### :hammer_and_wrench: Others
|
|
20
|
+
|
|
21
|
+
- fix maps [Miu Razvan - [`cfd8805`](https://github.com/eea/volto-n2k/commit/cfd8805df86da18c2ecf5140223830f128157f74)]
|
|
22
|
+
- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`1e24dce`](https://github.com/eea/volto-n2k/commit/1e24dce7789c9a1436fd6a52e79c69119a9ef45a)]
|
|
23
|
+
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`2a0ad87`](https://github.com/eea/volto-n2k/commit/2a0ad8776363f7dce37422660235dceeae151667)]
|
|
24
|
+
### [1.0.29](https://github.com/eea/volto-n2k/compare/1.0.28...1.0.29) - 8 June 2023
|
|
25
|
+
|
|
12
26
|
### [1.0.28](https://github.com/eea/volto-n2k/compare/1.0.27...1.0.28) - 7 June 2023
|
|
13
27
|
|
|
14
28
|
#### :hammer_and_wrench: Others
|
package/jest-addon.config.js
CHANGED
|
@@ -5,19 +5,19 @@ module.exports = {
|
|
|
5
5
|
'!src/**/*.d.ts',
|
|
6
6
|
],
|
|
7
7
|
moduleNameMapper: {
|
|
8
|
+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
8
9
|
'@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
|
|
9
10
|
'@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
|
|
10
11
|
'@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
11
12
|
'@package/(.*)$': '<rootDir>/src/$1',
|
|
12
13
|
'@root/(.*)$': '<rootDir>/src/$1',
|
|
13
14
|
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
|
|
14
|
-
'@eeacms/(.*?)/(.*)$': '<rootDir>/
|
|
15
|
+
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
15
16
|
'@plone/volto-slate':
|
|
16
17
|
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
17
18
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
18
19
|
'load-volto-addons':
|
|
19
20
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
20
|
-
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
21
21
|
},
|
|
22
22
|
transform: {
|
|
23
23
|
'^.+\\.js(x)?$': 'babel-jest',
|
package/package.json
CHANGED
|
@@ -17,11 +17,6 @@ function Chart(props) {
|
|
|
17
17
|
const popupRef = useRef();
|
|
18
18
|
const { margin = { top: 20, right: 30, bottom: 70, left: 40 } } = props;
|
|
19
19
|
|
|
20
|
-
// const dispose = () => {
|
|
21
|
-
// const svg = select(svgRef.current);
|
|
22
|
-
// svg.selectAll('*').remove();
|
|
23
|
-
// };
|
|
24
|
-
|
|
25
20
|
return (
|
|
26
21
|
<ChartContext.Provider
|
|
27
22
|
value={{
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { SidebarPortal } from '@plone/volto/components';
|
|
3
|
+
import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
|
|
4
|
+
import getSchema from './schema';
|
|
5
|
+
import View from './View';
|
|
6
|
+
import './style.less';
|
|
7
|
+
|
|
8
|
+
const Edit = (props) => {
|
|
9
|
+
const schema = useMemo(() => getSchema(props), [props]);
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<View {...props} mode="edit" />
|
|
14
|
+
|
|
15
|
+
<SidebarPortal selected={props.selected}>
|
|
16
|
+
<BlockDataForm
|
|
17
|
+
schema={schema}
|
|
18
|
+
title={schema.title}
|
|
19
|
+
onChangeField={(id, value) => {
|
|
20
|
+
props.onChangeBlock(props.block, {
|
|
21
|
+
...props.data,
|
|
22
|
+
[id]: value,
|
|
23
|
+
});
|
|
24
|
+
}}
|
|
25
|
+
onChangeBlock={props.onChangeBlock}
|
|
26
|
+
formData={props.data}
|
|
27
|
+
block={props.block}
|
|
28
|
+
/>
|
|
29
|
+
</SidebarPortal>
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default Edit;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import React, { useState, useMemo, useEffect } from 'react';
|
|
2
|
+
import isArray from 'lodash/isArray';
|
|
3
|
+
import isString from 'lodash/isString';
|
|
4
|
+
import Map from '@eeacms/volto-openlayers-map/Map';
|
|
5
|
+
import { Layers, Layer } from '@eeacms/volto-openlayers-map/Layers';
|
|
6
|
+
import { openlayers } from '@eeacms/volto-openlayers-map';
|
|
7
|
+
|
|
8
|
+
// layer definitions
|
|
9
|
+
const smallScaleLayerId = 1;
|
|
10
|
+
const smallScaleMinScale = 0;
|
|
11
|
+
const smallScaleMaxScale = 3000000;
|
|
12
|
+
|
|
13
|
+
const mediumScaleLayerId = 3;
|
|
14
|
+
const mediumScaleMinScale = 2999999;
|
|
15
|
+
const mediumScaleMaxScale = 1000000;
|
|
16
|
+
|
|
17
|
+
const largeScaleLayerId = 4;
|
|
18
|
+
const largeScaleMinScale = 999999;
|
|
19
|
+
const largeScaleMaxScale = 0;
|
|
20
|
+
|
|
21
|
+
const dynamicLayerDefinition = `
|
|
22
|
+
[
|
|
23
|
+
{
|
|
24
|
+
"id":"{layerId}",
|
|
25
|
+
"source":{
|
|
26
|
+
"type":"mapLayer",
|
|
27
|
+
"mapLayerId":"{layerId}"
|
|
28
|
+
},
|
|
29
|
+
"definitionExpression":"cddaCountryCode = '{country}'",
|
|
30
|
+
"drawingInfo":{
|
|
31
|
+
"renderer":{
|
|
32
|
+
"type":"uniqueValue",
|
|
33
|
+
"field1":"cddaCountryCode",
|
|
34
|
+
"uniqueValueInfos":[
|
|
35
|
+
{
|
|
36
|
+
"value":"{country}",
|
|
37
|
+
"label":"{country}",
|
|
38
|
+
"symbol":{
|
|
39
|
+
"color":[40,149,136,100],
|
|
40
|
+
"outline":{
|
|
41
|
+
"color":[40,149,136,100],
|
|
42
|
+
"width": 0.75,
|
|
43
|
+
"type":"esriSLS",
|
|
44
|
+
"style":"esriSLSSolid"
|
|
45
|
+
},
|
|
46
|
+
"type":"esriSFS",
|
|
47
|
+
"style":"esriSFSSolid"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"showLabels":false
|
|
53
|
+
},
|
|
54
|
+
"minScale":{minScale},
|
|
55
|
+
"maxScale":{maxScale}
|
|
56
|
+
}
|
|
57
|
+
]`;
|
|
58
|
+
|
|
59
|
+
const View = (props) => {
|
|
60
|
+
const [sources, setSources] = useState([]);
|
|
61
|
+
const [tiles, setTiles] = useState([]);
|
|
62
|
+
const [extent, setExtent] = useState(null);
|
|
63
|
+
const { proj, source } = openlayers;
|
|
64
|
+
|
|
65
|
+
const country = useMemo(() => {
|
|
66
|
+
const query = (props.properties.data_query || []).filter(
|
|
67
|
+
(query) => query.i === 'iso2',
|
|
68
|
+
)[0];
|
|
69
|
+
if (!query) return null;
|
|
70
|
+
const value = query.v;
|
|
71
|
+
if (isArray(value)) {
|
|
72
|
+
return value[0];
|
|
73
|
+
}
|
|
74
|
+
if (isString(value)) {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}, [props.properties]);
|
|
79
|
+
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
setTiles([
|
|
82
|
+
new source.XYZ({
|
|
83
|
+
url:
|
|
84
|
+
'https://server.arcgisonline.com/ArcGIS/rest/services/' +
|
|
85
|
+
'Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
|
|
86
|
+
}),
|
|
87
|
+
new source.XYZ({
|
|
88
|
+
url:
|
|
89
|
+
'https://server.arcgisonline.com/ArcGIS/rest/services/' +
|
|
90
|
+
'Elevation/World_Hillshade/MapServer/tile/{z}/{y}/{x}',
|
|
91
|
+
}),
|
|
92
|
+
]);
|
|
93
|
+
/* eslint-disable-next-line */
|
|
94
|
+
}, []);
|
|
95
|
+
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
setSources([
|
|
98
|
+
new source.ImageArcGISRest({
|
|
99
|
+
ratio: 1,
|
|
100
|
+
params: {
|
|
101
|
+
LAYERS: `${largeScaleLayerId}`,
|
|
102
|
+
dynamicLayers: dynamicLayerDefinition
|
|
103
|
+
.replace(/(\r\n|\n|\r)/gm, '')
|
|
104
|
+
.replaceAll(' ', '')
|
|
105
|
+
.replaceAll('{country}', country)
|
|
106
|
+
.replaceAll('{layerId}', largeScaleLayerId)
|
|
107
|
+
.replace('{minScale}', largeScaleMinScale)
|
|
108
|
+
.replace('{maxScale}', largeScaleMaxScale),
|
|
109
|
+
},
|
|
110
|
+
url:
|
|
111
|
+
'https://bio.discomap.eea.europa.eu/arcgis/rest/services/ProtectedSites/CDDA_Dyna_WM/MapServer',
|
|
112
|
+
}),
|
|
113
|
+
new source.ImageArcGISRest({
|
|
114
|
+
ratio: 1,
|
|
115
|
+
params: {
|
|
116
|
+
LAYERS: `${mediumScaleLayerId}`,
|
|
117
|
+
dynamicLayers: dynamicLayerDefinition
|
|
118
|
+
.replace(/(\r\n|\n|\r)/gm, '')
|
|
119
|
+
.replaceAll(' ', '')
|
|
120
|
+
.replaceAll('{country}', country)
|
|
121
|
+
.replaceAll('{layerId}', mediumScaleLayerId)
|
|
122
|
+
.replace('{minScale}', mediumScaleMinScale)
|
|
123
|
+
.replace('{maxScale}', mediumScaleMaxScale),
|
|
124
|
+
},
|
|
125
|
+
url:
|
|
126
|
+
'https://bio.discomap.eea.europa.eu/arcgis/rest/services/ProtectedSites/CDDA_Dyna_WM/MapServer',
|
|
127
|
+
}),
|
|
128
|
+
new source.ImageArcGISRest({
|
|
129
|
+
ratio: 1,
|
|
130
|
+
params: {
|
|
131
|
+
LAYERS: `${smallScaleLayerId}`,
|
|
132
|
+
dynamicLayers: dynamicLayerDefinition
|
|
133
|
+
.replace(/(\r\n|\n|\r)/gm, '')
|
|
134
|
+
.replaceAll(' ', '')
|
|
135
|
+
.replaceAll('{country}', country)
|
|
136
|
+
.replaceAll('{layerId}', smallScaleLayerId)
|
|
137
|
+
.replace('{minScale}', smallScaleMinScale)
|
|
138
|
+
.replace('{maxScale}', smallScaleMaxScale),
|
|
139
|
+
},
|
|
140
|
+
url:
|
|
141
|
+
'https://bio.discomap.eea.europa.eu/arcgis/rest/services/ProtectedSites/CDDA_Dyna_WM/MapServer',
|
|
142
|
+
}),
|
|
143
|
+
]);
|
|
144
|
+
fetch(
|
|
145
|
+
`https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/countries/${country}?f=pjson`,
|
|
146
|
+
)
|
|
147
|
+
.then(function (response) {
|
|
148
|
+
return response.json();
|
|
149
|
+
})
|
|
150
|
+
.then(async (data) => {
|
|
151
|
+
const { fromExtent } = await import('ol/geom/Polygon');
|
|
152
|
+
if (data && data.countries.length > 0) {
|
|
153
|
+
const countryInfo = data.countries[0];
|
|
154
|
+
const countryExtent = [
|
|
155
|
+
countryInfo.defaultExtent.xmin,
|
|
156
|
+
countryInfo.defaultExtent.ymin,
|
|
157
|
+
countryInfo.defaultExtent.xmax,
|
|
158
|
+
countryInfo.defaultExtent.ymax,
|
|
159
|
+
];
|
|
160
|
+
|
|
161
|
+
const reprojectedExtent = proj.transformExtent(
|
|
162
|
+
countryExtent,
|
|
163
|
+
'EPSG:4326',
|
|
164
|
+
'EPSG:3857',
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
const polygon = fromExtent(reprojectedExtent);
|
|
168
|
+
polygon.scale(1.2);
|
|
169
|
+
|
|
170
|
+
setExtent(polygon.getExtent());
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
.catch(function () {
|
|
174
|
+
// handle the error
|
|
175
|
+
setExtent(null);
|
|
176
|
+
});
|
|
177
|
+
/* eslint-disable-next-line */
|
|
178
|
+
}, [country]);
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<div className="n2k-country-profile-map">
|
|
182
|
+
<Map
|
|
183
|
+
view={{
|
|
184
|
+
center: [0, 0],
|
|
185
|
+
extent: extent || [
|
|
186
|
+
-6319125.804807394,
|
|
187
|
+
3070702.923644739,
|
|
188
|
+
9584655.106275197,
|
|
189
|
+
12091128.659149397,
|
|
190
|
+
],
|
|
191
|
+
zoom: 2,
|
|
192
|
+
showFullExtent: true,
|
|
193
|
+
}}
|
|
194
|
+
pixelRatio={1}
|
|
195
|
+
>
|
|
196
|
+
<Layers>
|
|
197
|
+
<Layer.Tile source={tiles[1]} zIndex={0} opacity={1} />
|
|
198
|
+
<Layer.Tile source={tiles[0]} zIndex={1} opacity={0.7} />
|
|
199
|
+
<Layer.Image source={sources[0]} zIndex={2} />
|
|
200
|
+
<Layer.Image source={sources[1]} zIndex={2} />
|
|
201
|
+
<Layer.Image source={sources[2]} zIndex={2} />
|
|
202
|
+
</Layers>
|
|
203
|
+
</Map>
|
|
204
|
+
</div>
|
|
205
|
+
);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export default View;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import worldSVG from '@plone/volto/icons/world.svg';
|
|
2
|
+
import Edit from './Edit';
|
|
3
|
+
import View from './View';
|
|
4
|
+
|
|
5
|
+
export default (config) => {
|
|
6
|
+
config.blocks.blocksConfig.cdda_country_profile_map = {
|
|
7
|
+
id: 'cdda_country_profile_map',
|
|
8
|
+
title: 'CDDA country profile map',
|
|
9
|
+
icon: worldSVG,
|
|
10
|
+
group: 'custom_blocks',
|
|
11
|
+
edit: Edit,
|
|
12
|
+
view: View,
|
|
13
|
+
restricted: false,
|
|
14
|
+
mostUsed: false,
|
|
15
|
+
sidebarTab: 1,
|
|
16
|
+
blocks: {},
|
|
17
|
+
security: {
|
|
18
|
+
addPermission: [],
|
|
19
|
+
view: [],
|
|
20
|
+
},
|
|
21
|
+
blockHasOwnFocusManagement: false,
|
|
22
|
+
};
|
|
23
|
+
return config;
|
|
24
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const getSchema = () => {
|
|
2
|
+
return {
|
|
3
|
+
title: 'CDDA country profile map',
|
|
4
|
+
|
|
5
|
+
fieldsets: [
|
|
6
|
+
{
|
|
7
|
+
id: 'default',
|
|
8
|
+
title: 'Default',
|
|
9
|
+
fields: [],
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
|
|
13
|
+
properties: {},
|
|
14
|
+
|
|
15
|
+
required: [],
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default getSchema;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
@type: extra;
|
|
2
|
+
@element: custom;
|
|
3
|
+
|
|
4
|
+
@import (multiple, reference, optional) '../../theme.config';
|
|
5
|
+
|
|
6
|
+
@import 'swiper/swiper.less';
|
|
7
|
+
|
|
8
|
+
@{view} {
|
|
9
|
+
.species-banner-details {
|
|
10
|
+
&::before {
|
|
11
|
+
.full-width();
|
|
12
|
+
position: absolute;
|
|
13
|
+
z-index: -1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.carousel {
|
|
17
|
+
.half-width(960px);
|
|
18
|
+
|
|
19
|
+
@media @mobile {
|
|
20
|
+
width: calc(@pageFullWidth - 2rem) !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@{edit} {
|
|
27
|
+
.species-banner-details {
|
|
28
|
+
&::before {
|
|
29
|
+
.full-width-edit();
|
|
30
|
+
position: absolute;
|
|
31
|
+
z-index: -1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.carousel {
|
|
35
|
+
.half-width-edit(960px);
|
|
36
|
+
|
|
37
|
+
@media @mobile {
|
|
38
|
+
width: calc(@pageFullWidthEdit - 2rem) !important;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
div#view .species-banner-details .ui.container > * {
|
|
45
|
+
margin-top: 0;
|
|
46
|
+
margin-bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.species-banner-details {
|
|
50
|
+
position: relative;
|
|
51
|
+
padding: 0;
|
|
52
|
+
margin-bottom: 1rem;
|
|
53
|
+
color: #fff !important;
|
|
54
|
+
font-family: 'RajdhaniB', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
55
|
+
|
|
56
|
+
&::before {
|
|
57
|
+
display: block;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: #00a390;
|
|
60
|
+
content: '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.species-details {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
|
|
68
|
+
.species-metadata {
|
|
69
|
+
display: flex;
|
|
70
|
+
width: 50%;
|
|
71
|
+
height: 320px !important;
|
|
72
|
+
flex: 0 0 50%;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
word-wrap: break-word;
|
|
76
|
+
|
|
77
|
+
.name {
|
|
78
|
+
margin-top: 0 !important;
|
|
79
|
+
margin-bottom: 0 !important;
|
|
80
|
+
color: #fff !important;
|
|
81
|
+
font-family: inherit;
|
|
82
|
+
|
|
83
|
+
font-family: RajdhaniB, 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
84
|
+
font-size: 54px;
|
|
85
|
+
line-height: 54px;
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
|
|
88
|
+
> * {
|
|
89
|
+
font-family: RajdhaniB, 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
h3 {
|
|
94
|
+
margin-top: 0 !important;
|
|
95
|
+
margin-bottom: 0 !important;
|
|
96
|
+
color: #fff !important;
|
|
97
|
+
font-family: inherit;
|
|
98
|
+
font-size: 32px;
|
|
99
|
+
line-height: 32px;
|
|
100
|
+
text-transform: uppercase;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
h4 {
|
|
104
|
+
margin-top: 0 !important;
|
|
105
|
+
margin-bottom: 0 !important;
|
|
106
|
+
color: #fff !important;
|
|
107
|
+
font-family: inherit;
|
|
108
|
+
font-size: 32px;
|
|
109
|
+
line-height: 32px;
|
|
110
|
+
text-transform: uppercase;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.info,
|
|
114
|
+
.info > * {
|
|
115
|
+
font-family: 'RajdhaniR', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
116
|
+
font-size: 18px;
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
line-height: 18px;
|
|
119
|
+
|
|
120
|
+
a {
|
|
121
|
+
color: #fff;
|
|
122
|
+
|
|
123
|
+
&:hover {
|
|
124
|
+
color: #fff;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.carousel {
|
|
131
|
+
display: flex;
|
|
132
|
+
height: 320px;
|
|
133
|
+
|
|
134
|
+
p {
|
|
135
|
+
font-family: 'RajdhaniB', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
img {
|
|
139
|
+
width: 100%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.one-slide .swiper {
|
|
143
|
+
width: 100%;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.two-slides .swiper {
|
|
147
|
+
width: 50%;
|
|
148
|
+
|
|
149
|
+
@media @mobile {
|
|
150
|
+
width: 100%;
|
|
151
|
+
|
|
152
|
+
&.preview.preview-one {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.three-slides .swiper {
|
|
159
|
+
width: 33.33%;
|
|
160
|
+
|
|
161
|
+
@media @tablet {
|
|
162
|
+
width: 50%;
|
|
163
|
+
|
|
164
|
+
&.preview.preview-two {
|
|
165
|
+
display: none;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media @mobile {
|
|
170
|
+
width: 100%;
|
|
171
|
+
|
|
172
|
+
&.preview.preview-two,
|
|
173
|
+
&.preview.preview-one {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.swiper {
|
|
180
|
+
&.preview .swiper-slide {
|
|
181
|
+
filter: grayscale(100%);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
img {
|
|
185
|
+
display: block;
|
|
186
|
+
width: 100%;
|
|
187
|
+
height: 100%;
|
|
188
|
+
object-fit: cover;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.arrows {
|
|
193
|
+
position: absolute;
|
|
194
|
+
z-index: 2;
|
|
195
|
+
bottom: 0;
|
|
196
|
+
left: 0;
|
|
197
|
+
display: flex;
|
|
198
|
+
width: 100%;
|
|
199
|
+
align-items: center;
|
|
200
|
+
|
|
201
|
+
button {
|
|
202
|
+
padding: 0;
|
|
203
|
+
border: none;
|
|
204
|
+
margin: 0;
|
|
205
|
+
background-color: transparent;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.icon {
|
|
209
|
+
display: block;
|
|
210
|
+
width: 32px;
|
|
211
|
+
background-color: #fff;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
p {
|
|
216
|
+
overflow: hidden;
|
|
217
|
+
width: calc(100% - 64px);
|
|
218
|
+
padding: 0.25rem 0.25rem 0.25rem 1rem;
|
|
219
|
+
margin: 0;
|
|
220
|
+
backdrop-filter: brightness(0.5);
|
|
221
|
+
text-overflow: ellipsis;
|
|
222
|
+
white-space: nowrap;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@media @mobile {
|
|
228
|
+
flex-flow: column;
|
|
229
|
+
|
|
230
|
+
.species-metadata {
|
|
231
|
+
width: 100%;
|
|
232
|
+
margin-top: 2rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.carousel {
|
|
236
|
+
margin: 0 1rem 1rem 1rem;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -60,7 +60,6 @@ const View = (props) => {
|
|
|
60
60
|
/* eslint-disable-next-line */
|
|
61
61
|
}, [vectorSource, site_code?.[0]]);
|
|
62
62
|
|
|
63
|
-
if (__SERVER__ || !vectorSource) return '';
|
|
64
63
|
return (
|
|
65
64
|
<div className="site-shape-wrapper full-width">
|
|
66
65
|
<div className="site-shape">
|
|
@@ -71,9 +70,9 @@ const View = (props) => {
|
|
|
71
70
|
maxZoom: 10,
|
|
72
71
|
minZoom: 10,
|
|
73
72
|
zoom: 10,
|
|
73
|
+
...(options.extent ? { extent: options.extent } : {}),
|
|
74
74
|
}}
|
|
75
75
|
pixelRatio={1}
|
|
76
|
-
{...options}
|
|
77
76
|
>
|
|
78
77
|
<Layers>
|
|
79
78
|
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
@@ -109,7 +109,6 @@ const View = (props) => {
|
|
|
109
109
|
/* eslint-disable-next-line */
|
|
110
110
|
}, [JSON.stringify(activePageResults)]);
|
|
111
111
|
|
|
112
|
-
if (__SERVER__ || !vectorSource) return '';
|
|
113
112
|
return (
|
|
114
113
|
<div className="explore-habitats-wrapper full-width">
|
|
115
114
|
<div className="explore-habitats">
|
|
@@ -118,9 +117,9 @@ const View = (props) => {
|
|
|
118
117
|
center: proj.fromLonLat([20, 50]),
|
|
119
118
|
showFullExtent: true,
|
|
120
119
|
zoom: 5,
|
|
120
|
+
...(options.extent ? { extent: options.extent } : {}),
|
|
121
121
|
}}
|
|
122
122
|
pixelRatio={1}
|
|
123
|
-
{...options}
|
|
124
123
|
>
|
|
125
124
|
<Layers>
|
|
126
125
|
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
@@ -113,9 +113,9 @@ const View = (props) => {
|
|
|
113
113
|
center: proj.fromLonLat([20, 50]),
|
|
114
114
|
showFullExtent: true,
|
|
115
115
|
zoom: 5,
|
|
116
|
+
...(options.extent ? { extent: options.extent } : {}),
|
|
116
117
|
}}
|
|
117
118
|
pixelRatio={1}
|
|
118
|
-
{...options}
|
|
119
119
|
>
|
|
120
120
|
<Layers>
|
|
121
121
|
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
@@ -116,9 +116,9 @@ const View = (props) => {
|
|
|
116
116
|
center: proj.fromLonLat([20, 50]),
|
|
117
117
|
showFullExtent: true,
|
|
118
118
|
zoom: 5,
|
|
119
|
+
...(options.extent ? { extent: options.extent } : {}),
|
|
119
120
|
}}
|
|
120
121
|
pixelRatio={1}
|
|
121
|
-
{...options}
|
|
122
122
|
>
|
|
123
123
|
<Layers>
|
|
124
124
|
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
@@ -69,9 +69,9 @@ const View = (props) => {
|
|
|
69
69
|
center: proj.fromLonLat([20, 50]),
|
|
70
70
|
showFullExtent: true,
|
|
71
71
|
zoom: 5,
|
|
72
|
+
...(options.extent ? { extent: options.extent } : {}),
|
|
72
73
|
}}
|
|
73
74
|
pixelRatio={1}
|
|
74
|
-
{...options}
|
|
75
75
|
>
|
|
76
76
|
<Layers>
|
|
77
77
|
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|
|
@@ -69,9 +69,9 @@ const View = (props) => {
|
|
|
69
69
|
center: proj.fromLonLat([20, 50]),
|
|
70
70
|
showFullExtent: true,
|
|
71
71
|
zoom: 5,
|
|
72
|
+
...(options.extent ? { extent: options.extent } : {}),
|
|
72
73
|
}}
|
|
73
74
|
pixelRatio={1}
|
|
74
|
-
{...options}
|
|
75
75
|
>
|
|
76
76
|
<Layers>
|
|
77
77
|
<Layer.Tile source={tileWMSSources[0]} zIndex={0} />
|