@eeacms/volto-clms-theme 1.0.87 → 1.0.90

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 (27) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/package.json +4 -2
  3. package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockView.jsx +8 -0
  4. package/src/components/Blocks/CclHomeProductsBlock/HomeProductsSchema.js +1 -2
  5. package/src/components/Blocks/CclUseCaseList/CclUseCaseListEdit.jsx +2 -3
  6. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/RightModalFacets.jsx +1 -1
  7. package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +21 -1
  8. package/src/components/CLMSDownloadCartView/cartUtils.js +6 -5
  9. package/src/components/CLMSDownloadCartView/conversion.js +18 -14
  10. package/src/components/CLMSDownloadsView/CLMSDownloadTasks.jsx +11 -0
  11. package/src/components/CLMSDownloadsView/FileCard.jsx +22 -15
  12. package/src/components/CLMSMeetingView/CLMSMeetingEmailView.jsx +2 -1
  13. package/src/components/CLMSMeetingView/CLMSMeetingEmailsView.jsx +2 -1
  14. package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +2 -2
  15. package/src/components/CLMSProfileView/CLMSApiTokensView.jsx +2 -2
  16. package/src/components/CLMSProfileView/CLMSNewsletterSubscriberView.jsx +1 -1
  17. package/src/components/CLMSProfileView/CLMSProfileView.jsx +3 -3
  18. package/src/components/CLMSProfileView/CLMSUserProfileView.jsx +2 -2
  19. package/src/components/CLMSSubscriptionView/subscription_utils.js +3 -3
  20. package/src/components/CclCard/CclCard.jsx +2 -1
  21. package/src/components/CclCard/cards.less +1 -1
  22. package/src/components/CclUtils/dateFormats.js +17 -0
  23. package/src/components/CclUtils/index.js +2 -0
  24. package/src/index.js +8 -0
  25. package/theme/clms/css/carousel.css +8 -0
  26. package/theme/clms/css/home.css +18 -5
  27. package/theme/clms/css/styles.less +14 -0
package/CHANGELOG.md CHANGED
@@ -4,9 +4,43 @@ 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.90](https://github.com/eea/volto-clms-theme/compare/1.0.89...1.0.90)
8
+
9
+ - Bugs n improvements [`#249`](https://github.com/eea/volto-clms-theme/pull/249)
10
+ - Develop [`#248`](https://github.com/eea/volto-clms-theme/pull/248)
11
+ - Cookie banner [`#247`](https://github.com/eea/volto-clms-theme/pull/247)
12
+ - controls [`64daf28`](https://github.com/eea/volto-clms-theme/commit/64daf28cc559f771b5cba2c47279fecf2835cef5)
13
+ - download cart fix [`aebb204`](https://github.com/eea/volto-clms-theme/commit/aebb204f9becf3acd79a05fca2ba7360a3e4be07)
14
+ - Sitemap styles [`1ab825e`](https://github.com/eea/volto-clms-theme/commit/1ab825e269742b6dcb84eb3f13682488947dc92c)
15
+ - Home styles review [`095a499`](https://github.com/eea/volto-clms-theme/commit/095a4997942c526714888560c8a512a3eea4193b)
16
+ - merge [`7a5d037`](https://github.com/eea/volto-clms-theme/commit/7a5d037c4f3349fc05e2292a53a4ec9d85598d5e)
17
+ - bugfix [`fb91b11`](https://github.com/eea/volto-clms-theme/commit/fb91b110ca2bab99eec1a11322f15811439368a5)
18
+ - add cookie banner component [`153c86e`](https://github.com/eea/volto-clms-theme/commit/153c86ece175dc5c14072f21708224db03593286)
19
+ - cookie banner [`4fac45d`](https://github.com/eea/volto-clms-theme/commit/4fac45d5d981a3703947d2f27daaa3c90f2f9088)
20
+
21
+ #### [1.0.89](https://github.com/eea/volto-clms-theme/compare/1.0.88...1.0.89)
22
+
23
+ > 28 March 2022
24
+
25
+ - Date formats [`#246`](https://github.com/eea/volto-clms-theme/pull/246)
26
+ - date formats [`e93f97d`](https://github.com/eea/volto-clms-theme/commit/e93f97dfef7c40a8e5639bac07224989df1f5b11)
27
+ - fix texts [`6ed7d77`](https://github.com/eea/volto-clms-theme/commit/6ed7d77257ff65cf0bb0a076766b3a0b8e572edf)
28
+ - profile tab texts [`d619d74`](https://github.com/eea/volto-clms-theme/commit/d619d74929ab99fba5a86444d04d43fcebded70e)
29
+ - HomeProductBlock [`3d006ef`](https://github.com/eea/volto-clms-theme/commit/3d006ef334ed25de782d073e3e7c5d68e4b2a430)
30
+ - add onclick call to homeproductBlock cards [`fcacfc2`](https://github.com/eea/volto-clms-theme/commit/fcacfc2a7ba6cf31f83e9d390e11eaede1a54a53)
31
+
32
+ #### [1.0.88](https://github.com/eea/volto-clms-theme/compare/1.0.87...1.0.88)
33
+
34
+ > 24 March 2022
35
+
36
+ - cart element format [`#245`](https://github.com/eea/volto-clms-theme/pull/245)
37
+ - fix type changing format [`adf5424`](https://github.com/eea/volto-clms-theme/commit/adf542474f4e62a21bbbb009243438e2a53d2662)
38
+
7
39
  #### [1.0.87](https://github.com/eea/volto-clms-theme/compare/1.0.86...1.0.87)
8
40
 
9
- - images condition for lightGallery rendering [`728b2b3`](https://github.com/eea/volto-clms-theme/commit/728b2b32a1470d61a2eabf7d51ef59ea2b9adc33)
41
+ > 23 March 2022
42
+
43
+ - images condition for lightGallery rendering [`#244`](https://github.com/eea/volto-clms-theme/pull/244)
10
44
 
11
45
  #### [1.0.86](https://github.com/eea/volto-clms-theme/compare/1.0.85...1.0.86)
12
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.87",
3
+ "version": "1.0.90",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -28,9 +28,11 @@
28
28
  "@eeacms/volto-clms-utils",
29
29
  "@eeacms/volto-react-table-widget",
30
30
  "volto-form-block",
31
- "@eeacms/volto-taxonomy"
31
+ "@eeacms/volto-taxonomy",
32
+ "volto-cookie-banner"
32
33
  ],
33
34
  "dependencies": {
35
+ "volto-cookie-banner": "2.1.0",
34
36
  "@eeacms/volto-accordion-block": "3.4.13",
35
37
  "@eeacms/volto-arcgis-block": "*",
36
38
  "@eeacms/volto-clms-utils": "0.1.6",
@@ -10,11 +10,19 @@ const CclHomeProductsBlockView = (props) => {
10
10
  {products?.map((product, index) => (
11
11
  <div
12
12
  key={index}
13
+ role="button"
13
14
  className={
14
15
  product.productIcon === 'iconless'
15
16
  ? 'home-product home-product-main'
16
17
  : 'home-product'
17
18
  }
19
+ tabIndex={0}
20
+ onClick={() => {
21
+ window.location.href = product?.linkSelector || props.path;
22
+ }}
23
+ onKeyDown={() => {
24
+ window.location.href = product?.linkSelector || props.path;
25
+ }}
18
26
  id={product.productIcon === 'iconless' ? '' : product.productIcon}
19
27
  >
20
28
  {product.productIcon === 'iconless' ? (
@@ -53,8 +53,7 @@ export const ProductSchema = () => ({
53
53
  },
54
54
  linkSelector: {
55
55
  title: 'Product link selector',
56
- widget: 'object_browser',
57
- mode: 'link',
56
+ type: 'string',
58
57
  },
59
58
  },
60
59
  required: [],
@@ -7,6 +7,7 @@ import { SidebarPortal } from '@plone/volto/components';
7
7
  import { UseCaseListSchema } from './UseCaseListSchema';
8
8
  import { getProductGroups } from './utils';
9
9
  import { searchContent } from '@plone/volto/actions';
10
+ import { cclDateTimeFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
10
11
 
11
12
  const messages = defineMessages({
12
13
  xUseCases: {
@@ -91,9 +92,7 @@ const CclUseCaseListEdit = (props) => {
91
92
  <span>
92
93
  {useCase.topics.map((topic) => topic.title)}
93
94
  </span>
94
- <span>
95
- {new Date(useCase?.effective).toLocaleDateString()}
96
- </span>
95
+ <span>{cclDateTimeFormat(useCase?.effective)}</span>
97
96
  <span>{useCase.responsibleOrganization}</span>
98
97
  </div>
99
98
  </div>
@@ -137,7 +137,7 @@ const RightModalFacets = (props) => {
137
137
  trigger={
138
138
  <div className="filters-element">
139
139
  <div className="filters-title">
140
- <Icon className="ui" name={filterSVG} size={20} />
140
+ <Icon className="ui" name={filterSVG} size={'20'} />
141
141
  <span className="filters-title-bold">
142
142
  {data.facetsTitle}
143
143
  </span>
@@ -79,6 +79,19 @@ const CLMSCartContent = (props) => {
79
79
  }
80
80
  }, [nutsnames]);
81
81
 
82
+ // useEffect(() => {
83
+ // const type_options = [];
84
+ // if (requestedItem.dataset_download_information?.items.length > 0) {
85
+ // requestedItem.dataset_download_information.items.forEach((item) => {
86
+ // type_options.push({
87
+ // id: item['@id'],
88
+ // name: item.name,
89
+ // full_format: item.full_format,
90
+ // });
91
+ // });
92
+ // }
93
+ // }, [requestedItem]);
94
+
82
95
  function concatRequestedCartItem() {
83
96
  localSessionCart.forEach((localItem) => {
84
97
  const requestedItem = datasets
@@ -239,6 +252,13 @@ const CLMSCartContent = (props) => {
239
252
  (obj) => obj.unique_id === item.unique_id,
240
253
  );
241
254
  cartItems[objIndex].type = data.value;
255
+ const dataset = datasets
256
+ ? datasets.find((req) => req.UID === item.dataset_uid)
257
+ : false;
258
+ const format_item = dataset.dataset_download_information.items.find(
259
+ (item) => item['@id'] === data.value,
260
+ );
261
+ cartItems[objIndex].format = format_item.full_format;
242
262
  setCartItems([...cartItems]);
243
263
  }}
244
264
  />
@@ -359,7 +379,7 @@ const CLMSCartContent = (props) => {
359
379
  <Select
360
380
  placeholder="Select projection"
361
381
  value={item.projection}
362
- options={projections.map((projection) => {
382
+ options={projections?.map((projection) => {
363
383
  return {
364
384
  key: projection,
365
385
  value: projection,
@@ -66,16 +66,17 @@ export const getCartObjectFromMapviewer = (
66
66
  const type_options = [];
67
67
  if (dataset_data.dataset_download_information?.items.length > 0) {
68
68
  dataset_data.dataset_download_information.items.forEach((item) => {
69
- type_options.push({ id: item['@id'], name: item.name });
69
+ type_options.push({
70
+ id: item['@id'],
71
+ name: item.name,
72
+ full_format: item.full_format,
73
+ });
70
74
  });
71
75
  }
72
76
  return {
73
77
  name: dataset_data.title || '-',
74
78
  area: area || '-',
75
- format:
76
- dataset_data.dataset_full_format?.token ||
77
- dataset_data.dataset_full_format ||
78
- '-',
79
+ format: type_options.length > 0 ? type_options[0].full_format : null,
79
80
  resolution: dataset_data.resolution || '-',
80
81
  size: dataset_data.size || '-',
81
82
  source: 'Map viewer',
@@ -1,19 +1,23 @@
1
1
  export const getAvailableConversion = (conversionTable, defaultValue) => {
2
- if (conversionTable[defaultValue] === undefined) {
3
- defaultValue = Object.keys(conversionTable)[0];
2
+ if (conversionTable) {
3
+ if (conversionTable[defaultValue] === undefined) {
4
+ defaultValue = Object.keys(conversionTable)[0];
5
+ }
6
+ const keys = Object.keys(conversionTable[defaultValue]);
7
+ return keys
8
+ .filter((key) => {
9
+ return conversionTable[defaultValue][key];
10
+ })
11
+ .map((item) => {
12
+ return {
13
+ key: item,
14
+ value: item,
15
+ text: item,
16
+ };
17
+ });
18
+ } else {
19
+ return [];
4
20
  }
5
- const keys = Object.keys(conversionTable[defaultValue]);
6
- return keys
7
- .filter((key) => {
8
- return conversionTable[defaultValue][key];
9
- })
10
- .map((item) => {
11
- return {
12
- key: item,
13
- value: item,
14
- text: item,
15
- };
16
- });
17
21
  };
18
22
 
19
23
  export const initializeIfNotCompatibleConversion = (
@@ -75,6 +75,17 @@ const CLMSDownloadTasks = (props) => {
75
75
  return item;
76
76
  })
77
77
  .sort(dynamicSort('-RegistrationDateTime'))
78
+ .filter((item) => {
79
+ var FinalizationDate = new Date(
80
+ Date.parse(item?.FinalizationDateTime),
81
+ );
82
+ var today = new Date();
83
+ var daysDiff = Math.floor(
84
+ (today.getTime() - (FinalizationDate.getTime() || 0)) /
85
+ (1000 * 3600 * 24),
86
+ );
87
+ return daysDiff - 10 > -1;
88
+ })
78
89
  .map((item, key) => (
79
90
  <Grid.Column key={key}>
80
91
  <FileCard
@@ -16,6 +16,8 @@ import errorSVG from '@plone/volto/icons/error.svg';
16
16
  import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
17
17
  import packSVG from '@plone/volto/icons/pack.svg';
18
18
  import removeSVG from '@plone/volto/icons/delete.svg';
19
+ import blockSVG from '@plone/volto/icons/block.svg';
20
+ import { cclDateTimeFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
19
21
 
20
22
  const prettyBytes = require('pretty-bytes');
21
23
 
@@ -55,7 +57,8 @@ const FileCard = (props) => {
55
57
  var FinalizationDate = new Date(Date.parse(item?.FinalizationDateTime));
56
58
  var today = new Date();
57
59
  var daysDiff = Math.floor(
58
- (today.getTime() - FinalizationDate.getTime()) / (1000 * 3600 * 24),
60
+ (today.getTime() - (FinalizationDate.getTime() || 0)) /
61
+ (1000 * 3600 * 24),
59
62
  );
60
63
  }
61
64
 
@@ -68,6 +71,7 @@ const FileCard = (props) => {
68
71
  padded
69
72
  className="filecard"
70
73
  >
74
+ {/* {10 - daysDiff > -1 && ( */}
71
75
  <Grid.Row>
72
76
  <Grid.Column verticalAlign="middle" textAlign="center" width={2}>
73
77
  {['In_progress', 'Queued'].includes(item?.Status) && (
@@ -91,6 +95,20 @@ const FileCard = (props) => {
91
95
  }
92
96
  />
93
97
  )}
98
+ {item?.Status === 'Cancelled' && (
99
+ <Popup
100
+ content="Cancelled"
101
+ size="small"
102
+ trigger={
103
+ <Icon
104
+ name={blockSVG}
105
+ size={50}
106
+ color="#90956e"
107
+ title={'Cancelled'}
108
+ />
109
+ }
110
+ />
111
+ )}
94
112
  {item?.Status === 'Finished_nok' && (
95
113
  <Popup
96
114
  content="Finished with errors"
@@ -127,13 +145,7 @@ const FileCard = (props) => {
127
145
  <Segment basic className="file-datetimes">
128
146
  {item?.RegistrationDateTime && (
129
147
  <>
130
- Start date:
131
- {new Date(item?.RegistrationDateTime).toLocaleString(
132
- 'en-GB',
133
- {
134
- timeZone: 'UTC',
135
- },
136
- )}
148
+ Start date: {cclDateTimeFormat(item?.RegistrationDateTime)}
137
149
  <span
138
150
  className="info-icon"
139
151
  tooltip="Dates and times are in UTC"
@@ -146,13 +158,7 @@ const FileCard = (props) => {
146
158
  )}
147
159
  {item?.FinalizationDateTime && (
148
160
  <>
149
- End date:{' '}
150
- {new Date(item?.FinalizationDateTime).toLocaleString(
151
- 'en-GB',
152
- {
153
- timeZone: 'UTC',
154
- },
155
- )}
161
+ End date: {cclDateTimeFormat(item?.FinalizationDateTime)}
156
162
  <span
157
163
  className="info-icon"
158
164
  tooltip="Dates and times are in UTC"
@@ -232,6 +238,7 @@ const FileCard = (props) => {
232
238
  </Grid.Column>
233
239
  )}
234
240
  </Grid.Row>
241
+ {/* )} */}
235
242
  </Grid>
236
243
  </Segment>
237
244
  );
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { defineMessages, injectIntl } from 'react-intl';
3
3
  import { Header, Segment } from 'semantic-ui-react';
4
4
  import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
5
+ import { cclDateTimeFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
5
6
 
6
7
  export const CLMSMeetingEmailView = (props) => {
7
8
  const { content, intl } = props;
@@ -63,7 +64,7 @@ export const CLMSMeetingEmailView = (props) => {
63
64
  <Header as="h2">{intl.formatMessage(messages.subject)}</Header>
64
65
  <p>{content.subject}</p>
65
66
  <Header as="h2">{intl.formatMessage(messages.modified)}</Header>
66
- <p>{new Date(content.modified).toLocaleDateString()}</p>
67
+ <p>{cclDateTimeFormat(content.modified)}</p>
67
68
  <Header as="h2">{intl.formatMessage(messages.type)}</Header>
68
69
  <p>{content.email_type}</p>
69
70
  <Header as="h2">{intl.formatMessage(messages.body)}</Header>
@@ -5,6 +5,7 @@ import { useDispatch, useSelector } from 'react-redux';
5
5
 
6
6
  import { Pagination } from '@plone/volto/components';
7
7
  import { searchContent } from '@plone/volto/actions';
8
+ import { cclDateTimeFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
8
9
 
9
10
  export const CLMSMeetingEmailsView = (props) => {
10
11
  const { content, intl } = props;
@@ -142,7 +143,7 @@ export const CLMSMeetingEmailsView = (props) => {
142
143
  </td>
143
144
  <td>{email.cc}</td>
144
145
  <td>{email.subject}</td>
145
- <td>{new Date(email.modified).toLocaleDateString()}</td>
146
+ <td>{cclDateTimeFormat(email.modified)}</td>
146
147
  <td>{email.email_type}</td>
147
148
  </tr>
148
149
  ))
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
3
3
  import { hasBlocksData } from '@plone/volto/helpers';
4
4
  import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
5
-
5
+ import { cclDateTimeFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
6
6
  const CLMSNewsItemView = (props) => {
7
7
  const { content } = props;
8
8
  return (
@@ -14,7 +14,7 @@ const CLMSNewsItemView = (props) => {
14
14
  <h1 className="page-title">{content.title}</h1>
15
15
  <div className="news-detail">
16
16
  <div className="news-detail-date">
17
- {new Date(content?.effective).toLocaleDateString()}
17
+ {cclDateTimeFormat(content?.effective)}
18
18
  </div>
19
19
  {content?.image && (
20
20
  <figure className="news-detail-image">
@@ -24,11 +24,11 @@ import {
24
24
  const messages = defineMessages({
25
25
  ApiTokens: {
26
26
  id: 'ApiTokens',
27
- defaultMessage: 'API Tokens',
27
+ defaultMessage: 'API tokens',
28
28
  },
29
29
  title: {
30
30
  id: 'title',
31
- defaultMessage: 'API Token management',
31
+ defaultMessage: 'API token management',
32
32
  },
33
33
  tokenTitleLabel: {
34
34
  id: 'tokenTitleLabel',
@@ -24,7 +24,7 @@ class CLMSNewsletterSubscriberView extends Component {
24
24
  this.handleClick = this.handleClick.bind(this);
25
25
  this.state = {
26
26
  download: false,
27
- headers: [{ label: 'Newsletter Subscribers', key: 'email' }],
27
+ headers: [{ label: 'Newsletter subscribers', key: 'email' }],
28
28
  };
29
29
  }
30
30
  componentDidMount() {
@@ -54,15 +54,15 @@ class CLMSProfileView extends Component {
54
54
  <div className="ccl-container ">
55
55
  {loggedIn && (
56
56
  <CclTabs>
57
- <div tabTitle="USER PROFILE">
57
+ <div tabTitle="User profile">
58
58
  <CLMSUserProfileView />
59
59
  </div>
60
- <div tabTitle="API TOKENS">
60
+ <div tabTitle="API tokens">
61
61
  <CLMSApiTokensView />
62
62
  </div>
63
63
  {(this.props.roles?.includes('Manager') ||
64
64
  this.props.roles?.includes('Site Administrator')) && (
65
- <div tabTitle="NEWSLETTER SUBSCRIBERS">
65
+ <div tabTitle="Newsletter subscribers">
66
66
  <CLMSNewsletterSubscriberView />
67
67
  </div>
68
68
  )}
@@ -19,7 +19,7 @@ import { getUserSchema } from '../../actions';
19
19
  const messages = defineMessages({
20
20
  UserProfile: {
21
21
  id: 'UserProfile',
22
- defaultMessage: 'User Profile',
22
+ defaultMessage: 'User profile',
23
23
  },
24
24
  default: {
25
25
  id: 'Default',
@@ -27,7 +27,7 @@ const messages = defineMessages({
27
27
  },
28
28
  fullnameTitle: {
29
29
  id: 'Full Name',
30
- defaultMessage: 'Full Name',
30
+ defaultMessage: 'Full name',
31
31
  },
32
32
  fullnameDescription: {
33
33
  id: 'Enter full name, e.g. John Smith.',
@@ -1,16 +1,16 @@
1
1
  export const AVAILABLE_SUBSCRIPTIONS = [
2
2
  {
3
- title: 'SUBSCRIBE TO OUR NEWSLETTER',
3
+ title: 'Subscribe to our newsletter',
4
4
  type: 'newsletter',
5
5
  back_url: 'newsletter',
6
6
  },
7
7
  {
8
- title: 'SUBSCRIBE TO OUR NEWS',
8
+ title: 'Subscribe to our news',
9
9
  type: 'news',
10
10
  back_url: 'newsitem',
11
11
  },
12
12
  {
13
- title: 'SUBSCRIBE TO OUR EVENTS',
13
+ title: 'Subscribe to our events',
14
14
  type: 'events',
15
15
  back_url: 'event',
16
16
  },
@@ -11,6 +11,7 @@ import penSVG from '@plone/volto/icons/pen.svg';
11
11
  import { Icon } from '@plone/volto/components';
12
12
 
13
13
  import PlaceHolder from '@eeacms/volto-clms-theme/../theme/clms/img/ccl-thumbnail-placeholder.jpg';
14
+ import { cclDateTimeFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
14
15
 
15
16
  const CardImage = ({ card, size = 'preview', isCustomCard }) => {
16
17
  return card?.image_field ? (
@@ -180,7 +181,7 @@ function CclCard(props) {
180
181
  {/* <CardLink url={url} title={card?.title} /> */}
181
182
  </div>
182
183
  <div className="card-news-date">
183
- {new Date(card?.effective).toLocaleString()}
184
+ {cclDateTimeFormat(card?.effective)}
184
185
  </div>
185
186
  <p className="card-news-description">{card?.description}</p>
186
187
  </div>
@@ -331,7 +331,7 @@
331
331
  font-weight: bold;
332
332
  }
333
333
 
334
- .card-event-when-text p {
334
+ .card-event .card-event-when-text p {
335
335
  margin-bottom: 0;
336
336
  font-size: 1rem;
337
337
  }
@@ -0,0 +1,17 @@
1
+ export const cclDateTimeFormat = (date) => {
2
+ const dateObj = new Date(date);
3
+ const day = ('0' + dateObj.getDate()).slice(-2);
4
+ const month = ('0' + (dateObj.getMonth() + 1)).slice(-2);
5
+ const year = dateObj.getFullYear();
6
+ const hours = ('0' + dateObj.getHours()).slice(-2);
7
+ const minutes = ('0' + dateObj.getMinutes()).slice(-2);
8
+ return `${day}.${month}.${year} ${hours}.${minutes}`;
9
+ };
10
+
11
+ export const cclDateFormat = (date) => {
12
+ const dateObj = new Date(date);
13
+ const day = dateObj.getDate();
14
+ const month = ('0' + (dateObj.getMonth() + 1)).slice(-2);
15
+ const year = dateObj.getFullYear();
16
+ return `${day}.${month}.${year}`;
17
+ };
@@ -1,3 +1,5 @@
1
1
  import StringToHTML from './StringToHTML';
2
2
 
3
3
  export { StringToHTML };
4
+
5
+ export { cclDateFormat, cclDateTimeFormat } from './dateFormats';
package/src/index.js CHANGED
@@ -36,6 +36,7 @@ import ProductComponentsWidget from './components/Widgets/ProductComponentsWidge
36
36
  import TextLinkWidget from './components/Widgets/TextLinkWidget';
37
37
 
38
38
  import reducers from './reducers';
39
+ import CookieBanner from 'volto-cookie-banner/CookieBannerContainer';
39
40
 
40
41
  const applyConfig = (config) => {
41
42
  config.views = {
@@ -80,6 +81,13 @@ const applyConfig = (config) => {
80
81
  };
81
82
  config.settings = {
82
83
  ...config.settings,
84
+ appExtras: [
85
+ ...config.settings.appExtras,
86
+ {
87
+ match: '*',
88
+ component: CookieBanner,
89
+ },
90
+ ],
83
91
  nonContentRoutes: [
84
92
  ...config.settings.nonContentRoutes,
85
93
  '/profile',
@@ -220,6 +220,14 @@
220
220
  content: '\e913';
221
221
  }
222
222
 
223
+ .tabs-block .slick-arrows .slick-arrow.slick-prev {
224
+ transform: translate(1rem,-50%);
225
+ }
226
+
227
+ .tabs-block .slick-arrows .slick-arrow.slick-next {
228
+ transform: translate(-1rem,-50%);
229
+ }
230
+
223
231
  /* Dots */
224
232
  .slick-dotted.slick-slider {
225
233
  margin-bottom: 0;
@@ -120,14 +120,14 @@
120
120
  }
121
121
 
122
122
  .home-carousel .ccl-banner-top-main {
123
- padding: 4rem 2rem;
123
+ padding: 4rem 4rem;
124
124
  background-position: center;
125
125
  background-repeat: no-repeat;
126
126
  background-size: cover;
127
127
  }
128
128
  @media (max-width: 480px) {
129
129
  .home-carousel .ccl-banner-top-main {
130
- padding: 2rem 1rem;
130
+ padding: 2rem 2rem;
131
131
  }
132
132
  }
133
133
 
@@ -318,13 +318,22 @@
318
318
 
319
319
  /* Map band */
320
320
  .home-map-container {
321
- padding: 4rem 2rem;
321
+ padding: 4rem 1rem;
322
322
  background: url(../img/home-map-background.jpg) no-repeat center;
323
323
  background-size: cover;
324
324
  }
325
+
326
+ .home-map-container > .ccl-container {
327
+ padding: 0 2rem;
328
+ }
329
+
325
330
  @media (max-width: 480px) {
326
331
  .home-map-container {
327
- padding: 2rem 1rem;
332
+ padding: 3rem 1rem;
333
+ }
334
+
335
+ .home-map-container > .ccl-container {
336
+ padding: 0;
328
337
  }
329
338
  }
330
339
 
@@ -345,10 +354,14 @@
345
354
 
346
355
  /* Meet band */
347
356
  .home-meet-container {
348
- padding: 3rem 3rem;
357
+ padding: 3rem 1rem;
349
358
  padding-bottom: 6rem;
350
359
  }
351
360
 
361
+ .home-meet-container > .ccl-container {
362
+ padding: 0 2rem;
363
+ }
364
+
352
365
  .ccl-container > .ccl-button {
353
366
  float: right;
354
367
  }
@@ -1164,3 +1164,17 @@ div#page-document h1.documentFirstHeading {
1164
1164
  .block-editor-accordion > .block-toolbar {
1165
1165
  z-index: 1 !important;
1166
1166
  }
1167
+
1168
+ /*Sitemap*/
1169
+ #page-sitemap ul li {
1170
+ margin-left: 2rem;
1171
+ line-height: 2.25rem;
1172
+ }
1173
+
1174
+ #page-sitemap ul > li {
1175
+ margin-bottom: 1rem;
1176
+ }
1177
+
1178
+ #page-sitemap ul > li > ul > li {
1179
+ margin-bottom: 0;
1180
+ }