@eeacms/volto-cca-policy 0.1.82 → 0.1.84

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/package.json +1 -1
  3. package/src/components/index.js +2 -0
  4. package/src/components/manage/Blocks/Listing/EventCardsListingView.jsx +167 -0
  5. package/src/components/manage/Blocks/Listing/index.js +8 -0
  6. package/src/components/manage/Blocks/Listing/styles.less +55 -0
  7. package/src/components/theme/BannerTitle/BannerTitle.jsx +38 -0
  8. package/src/components/theme/ImageGallery/ImageGallery.jsx +82 -0
  9. package/src/components/theme/Views/AdaptationOptionView.jsx +102 -88
  10. package/src/components/theme/Views/C3SIndicatorView.jsx +81 -42
  11. package/src/components/theme/Views/CaseStudyView.jsx +91 -79
  12. package/src/components/theme/Views/CcaEventView.jsx +3 -12
  13. package/src/components/theme/Views/EventView.jsx +3 -12
  14. package/src/components/theme/Views/GuidanceView.jsx +38 -48
  15. package/src/components/theme/Views/IndicatorView.jsx +39 -49
  16. package/src/components/theme/Views/InformationPortalView.jsx +23 -40
  17. package/src/components/theme/Views/OrganisationView.jsx +51 -68
  18. package/src/components/theme/Views/ProjectView.jsx +51 -51
  19. package/src/components/theme/Views/PublicationReportView.jsx +17 -25
  20. package/src/components/theme/Views/ToolView.jsx +10 -24
  21. package/src/components/theme/Views/VideoView.jsx +77 -81
  22. package/src/customizations/volto/components/manage/Display/Display.jsx +266 -0
  23. package/src/customizations/volto/components/manage/Display/Readme.md +1 -0
  24. package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +7 -4
  25. package/src/customizations/volto/components/theme/View/DefaultView.jsx +3 -0
  26. package/src/helpers/ContentMetadata.jsx +13 -33
  27. package/src/helpers/Utils.jsx +22 -31
  28. package/src/index.js +0 -1
  29. package/src/policy.js +0 -2
  30. package/src/search/mission_stories/config-stories.js +2 -2
  31. package/theme/extras/header.overrides +1 -0
  32. package/theme/globals/site.overrides +199 -60
  33. package/src/customizations/@eeacms/volto-eea-design-system/ui/Footer/Contact.jsx +0 -36
package/CHANGELOG.md CHANGED
@@ -4,6 +4,48 @@ 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
+ ### [0.1.84](https://github.com/eea/volto-cca-policy/compare/0.1.83...0.1.84) - 28 February 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: image gallery [kreafox - [`758a8f3`](https://github.com/eea/volto-cca-policy/commit/758a8f3d187e44e7782c6bba2e9d98e3f179b559)]
12
+ - fix: remove unused import [kreafox - [`9790189`](https://github.com/eea/volto-cca-policy/commit/97901892059d308a9500f53573ea1f1f0e27a587)]
13
+ - fix: className [kreafox - [`851d7f1`](https://github.com/eea/volto-cca-policy/commit/851d7f1c6ac5ccc338225f18ab33f08b414d517f)]
14
+ - fix: more checks on db items [kreafox - [`e673ca8`](https://github.com/eea/volto-cca-policy/commit/e673ca85fed7ebab6879a3dc8d09f6b80b97fce5)]
15
+ - fix: missing content on c3sindicator view [kreafox - [`0126bb5`](https://github.com/eea/volto-cca-policy/commit/0126bb5ad2653956cd2863e03f66b6f18d9a25c4)]
16
+ - fix: error on missing metadata values [kreafox - [`300849b`](https://github.com/eea/volto-cca-policy/commit/300849b0d4b17d6352290479fdd6458af538aa50)]
17
+
18
+ #### :nail_care: Enhancements
19
+
20
+ - change: remove Footer customization [kreafox - [`b1c2c86`](https://github.com/eea/volto-cca-policy/commit/b1c2c8608eaff77db40cbf1d9158a7a72bd558aa)]
21
+ - change: small updates on db items, cleanup [kreafox - [`0a3981b`](https://github.com/eea/volto-cca-policy/commit/0a3981be1d2761d2bdf5049b0a2cffa1417687bc)]
22
+ - change: update mission stories search index [kreafox - [`3ea7107`](https://github.com/eea/volto-cca-policy/commit/3ea71075e30cb8fa8d5a0b28822ab67ea6c1c7e9)]
23
+ - change: update case study view, add ImageGallery component [kreafox - [`5a83100`](https://github.com/eea/volto-cca-policy/commit/5a83100f76f4f64655561f09e20a516a403dd982)]
24
+ - change: formatting [kreafox - [`00a0baa`](https://github.com/eea/volto-cca-policy/commit/00a0baa225d2e39cc3b75e41a870c23a45a9b62a)]
25
+
26
+ #### :house: Internal changes
27
+
28
+ - style: nonclickable menu [kreafox - [`dc11808`](https://github.com/eea/volto-cca-policy/commit/dc11808c1ca5006713522f152c0d8359a4324ea1)]
29
+ - style: update c3s indicator view [kreafox - [`2007587`](https://github.com/eea/volto-cca-policy/commit/2007587f919d2866ea79b846585c3177e4b905fd)]
30
+
31
+ #### :hammer_and_wrench: Others
32
+
33
+ - Refs #265786 - Fix text Climate-ADAPT in events cards listing. [GhitaB - [`66e5f3d`](https://github.com/eea/volto-cca-policy/commit/66e5f3d6876cae0f6e3e2ebda11fcbd19cc10e5b)]
34
+ - test: update tests for db items view [kreafox - [`ed3af67`](https://github.com/eea/volto-cca-policy/commit/ed3af67da0f535b5dda8616fe8523f286bbca935)]
35
+ - CCA Event, Event view: use BannerTitle. [GhitaB - [`84d1dd6`](https://github.com/eea/volto-cca-policy/commit/84d1dd6e9472de069de8c2d1aedf9f00030e60c8)]
36
+ - WIP: improve layout on DB items, code cleanup [kreafox - [`2f14ad1`](https://github.com/eea/volto-cca-policy/commit/2f14ad1be2b09ddf569b1c9893f113031421d6f5)]
37
+ - WIP: database items view [kreafox - [`4602d76`](https://github.com/eea/volto-cca-policy/commit/4602d762849b2c84cc26af9f528fb11f22618c0f)]
38
+ ### [0.1.83](https://github.com/eea/volto-cca-policy/compare/0.1.82...0.1.83) - 27 February 2024
39
+
40
+ #### :hammer_and_wrench: Others
41
+
42
+ - Refs #265786 - Fix go to contact info (in case of email vs website url). [GhitaB - [`38029dc`](https://github.com/eea/volto-cca-policy/commit/38029dc5bcb21423b8b9edea8aef9627cc06b8a5)]
43
+ - Refs #265786 - Fix go to contact info (in case of email vs website url). [GhitaB - [`4a45be0`](https://github.com/eea/volto-cca-policy/commit/4a45be04c57305874fb38952a354c7fc2e630c10)]
44
+ - Refs #265786 - Event cards listing: fix icon to stay on the same line. [GhitaB - [`d7c32ae`](https://github.com/eea/volto-cca-policy/commit/d7c32aed9d0a66cd618daeb38ae8a8bb9c400be4)]
45
+ - Refs #265786 - Event cards listing: improve styles, add email info and subjects tags. [GhitaB - [`3c92d54`](https://github.com/eea/volto-cca-policy/commit/3c92d54ceb88a4dd28536e99398412e1e4532b8d)]
46
+ - Refs #265786 - Event cards listing: improve styles, improve day display. [GhitaB - [`80b0fe0`](https://github.com/eea/volto-cca-policy/commit/80b0fe047f254483664e5528871e1d51c02830e1)]
47
+ - Refs #265786 - Implement events cards listing variation to be used for listing events. [GhitaB - [`73a77f2`](https://github.com/eea/volto-cca-policy/commit/73a77f2430568f3b20749f77c986720c6a5dab81)]
48
+ - Add Display customization, to avoid crash in homepage [Tiberiu Ichim - [`6e3196b`](https://github.com/eea/volto-cca-policy/commit/6e3196b4298c0ec6adfb73df682b9adfa3cd9fae)]
7
49
  ### [0.1.82](https://github.com/eea/volto-cca-policy/compare/0.1.81...0.1.82) - 24 February 2024
8
50
 
9
51
  #### :house: Internal changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.82",
3
+ "version": "0.1.84",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,2 @@
1
+ export ImageGallery from './theme/ImageGallery/ImageGallery';
2
+ export BannerTitle from './theme/BannerTitle/BannerTitle';
@@ -0,0 +1,167 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { connect } from 'react-redux';
4
+ import { compose } from 'redux';
5
+ import cx from 'classnames';
6
+ import './styles.less';
7
+ import { ConditionalLink } from '@plone/volto/components';
8
+ import { Icon } from 'semantic-ui-react';
9
+ import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
10
+ import { Card, Grid } from 'semantic-ui-react';
11
+ import { Label } from 'semantic-ui-react';
12
+
13
+ const Separator = () => {
14
+ return <div className="sep">&nbsp;&nbsp;⎯&nbsp;&nbsp;</div>;
15
+ };
16
+
17
+ const StartDate = (start) => {
18
+ const start_date = new Date(start);
19
+
20
+ const day = start_date.getDate();
21
+ const monthIndex = start_date.getMonth();
22
+
23
+ const monthNames = [
24
+ 'Jan',
25
+ 'Feb',
26
+ 'Mar',
27
+ 'Apr',
28
+ 'May',
29
+ 'Jun',
30
+ 'Jul',
31
+ 'Aug',
32
+ 'Sep',
33
+ 'Oct',
34
+ 'Nov',
35
+ 'Dec',
36
+ ];
37
+
38
+ const monthName = monthNames[monthIndex];
39
+
40
+ const dayOfWeek = start_date
41
+ .toLocaleDateString('en', { weekday: 'short' })
42
+ .substring(0, 2);
43
+
44
+ return (
45
+ <div className="start-date">
46
+ <p className="day">{dayOfWeek}</p>
47
+ <p className="date">
48
+ {day}.{monthName}.
49
+ </p>
50
+ </div>
51
+ );
52
+ };
53
+
54
+ const EventCardsListingView = ({ items, isEditMode, token }) => {
55
+ const go_to_contact = (contact_info) => {
56
+ if (contact_info.includes('@')) {
57
+ return `mailto:${contact_info}`;
58
+ }
59
+ return contact_info;
60
+ };
61
+
62
+ return (
63
+ <div className={cx('ui fluid eventCards')}>
64
+ {items.map((item, index) => (
65
+ <div
66
+ className={cx('u-item listing-item simple-listing-item')}
67
+ key={item['@id']}
68
+ >
69
+ <div className="wrapper">
70
+ <Card fluid>
71
+ <Card.Content>
72
+ <Grid stackable columns={12}>
73
+ <Grid.Column width={2}>
74
+ {!!item.start && StartDate(item.start)}
75
+ </Grid.Column>
76
+ <Grid.Column width={10}>
77
+ <div className="event-details">
78
+ <h3 className={'listing-header'}>
79
+ <a href={item.event_url}>
80
+ {item.title ? item.title : item.id}
81
+ </a>
82
+ </h3>
83
+ <div className="listing-body-dates">
84
+ {!!item.start && (
85
+ <span className="event-date">
86
+ <Icon className="ri-calendar-line" />
87
+ <When
88
+ start={item.start}
89
+ end={item.end}
90
+ whole_day={true}
91
+ open_end={item.open_end}
92
+ />
93
+ </span>
94
+ )}
95
+ </div>
96
+ <div className="listing-body-dates">
97
+ {!!item['location'] && (
98
+ <span className="event-date">
99
+ <Icon className="map marker alternate" />
100
+ {item['location']}
101
+ </span>
102
+ )}
103
+ </div>
104
+ {item.description && (
105
+ <p className={'listing-description'}>
106
+ {item.description}
107
+ </p>
108
+ )}
109
+ <div className="bottom-info">
110
+ {!!item.subjects && item.subjects.length > 0 && (
111
+ <>
112
+ <div className="subjects">
113
+ {item.subjects.map((tag) => (
114
+ <Label key={tag} size="small">
115
+ {tag}
116
+ </Label>
117
+ ))}
118
+ </div>
119
+
120
+ <Separator />
121
+ </>
122
+ )}
123
+ <div className="source">
124
+ <ConditionalLink item={item} condition={!isEditMode}>
125
+ Climate-ADAPT page for this event
126
+ </ConditionalLink>
127
+ </div>
128
+ {!!item.contact_email && (
129
+ <>
130
+ <Separator />
131
+ <div className="email-info">
132
+ <Icon className="mail" />
133
+ <a
134
+ className="contact_email"
135
+ title=""
136
+ href={go_to_contact(item.contact_email)}
137
+ target="_blank"
138
+ rel="noreferrer"
139
+ >
140
+ {item.contact_email}
141
+ </a>
142
+ </div>
143
+ </>
144
+ )}
145
+ </div>
146
+ </div>
147
+ </Grid.Column>
148
+ </Grid>
149
+ </Card.Content>
150
+ </Card>
151
+ </div>
152
+ </div>
153
+ ))}
154
+ </div>
155
+ );
156
+ };
157
+
158
+ EventCardsListingView.propTypes = {
159
+ items: PropTypes.arrayOf(PropTypes.any).isRequired,
160
+ isEditMode: PropTypes.bool,
161
+ };
162
+
163
+ export default compose(
164
+ connect((state) => ({
165
+ token: state.userSession.token,
166
+ })),
167
+ )(EventCardsListingView);
@@ -1,5 +1,6 @@
1
1
  import OrganisationCardsListingView from './OrganisationCardsListingView';
2
2
  import IndicatorCardsListingView from './IndicatorCardsListingView';
3
+ import EventCardsListingView from './EventCardsListingView';
3
4
 
4
5
  export default function installListing(config) {
5
6
  config.blocks.blocksConfig.listing = {
@@ -20,6 +21,13 @@ export default function installListing(config) {
20
21
  isDefault: false,
21
22
  fullobjects: true,
22
23
  },
24
+ {
25
+ id: 'eventCards',
26
+ title: 'Event Cards',
27
+ template: EventCardsListingView,
28
+ isDefault: false,
29
+ fullobjects: true,
30
+ },
23
31
  ],
24
32
  };
25
33
 
@@ -44,3 +44,58 @@ div.indicatorCards {
44
44
  margin-bottom: 1em !important;
45
45
  }
46
46
  }
47
+
48
+ // Event Cards Listing
49
+ div.eventCards {
50
+ div.simple-listing-item {
51
+ border-bottom: 1px solid #ddd !important;
52
+ }
53
+
54
+ a {
55
+ color: #006bb8 !important;
56
+ }
57
+
58
+ div.start-date {
59
+ max-width: 80px;
60
+
61
+ .day {
62
+ border-bottom: 3px solid #ef7000;
63
+ color: #ef7000;
64
+ font-size: 2.5em;
65
+ font-weight: 900;
66
+ }
67
+
68
+ .date {
69
+ font-size: 1.5em;
70
+ font-weight: 600;
71
+ }
72
+ }
73
+
74
+ div.bottom-info {
75
+ display: flex;
76
+ flex-wrap: wrap;
77
+ align-items: center;
78
+ justify-content: flex-start;
79
+
80
+ .sep {
81
+ position: relative;
82
+ top: -2px;
83
+ color: #ddd;
84
+ }
85
+
86
+ .email-info {
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: flex-start;
90
+ }
91
+
92
+ div.subjects {
93
+ .label {
94
+ margin-right: 0.3em;
95
+ margin-bottom: 0.3em;
96
+ background: #eee;
97
+ color: #3d5265;
98
+ }
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,38 @@
1
+ import config from '@plone/volto/registry';
2
+
3
+ const BannerTitle = (props) => {
4
+ const { content } = props;
5
+ const {
6
+ blocks: { blocksConfig },
7
+ } = config;
8
+ const TitleBlockView = blocksConfig?.title?.view;
9
+ const hasTitleBlock = content?.blocks
10
+ ? Object.keys(content?.blocks).find(
11
+ (id) => content?.blocks?.[id]?.['@type'] === 'title',
12
+ )
13
+ : null;
14
+ const isHomePage =
15
+ ['Subsite', 'LRF', 'Plone Site'].indexOf(content?.['@type']) > -1;
16
+
17
+ return !isHomePage ? (
18
+ <>
19
+ {!hasTitleBlock ? (
20
+ <TitleBlockView
21
+ {...props}
22
+ data={{
23
+ info: [{ description: '' }],
24
+ hideContentType: true,
25
+ hideCreationDate: true,
26
+ hideModificationDate: true,
27
+ hidePublishingDate: true,
28
+ hideDownloadButton: false,
29
+ hideShareButton: false,
30
+ }}
31
+ metadata={content}
32
+ />
33
+ ) : null}
34
+ </>
35
+ ) : null;
36
+ };
37
+
38
+ export default BannerTitle;
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import loadable from '@loadable/component';
3
+ import { Modal, Image } from 'semantic-ui-react';
4
+
5
+ import 'slick-carousel/slick/slick.css';
6
+ import 'slick-carousel/slick/slick-theme.css';
7
+
8
+ const Slider = loadable(() => import('react-slick'));
9
+
10
+ const ImageGallery = (props) => {
11
+ const { items = [] } = props;
12
+
13
+ const [open, setOpen] = React.useState(false);
14
+ const [slideIndex, setSlideIndex] = React.useState(0);
15
+ const [updateCount, setUpdateCount] = React.useState(0);
16
+ const sliderRef = React.useRef(null);
17
+
18
+ const carouselSettings = React.useMemo(
19
+ () => ({
20
+ afterChange: () => setUpdateCount(updateCount + 1),
21
+ beforeChange: (current, next) => setSlideIndex(next),
22
+ infinite: true,
23
+ slidesToShow: 1,
24
+ slidesToScroll: 1,
25
+ dots: false,
26
+ arrows: true,
27
+ adaptiveHeight: true,
28
+ autoplay: false,
29
+ fade: false,
30
+ useTransform: false,
31
+ initialSlide: slideIndex,
32
+ }),
33
+ [slideIndex, updateCount],
34
+ );
35
+
36
+ const handleClick = () => {
37
+ if (items.length) {
38
+ setSlideIndex(0);
39
+ setOpen(true);
40
+ }
41
+ };
42
+
43
+ return (
44
+ <div className="image-gallery">
45
+ <div
46
+ tabIndex={0}
47
+ role="button"
48
+ onKeyDown={handleClick}
49
+ onClick={handleClick}
50
+ >
51
+ <Image
52
+ src={items[0]?.url}
53
+ alt={items[0]?.title}
54
+ className="preview-image"
55
+ />
56
+ </div>
57
+
58
+ <Modal
59
+ closeIcon
60
+ open={open}
61
+ className="slider-modal"
62
+ onClose={() => setOpen(false)}
63
+ onOpen={() => setOpen(true)}
64
+ >
65
+ <Modal.Content>
66
+ <h3>{items[slideIndex]?.title}</h3>
67
+ <p>{items[slideIndex]?.description}</p>
68
+ <Slider {...carouselSettings} ref={sliderRef}>
69
+ {items.map((item, i) => {
70
+ return <Image key={i} src={item.url} alt={item?.title} />;
71
+ })}
72
+ </Slider>
73
+ <div className="slide-image-count">
74
+ <strong>{slideIndex + 1}</strong> of {items.length}
75
+ </div>
76
+ </Modal.Content>
77
+ </Modal>
78
+ </div>
79
+ );
80
+ };
81
+
82
+ export default ImageGallery;
@@ -7,7 +7,9 @@ import {
7
7
  ShareInfo,
8
8
  BannerTitle,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Grid } from 'semantic-ui-react';
10
+ import { Segment, Divider } from 'semantic-ui-react';
11
+ import { UniversalLink } from '@plone/volto/components';
12
+ import cx from 'classnames';
11
13
 
12
14
  function createDataField(type, field, section, title) {
13
15
  return {
@@ -69,21 +71,23 @@ const SectionsMenu = (props) => {
69
71
  const { sections } = props;
70
72
 
71
73
  return (
72
- <>
73
- {sections.length > 0 && (
74
- <>
75
- <h5 className="Adaptation-option-selector">Additional Details</h5>
76
- <ul>
77
- {sections.map((data, index) => (
78
- <li key={index}>
79
- <a href={'#' + sectionID(data.title)}>{data.title}</a>
80
- </li>
81
- ))}
82
- </ul>
83
- </>
84
- )}
85
- <>
86
- <h5 className="Adaptation-option-selector">Reference information</h5>
74
+ <div className="adaptation-details">
75
+ <div>
76
+ {sections.length > 0 && (
77
+ <>
78
+ <h3>Additional Details</h3>
79
+ <ul>
80
+ {sections.map((data, index) => (
81
+ <li key={index}>
82
+ <a href={'#' + sectionID(data.title)}>{data.title}</a>
83
+ </li>
84
+ ))}
85
+ </ul>
86
+ </>
87
+ )}
88
+ </div>
89
+ <div>
90
+ <h3>Reference information</h3>
87
91
  <ul>
88
92
  <li>
89
93
  <a href="#websites">Websites</a>
@@ -92,95 +96,105 @@ const SectionsMenu = (props) => {
92
96
  <a href="#source">Source</a>
93
97
  </li>
94
98
  </ul>
95
- </>
96
- <hr />
97
- </>
99
+ </div>
100
+ </div>
98
101
  );
99
102
  };
100
103
 
101
104
  function AdaptationOptionView(props) {
102
105
  const { content } = props;
106
+ const {
107
+ related_case_studies,
108
+ long_description,
109
+ websites,
110
+ source,
111
+ ipcc_category,
112
+ } = content;
103
113
 
104
114
  const usedSections = dataDisplay.filter((data) =>
105
115
  content?.hasOwnProperty(data.field),
106
116
  );
107
117
 
108
118
  return (
109
- <div className="adaptation-option-view">
119
+ <div className="db-item-view adaptation-option-view">
110
120
  <BannerTitle content={content} type="Adaptation Option" />
111
121
 
112
122
  <div className="ui container">
113
- <Grid columns="12">
114
- <div className="row">
115
- <Grid.Column
116
- mobile={12}
117
- tablet={12}
118
- computer={9}
119
- className="col-left"
120
- >
121
- <HTMLField
122
- value={content.long_description}
123
- className="long_description"
124
- />
125
-
126
- <SectionsMenu sections={usedSections} />
127
-
128
- {content?.ipcc_category?.length > 0 && (
129
- <Fragment>
130
- <h4>Adaptation Details</h4>
131
-
132
- <div id={sectionID('IPCC categories')} className="section">
133
- <h5 className="section-title">IPCC categories</h5>
134
- {content.ipcc_category
135
- .map((item) => item.title)
136
- .sort()
137
- .join(', ')}
138
- {usedSections.length > 0 && (
139
- <>
140
- {usedSections.map((data, index) => (
141
- <Fragment key={index}>
142
- <div id={sectionID(data.title)} className="section">
143
- <h5 className="section-title">{data.title}</h5>
144
- <HTMLField
145
- value={content[data.field]}
146
- className="long_description"
147
- />
148
- </div>
149
- </Fragment>
150
- ))}
151
- </>
152
- )}
153
- </div>
154
- <hr />
155
- </Fragment>
123
+ <HTMLField value={long_description} />
124
+ <SectionsMenu sections={usedSections} />
125
+ <Divider />
126
+
127
+ {content?.ipcc_category?.length > 0 && (
128
+ <Fragment>
129
+ <h2>Adaptation Details</h2>
130
+ <div id={sectionID('IPCC categories')} className="section">
131
+ <h5 className="section-title">IPCC categories</h5>
132
+ {ipcc_category
133
+ .map((item) => item.title)
134
+ .sort()
135
+ .join(', ')}
136
+
137
+ {usedSections.length > 0 && (
138
+ <>
139
+ {usedSections
140
+ .filter((data) => data.field !== 'ipcc_category')
141
+ .map((data, index) => (
142
+ <Fragment key={index}>
143
+ <div id={sectionID(data.title)} className="section">
144
+ <h5 className="section-title">{data.title}</h5>
145
+ <HTMLField value={content[data.field]} />
146
+ </div>
147
+ </Fragment>
148
+ ))}
149
+ </>
156
150
  )}
157
-
158
- <h4>Reference information</h4>
159
-
160
- {content?.websites?.length > 0 && (
161
- <LinksList title="Websites:" value={content.websites} />
162
- )}
163
-
164
- <div id="source" className="section">
165
- <h5>References:</h5>
166
- <HTMLField value={content.source} />
167
- </div>
168
-
169
- <PublishedModifiedInfo {...props} />
170
- <ShareInfo {...props} />
171
- </Grid.Column>
172
- <Grid.Column
173
- mobile={12}
174
- tablet={12}
175
- computer={3}
176
- className="col-right"
177
- >
178
- <div style={{}}>
179
- <ContentMetadata {...props} />
151
+ </div>
152
+ <Divider />
153
+ </Fragment>
154
+ )}
155
+
156
+ <h2>Reference information</h2>
157
+
158
+ {websites && websites?.length > 0 && (
159
+ <LinksList title="Websites:" value={websites} />
160
+ )}
161
+
162
+ <div id="source" className="section">
163
+ <h5 id="source">References:</h5>
164
+ <HTMLField value={source} />
165
+ </div>
166
+
167
+ <PublishedModifiedInfo {...props} />
168
+ <ShareInfo {...props} />
169
+
170
+ <div className="content-box">
171
+ <div className="content-box-inner">
172
+ <Segment>
173
+ <ContentMetadata {...props} />
174
+ </Segment>
175
+
176
+ {related_case_studies?.length > 0 && (
177
+ <div className="content-metadata">
178
+ <Segment>
179
+ <h5>Case studies related to this option</h5>
180
+ <ul
181
+ className={cx('related-case-studies', {
182
+ columned: related_case_studies?.length > 5,
183
+ })}
184
+ >
185
+ {related_case_studies.map((item, index) => (
186
+ <li key={index}>
187
+ <UniversalLink key={index} href={item.url}>
188
+ {item.title}
189
+ </UniversalLink>
190
+ </li>
191
+ ))}
192
+ </ul>
193
+ </Segment>
180
194
  </div>
181
- </Grid.Column>
195
+ )}
182
196
  </div>
183
- </Grid>
197
+ </div>
184
198
  </div>
185
199
  </div>
186
200
  );