@eeacms/volto-datahub 0.1.8 → 0.1.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 +129 -112
- package/package.json +5 -3
- package/src/components/ItemView/Datasets.jsx +304 -0
- package/src/components/ItemView/ItemView.jsx +27 -274
- package/src/components/ItemView/MetadataSection.jsx +81 -0
- package/src/components/ItemView/MoreLikeThis.jsx +85 -0
- package/src/components/ItemView/icons/services.svg +2 -2
- package/src/components/ItemView/index.js +3 -0
- package/src/components/LandingPage/DatahubLandingPage.jsx +84 -67
- package/src/components/Result/DatahubCardItem.jsx +124 -181
- package/src/config/index.js +1 -1
- package/src/index.js +2 -2
|
@@ -1,62 +1,41 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Portal } from 'react-portal';
|
|
3
|
+
import { useDispatch } from 'react-redux';
|
|
4
|
+
import { Link, useLocation } from 'react-router-dom';
|
|
5
|
+
import { Container, Icon } from 'semantic-ui-react';
|
|
3
6
|
import { Toolbar } from '@plone/volto/components';
|
|
4
7
|
import { BodyClass } from '@plone/volto/helpers';
|
|
5
|
-
import
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
6
9
|
import {
|
|
7
10
|
useResult,
|
|
8
11
|
AppConfigContext,
|
|
9
12
|
SearchContext,
|
|
10
13
|
rebind,
|
|
11
14
|
applyConfigurationSchema,
|
|
15
|
+
DateTime,
|
|
12
16
|
} from '@eeacms/search';
|
|
13
|
-
import { DateTime } from '@eeacms/search';
|
|
14
17
|
import { SearchProvider, WithSearch } from '@elastic/react-search-ui';
|
|
15
18
|
import { Callout, Banner } from '@eeacms/volto-eea-design-system/ui';
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
import {
|
|
20
|
+
MoreLikeThis,
|
|
21
|
+
MetadataSection,
|
|
22
|
+
Datasets,
|
|
23
|
+
} from '@eeacms/volto-datahub/components/ItemView';
|
|
19
24
|
import bannerBG from './banner.svg';
|
|
20
|
-
import servicesSVG from './icons/services.svg';
|
|
21
25
|
|
|
22
26
|
const appName = 'datahub';
|
|
23
27
|
|
|
24
|
-
const SVGIcon = ({ name, size, color, className, title, onClick }) => {
|
|
25
|
-
return (
|
|
26
|
-
<svg
|
|
27
|
-
xmlns={name.attributes && name.attributes.xmlns}
|
|
28
|
-
viewBox={name.attributes && name.attributes.viewBox}
|
|
29
|
-
style={{ height: size, width: 'auto', fill: color || 'currentColor' }}
|
|
30
|
-
className={className ? `icon ${className}` : 'icon'}
|
|
31
|
-
onClick={onClick}
|
|
32
|
-
dangerouslySetInnerHTML={{
|
|
33
|
-
__html: title ? `<title>${title}</title>${name.content}` : name.content,
|
|
34
|
-
}}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
28
|
function ItemView(props) {
|
|
40
|
-
const { docid, location } = props;
|
|
29
|
+
const { docid, location, appConfig } = props;
|
|
41
30
|
const { fromPathname, fromSearch } = location?.state || {};
|
|
42
31
|
const dispatch = useDispatch();
|
|
43
32
|
// const content = useSelector((state) => state.content.data);
|
|
44
33
|
const result = useResult(null, docid);
|
|
45
34
|
const item = result ? result._result : null;
|
|
46
|
-
const { title, description, raw_value
|
|
47
|
-
const { changeDate
|
|
48
|
-
const startTempCoverage = time_coverage?.raw.at(0);
|
|
49
|
-
const endTempCoverage = time_coverage?.raw.at(-1);
|
|
35
|
+
const { title, description, raw_value } = item || {}; // readingTime
|
|
36
|
+
const { changeDate } = raw_value?.raw || {};
|
|
50
37
|
const rawTitle = title?.raw || '';
|
|
51
38
|
|
|
52
|
-
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
53
|
-
|
|
54
|
-
function handleClick(e, titleProps) {
|
|
55
|
-
const { index } = titleProps;
|
|
56
|
-
const newIndex = activeIndex === index ? -1 : index;
|
|
57
|
-
setActiveIndex(newIndex);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
39
|
React.useEffect(() => {
|
|
61
40
|
const handler = async () => {
|
|
62
41
|
if (item) {
|
|
@@ -83,18 +62,6 @@ function ItemView(props) {
|
|
|
83
62
|
handler();
|
|
84
63
|
}, [item, dispatch, docid, rawTitle]);
|
|
85
64
|
|
|
86
|
-
const datasets = React.useMemo(
|
|
87
|
-
() =>
|
|
88
|
-
(children || []).sort(
|
|
89
|
-
(a, b) =>
|
|
90
|
-
new Date(b.publicationDateForResource).getTime() -
|
|
91
|
-
new Date(a.publicationDateForResource).getTime(),
|
|
92
|
-
),
|
|
93
|
-
[children],
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
// console.log('result', result?._result);
|
|
97
|
-
|
|
98
65
|
return item ? (
|
|
99
66
|
<div className="dataset-view">
|
|
100
67
|
<Portal node={document.getElementById('page-header')}>
|
|
@@ -125,11 +92,13 @@ function ItemView(props) {
|
|
|
125
92
|
<div className="dataset-header">
|
|
126
93
|
<h1>{title?.raw}</h1>
|
|
127
94
|
<div className="dataset-header-bottom">
|
|
128
|
-
<span className="header-data">Prod-ID:
|
|
129
|
-
<span className="header-data">
|
|
95
|
+
<span className="header-data">Prod-ID: -</span>
|
|
96
|
+
{/* <span className="header-data">
|
|
130
97
|
Created: <DateTime format="DATE_MED" value={issued?.raw} />
|
|
98
|
+
</span> */}
|
|
99
|
+
<span className="header-data">
|
|
100
|
+
Published: <DateTime format="DATE_MED" value={result.issued} />
|
|
131
101
|
</span>
|
|
132
|
-
<span className="header-data">Published: [No data]</span>
|
|
133
102
|
<span className="header-data">
|
|
134
103
|
Last modified: <DateTime format="DATE_MED" value={changeDate} />
|
|
135
104
|
</span>
|
|
@@ -141,231 +110,11 @@ function ItemView(props) {
|
|
|
141
110
|
|
|
142
111
|
<Callout>{description?.raw}</Callout>
|
|
143
112
|
|
|
144
|
-
{
|
|
145
|
-
<>
|
|
146
|
-
<h2>Data</h2>
|
|
147
|
-
<Accordion>
|
|
148
|
-
{datasets.map((dataset, index) => {
|
|
149
|
-
return (
|
|
150
|
-
<>
|
|
151
|
-
<Accordion.Title
|
|
152
|
-
active={activeIndex === index}
|
|
153
|
-
index={index}
|
|
154
|
-
onClick={handleClick}
|
|
155
|
-
>
|
|
156
|
-
<span className="dataset-title">
|
|
157
|
-
<div>{dataset.resourceTitleObject.default}</div>
|
|
158
|
-
<span>
|
|
159
|
-
{(dataset.format || []).map((item, i) => {
|
|
160
|
-
return <span className="format-label">{item}</span>;
|
|
161
|
-
})}
|
|
162
|
-
</span>
|
|
163
|
-
</span>
|
|
164
|
-
<Icon className="ri-arrow-down-s-line" />
|
|
165
|
-
</Accordion.Title>
|
|
166
|
-
<Accordion.Content active={activeIndex === index}>
|
|
167
|
-
{!!dataset.link && dataset.link.length > 0 ? (
|
|
168
|
-
<List divided relaxed>
|
|
169
|
-
{dataset.link
|
|
170
|
-
.filter((i) => i.protocol === 'WWW:URL')
|
|
171
|
-
.map((item, i) => {
|
|
172
|
-
return (
|
|
173
|
-
<List.Item>
|
|
174
|
-
<List.Content>
|
|
175
|
-
<div className="dataset-item">
|
|
176
|
-
<Icon className="download" />
|
|
177
|
-
<a href={item.url} className="item-link">
|
|
178
|
-
<span>{item.name}</span>
|
|
179
|
-
</a>
|
|
180
|
-
</div>
|
|
181
|
-
</List.Content>
|
|
182
|
-
{item.description && (
|
|
183
|
-
<span
|
|
184
|
-
className="item-description"
|
|
185
|
-
title={item.description}
|
|
186
|
-
>
|
|
187
|
-
{item.description}
|
|
188
|
-
</span>
|
|
189
|
-
)}
|
|
190
|
-
</List.Item>
|
|
191
|
-
);
|
|
192
|
-
})}
|
|
113
|
+
<Datasets item={item} appConfig={appConfig} />
|
|
193
114
|
|
|
194
|
-
|
|
195
|
-
.filter((i) => i.protocol === 'WWW:LINK')
|
|
196
|
-
.map((item, i) => {
|
|
197
|
-
return (
|
|
198
|
-
<List.Item>
|
|
199
|
-
<List.Content>
|
|
200
|
-
<div className="dataset-item">
|
|
201
|
-
<Icon className="download" />
|
|
202
|
-
{item.name ? (
|
|
203
|
-
<a
|
|
204
|
-
href={item.url}
|
|
205
|
-
className="item-link"
|
|
206
|
-
>
|
|
207
|
-
{item.name}
|
|
208
|
-
</a>
|
|
209
|
-
) : (
|
|
210
|
-
<a
|
|
211
|
-
href={item.url}
|
|
212
|
-
className="item-link"
|
|
213
|
-
>
|
|
214
|
-
Download link
|
|
215
|
-
</a>
|
|
216
|
-
)}
|
|
217
|
-
</div>
|
|
218
|
-
</List.Content>
|
|
219
|
-
</List.Item>
|
|
220
|
-
);
|
|
221
|
-
})}
|
|
115
|
+
<MetadataSection item={item} appConfig={appConfig} docid={docid} />
|
|
222
116
|
|
|
223
|
-
|
|
224
|
-
.filter(
|
|
225
|
-
(i) =>
|
|
226
|
-
i.protocol === 'EEA:FILEPATH' ||
|
|
227
|
-
i.protocol === 'EEA:FOLDERPATH',
|
|
228
|
-
)
|
|
229
|
-
.map((item, i) => {
|
|
230
|
-
return (
|
|
231
|
-
<List.Item>
|
|
232
|
-
<List.Content>
|
|
233
|
-
<div className="dataset-item">
|
|
234
|
-
<Icon className="download" />
|
|
235
|
-
<a href={item.url} className="item-link">
|
|
236
|
-
WebDAV: {item.name || item.function}
|
|
237
|
-
</a>
|
|
238
|
-
</div>
|
|
239
|
-
</List.Content>
|
|
240
|
-
</List.Item>
|
|
241
|
-
);
|
|
242
|
-
})}
|
|
243
|
-
|
|
244
|
-
{dataset.link
|
|
245
|
-
.filter(
|
|
246
|
-
(i) =>
|
|
247
|
-
i.protocol === 'ESRI:REST' ||
|
|
248
|
-
i.protocol === 'OGC:WMS',
|
|
249
|
-
)
|
|
250
|
-
.map((item, i) => {
|
|
251
|
-
return (
|
|
252
|
-
<List.Item>
|
|
253
|
-
<List.Content>
|
|
254
|
-
<SVGIcon name={servicesSVG} size="19" />{' '}
|
|
255
|
-
{(item.name || item.description) && (
|
|
256
|
-
<span className="item-protocol">
|
|
257
|
-
{item.protocol}:
|
|
258
|
-
</span>
|
|
259
|
-
)}
|
|
260
|
-
<a className="item-link" href={item.url}>
|
|
261
|
-
{item.name ||
|
|
262
|
-
item.description ||
|
|
263
|
-
item.protocol}
|
|
264
|
-
</a>
|
|
265
|
-
</List.Content>
|
|
266
|
-
</List.Item>
|
|
267
|
-
);
|
|
268
|
-
})}
|
|
269
|
-
|
|
270
|
-
{dataset.link
|
|
271
|
-
.filter((i) => i.protocol.includes('WWW:LINK'))
|
|
272
|
-
.map((item, i) => {
|
|
273
|
-
return (
|
|
274
|
-
<List.Item>
|
|
275
|
-
<List.Content>
|
|
276
|
-
<div className="dataset-item">
|
|
277
|
-
<Icon className="linkify" />
|
|
278
|
-
<a href={item.url} className="item-link">
|
|
279
|
-
<span>{item.name || item.url}</span>
|
|
280
|
-
</a>
|
|
281
|
-
</div>
|
|
282
|
-
</List.Content>
|
|
283
|
-
{item.description && (
|
|
284
|
-
<span className="item-description">
|
|
285
|
-
{item.description}
|
|
286
|
-
</span>
|
|
287
|
-
)}
|
|
288
|
-
</List.Item>
|
|
289
|
-
);
|
|
290
|
-
})}
|
|
291
|
-
|
|
292
|
-
{dataset.resourceType[0] !==
|
|
293
|
-
'nonGeographicDataset' && (
|
|
294
|
-
<List.Item>
|
|
295
|
-
<List.Content>
|
|
296
|
-
<div className="dataset-item">
|
|
297
|
-
<Icon className="file pdf" />
|
|
298
|
-
<a
|
|
299
|
-
className="item-link"
|
|
300
|
-
target="_blank"
|
|
301
|
-
rel="noreferrer"
|
|
302
|
-
href={`https://sdi.eea.europa.eu/catalogue/srv/api/records/${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
303
|
-
>
|
|
304
|
-
PDF Factsheet
|
|
305
|
-
</a>
|
|
306
|
-
</div>
|
|
307
|
-
</List.Content>
|
|
308
|
-
</List.Item>
|
|
309
|
-
)}
|
|
310
|
-
</List>
|
|
311
|
-
) : (
|
|
312
|
-
''
|
|
313
|
-
)}
|
|
314
|
-
</Accordion.Content>
|
|
315
|
-
</>
|
|
316
|
-
);
|
|
317
|
-
})}
|
|
318
|
-
</Accordion>
|
|
319
|
-
</>
|
|
320
|
-
)}
|
|
321
|
-
|
|
322
|
-
{(item?.rod || item?.organisation || time_coverage?.raw.length > 0) && (
|
|
323
|
-
<h2>SDI Metadata Catalogue</h2>
|
|
324
|
-
)}
|
|
325
|
-
{!!item?.rod && (
|
|
326
|
-
<div>
|
|
327
|
-
<h5>Reporting obligations (ROD)</h5>
|
|
328
|
-
<ul>
|
|
329
|
-
{Array.isArray(item.rod?.raw) ? (
|
|
330
|
-
<>
|
|
331
|
-
{item?.rod?.raw.map((item, i) => {
|
|
332
|
-
return <li key={i}>{item}</li>;
|
|
333
|
-
})}
|
|
334
|
-
</>
|
|
335
|
-
) : (
|
|
336
|
-
<li>{item.rod?.raw}</li>
|
|
337
|
-
)}
|
|
338
|
-
</ul>
|
|
339
|
-
</div>
|
|
340
|
-
)}
|
|
341
|
-
{!!item?.organisation && (
|
|
342
|
-
<div>
|
|
343
|
-
<h5>Organisation</h5>
|
|
344
|
-
<ul>
|
|
345
|
-
{Array.isArray(item?.organisation?.raw) ? (
|
|
346
|
-
<>
|
|
347
|
-
{item?.organisation?.raw.map((item, i) => {
|
|
348
|
-
return <li key={i}>{item}</li>;
|
|
349
|
-
})}
|
|
350
|
-
</>
|
|
351
|
-
) : (
|
|
352
|
-
<li>{item?.organisation?.raw}</li>
|
|
353
|
-
)}
|
|
354
|
-
</ul>
|
|
355
|
-
</div>
|
|
356
|
-
)}
|
|
357
|
-
{time_coverage?.raw && time_coverage?.raw.length > 0 && (
|
|
358
|
-
<>
|
|
359
|
-
<h5>Temporal coverage</h5>
|
|
360
|
-
{Array.isArray(time_coverage?.raw) ? (
|
|
361
|
-
<span>
|
|
362
|
-
{startTempCoverage} - {endTempCoverage}
|
|
363
|
-
</span>
|
|
364
|
-
) : (
|
|
365
|
-
<span>{time_coverage?.raw}</span>
|
|
366
|
-
)}
|
|
367
|
-
</>
|
|
368
|
-
)}
|
|
117
|
+
<MoreLikeThis docid={docid} title={title.raw} appConfig={appConfig} />
|
|
369
118
|
</div>
|
|
370
119
|
|
|
371
120
|
{/* <div className="info-wrapper">
|
|
@@ -412,7 +161,11 @@ function DatahubItemView(props) {
|
|
|
412
161
|
return (
|
|
413
162
|
<AppConfigContext.Provider value={appConfigContext}>
|
|
414
163
|
<SearchContext.Provider value={params}>
|
|
415
|
-
<ItemView
|
|
164
|
+
<ItemView
|
|
165
|
+
docid={docid}
|
|
166
|
+
location={location}
|
|
167
|
+
appConfig={appConfig}
|
|
168
|
+
/>
|
|
416
169
|
</SearchContext.Provider>
|
|
417
170
|
</AppConfigContext.Provider>
|
|
418
171
|
);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
const EEA = 'European Environment Agency';
|
|
5
|
+
|
|
6
|
+
const MetadataSection = (props) => {
|
|
7
|
+
const { item, appConfig, docid } = props;
|
|
8
|
+
const { raw_value, organisation, rod } = item || {};
|
|
9
|
+
const { merged_time_coverage_range } = raw_value?.raw || {};
|
|
10
|
+
const org = !!organisation
|
|
11
|
+
? !Array.isArray(organisation?.raw)
|
|
12
|
+
? [organisation?.raw]
|
|
13
|
+
: organisation?.raw
|
|
14
|
+
: [];
|
|
15
|
+
const organisations = org.filter((org) => org !== EEA);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="metadata-wrapper">
|
|
19
|
+
<h2>More information</h2>
|
|
20
|
+
|
|
21
|
+
{!!rod && (
|
|
22
|
+
<div className="metadata-section">
|
|
23
|
+
<h5>Reporting obligations (ROD)</h5>
|
|
24
|
+
|
|
25
|
+
{Array.isArray(rod?.raw) ? (
|
|
26
|
+
<>
|
|
27
|
+
{rod?.raw.map((item, i) => {
|
|
28
|
+
return <div key={i}>{item}</div>;
|
|
29
|
+
})}
|
|
30
|
+
</>
|
|
31
|
+
) : (
|
|
32
|
+
<div>{rod?.raw}</div>
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
|
|
37
|
+
{!!organisations && organisations.length > 0 && (
|
|
38
|
+
<div className="metadata-section">
|
|
39
|
+
<h5>Organisation:</h5>
|
|
40
|
+
|
|
41
|
+
{organisations.map((item, i) => {
|
|
42
|
+
return <div key={i}>{item}</div>;
|
|
43
|
+
})}
|
|
44
|
+
</div>
|
|
45
|
+
)}
|
|
46
|
+
|
|
47
|
+
{merged_time_coverage_range && merged_time_coverage_range?.length > 0 && (
|
|
48
|
+
<div className="metadata-section">
|
|
49
|
+
<h5>Temporal coverage:</h5>
|
|
50
|
+
|
|
51
|
+
{merged_time_coverage_range.map((tc, i) => {
|
|
52
|
+
const tc_start = tc.start || '';
|
|
53
|
+
const tc_end = tc.end || '';
|
|
54
|
+
return (
|
|
55
|
+
<React.Fragment key={i}>
|
|
56
|
+
<span>
|
|
57
|
+
{tc_start === tc_end && tc_start}
|
|
58
|
+
{tc_start !== tc_end && tc_start + ' - ' + tc_end}
|
|
59
|
+
</span>
|
|
60
|
+
{i !== merged_time_coverage_range.length - 1 ? ', ' : ' '}
|
|
61
|
+
</React.Fragment>
|
|
62
|
+
);
|
|
63
|
+
})}
|
|
64
|
+
</div>
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
<div className="pdf-btn">
|
|
68
|
+
<Icon className="file pdf" />
|
|
69
|
+
<a
|
|
70
|
+
target="_blank"
|
|
71
|
+
rel="noreferrer"
|
|
72
|
+
href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
73
|
+
>
|
|
74
|
+
SDI Metadata Factsheet
|
|
75
|
+
</a>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default MetadataSection;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Card } from 'semantic-ui-react';
|
|
3
|
+
import { runRequest, firstWords } from '@eeacms/search';
|
|
4
|
+
|
|
5
|
+
function buildQuery(title, docid) {
|
|
6
|
+
const body = {
|
|
7
|
+
// _source: {
|
|
8
|
+
// include: ['label', 'about', ],
|
|
9
|
+
// },
|
|
10
|
+
size: 3,
|
|
11
|
+
query: {
|
|
12
|
+
bool: {
|
|
13
|
+
must: [
|
|
14
|
+
{
|
|
15
|
+
more_like_this: {
|
|
16
|
+
fields: ['label'],
|
|
17
|
+
like: title,
|
|
18
|
+
min_term_freq: 1,
|
|
19
|
+
min_word_length: 3,
|
|
20
|
+
max_query_terms: 35,
|
|
21
|
+
analyzer: 'english',
|
|
22
|
+
minimum_should_match: '70%',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
must_not: [
|
|
27
|
+
{
|
|
28
|
+
match: {
|
|
29
|
+
about: docid,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
return body;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const MoreLikeThis = (props) => {
|
|
40
|
+
const { docid, title, appConfig } = props;
|
|
41
|
+
|
|
42
|
+
const [similarDocs, setSimilarDocs] = React.useState();
|
|
43
|
+
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
async function getSimilarDocs(docid, title, appConfig) {
|
|
46
|
+
const query_body = buildQuery(title, docid);
|
|
47
|
+
const resp = await runRequest(query_body, appConfig);
|
|
48
|
+
setSimilarDocs(resp.body.hits.hits);
|
|
49
|
+
}
|
|
50
|
+
getSimilarDocs(docid, title, appConfig);
|
|
51
|
+
}, [appConfig, docid, title]);
|
|
52
|
+
|
|
53
|
+
return similarDocs && similarDocs.length > 0 ? (
|
|
54
|
+
<div className="more-like-this">
|
|
55
|
+
<h2>Similar content</h2>
|
|
56
|
+
<div className="section-wrapper">
|
|
57
|
+
<Card.Group itemsPerRow={3}>
|
|
58
|
+
{similarDocs.map((item, i) => {
|
|
59
|
+
return (
|
|
60
|
+
<Card
|
|
61
|
+
href={`/en/datahub/datahubitem-view/${item._source.about}`}
|
|
62
|
+
key={i}
|
|
63
|
+
>
|
|
64
|
+
<Card.Content>
|
|
65
|
+
<Card.Header>
|
|
66
|
+
<span title={item._source.label}>
|
|
67
|
+
{firstWords(item._source.label, 10)}
|
|
68
|
+
</span>
|
|
69
|
+
</Card.Header>
|
|
70
|
+
<Card.Description>
|
|
71
|
+
<span className="card-description">
|
|
72
|
+
{item._source.description}
|
|
73
|
+
</span>
|
|
74
|
+
</Card.Description>
|
|
75
|
+
</Card.Content>
|
|
76
|
+
</Card>
|
|
77
|
+
);
|
|
78
|
+
})}
|
|
79
|
+
</Card.Group>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
) : null;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default MoreLikeThis;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="
|
|
1
|
+
<svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.4305 20.7572C19.9264 19.6657 19.5203 18.2987 19.2496 16.75H15.5792C16.6536 18.6073 18.3727 20.0451 20.4305 20.7572ZM22.2822 19.3693C21.9881 18.634 21.733 17.7495 21.5376 16.75H25.2126C25.0173 17.7495 24.7622 18.634 24.4681 19.3693C24.1236 20.2304 23.7698 20.7762 23.492 21.0699C23.4466 21.1179 23.4077 21.1549 23.3751 21.1833C23.3426 21.1549 23.3037 21.1179 23.2583 21.0699C22.9805 20.7762 22.6267 20.2304 22.2822 19.3693ZM21.1251 12.25C21.1251 13.0302 21.1596 13.7831 21.2232 14.5H25.5271C25.5907 13.7831 25.6251 13.0302 25.6251 12.25C25.6251 11.8681 25.6169 11.4928 25.601 11.125H21.1493C21.1334 11.4928 21.1251 11.8681 21.1251 12.25ZM26.3198 20.7572C26.8239 19.6657 27.23 18.2987 27.5007 16.75H31.1711C30.0967 18.6073 28.3776 20.0451 26.3198 20.7572ZM27.7851 14.5H32.0916C32.2767 13.7808 32.3751 13.0269 32.3751 12.25C32.3751 11.869 32.3515 11.4935 32.3055 11.125H27.8529C27.8676 11.495 27.8751 11.8703 27.8751 12.25C27.8751 13.0205 27.8442 13.773 27.7851 14.5ZM26.3198 3.74275C28.7764 4.59295 30.7503 6.47723 31.7209 8.875H27.6691C27.4162 6.8614 26.9428 5.09177 26.3198 3.74275ZM24.4681 5.13068C24.8683 6.13121 25.1964 7.40798 25.3997 8.875H21.3506C21.5539 7.40798 21.882 6.13121 22.2822 5.13068C22.6267 4.26963 22.9805 3.72382 23.2583 3.43007C23.3037 3.38208 23.3426 3.34507 23.3751 3.3167C23.4077 3.34507 23.4466 3.38208 23.492 3.43007C23.7698 3.72382 24.1236 4.26963 24.4681 5.13068ZM20.4305 3.74275C19.8075 5.09177 19.3341 6.8614 19.0812 8.875H15.0294C15.9999 6.47723 17.9739 4.59295 20.4305 3.74275ZM14.3751 12.25C14.3751 11.869 14.3988 11.4935 14.4448 11.125H18.8974C18.8827 11.495 18.8751 11.8703 18.8751 12.25C18.8751 13.0205 18.9061 13.773 18.9652 14.5H14.6587C14.4736 13.7808 14.3751 13.0269 14.3751 12.25ZM23.3751 1C29.5883 1 34.6251 6.03679 34.6251 12.25C34.6251 18.4632 29.5883 23.5 23.3751 23.5C17.1619 23.5 12.1251 18.4632 12.1251 12.25C12.1251 6.03679 17.1619 1 23.3751 1ZM6.5 25.7499H4.25V32.4999H6.5V25.7499ZM6.5 34.7499C7.13369 34.7499 7.70619 34.488 8.11512 34.0664H9.92915L19.3537 36.6348C19.7879 36.7797 20.4564 36.9378 21.176 36.9855C21.8918 37.0329 22.8217 36.9829 23.6186 36.5433C24.2017 36.2216 25.6743 35.2231 27.2058 34.1618C28.7672 33.0797 30.47 31.8758 31.5618 31.0971L31.5818 31.0829L34.8666 28.5173L34.914 28.4702C35.2257 28.1607 35.5664 27.7154 35.692 27.1128C36.0479 25.4045 34.7208 23.5517 32.7485 23.5517C31.9642 23.5517 31.4022 23.8157 31.0557 23.9785L31.0312 23.99L30.9866 24.0109L25.638 26.8047C25.1022 26.3532 24.409 26.0809 23.6528 26.0809H19.5611L18.9026 25.5083C17.5548 24.2624 15.7461 23.4999 13.7618 23.4999C12.5008 23.4999 11.3092 23.808 10.2617 24.3536H8.26438C7.85225 23.8335 7.21508 23.4999 6.5 23.4999H4.25C3.00736 23.4999 2 24.5073 2 25.7499V32.4999C2 33.7426 3.00736 34.7499 4.25 34.7499H6.5ZM10.2302 31.8164H8.75V26.6036H10.8491L11.1093 26.4541C11.8882 26.0067 12.7929 25.7499 13.7618 25.7499C15.1647 25.7499 16.4372 26.2889 17.3852 27.1697L17.3988 27.1824L18.7197 28.3309H23.6528C23.9678 28.3309 24.2397 28.5037 24.3792 28.7578C24.4415 28.8712 24.4771 29.0008 24.4771 29.1416C24.4771 29.582 24.1155 29.9524 23.6528 29.9524H18.4605C17.8392 29.9524 17.3355 30.456 17.3355 31.0774C17.3355 31.6987 17.8392 32.2024 18.4605 32.2024H23.6528C25.3432 32.2024 26.7271 30.8394 26.7271 29.1416C26.7271 29.0212 26.72 28.9022 26.7063 28.7852L31.9857 26.0275L31.9869 26.027C32.3136 25.8737 32.4871 25.8017 32.7485 25.8017C32.9867 25.8017 33.188 25.9099 33.3296 26.0887C33.4802 26.2789 33.5221 26.4963 33.4893 26.6538C33.4873 26.6635 33.4723 26.7206 33.3686 26.8323L30.2354 29.2795C29.1485 30.0545 27.4656 31.2443 25.9242 32.3125C24.3434 33.4079 22.9883 34.3213 22.5317 34.5732C22.289 34.7071 21.8712 34.7766 21.3248 34.7404C20.8025 34.7058 20.3116 34.5847 20.0464 34.4939L20.0124 34.4823L10.2302 31.8164Z"/>
|
|
3
3
|
</svg>
|