design-comuni-plone-theme 8.7.12 → 8.8.1
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 +32 -0
- package/RELEASE.md +6 -0
- package/package.json +1 -1
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +8 -8
- package/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx +5 -0
- package/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx +5 -0
- package/src/components/ItaliaTheme/GalleryPreview/GalleryPreview.jsx +15 -10
- package/src/components/ItaliaTheme/View/Commons/Gallery.jsx +15 -2
- package/src/theme/ItaliaTheme/Blocks/_rssBlock.scss +17 -0
- package/src/theme/ItaliaTheme/Views/_common.scss +5 -0
- package/src/theme/ItaliaTheme/Views/_slider.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [8.8.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.8.0...v8.8.1) (2023-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* fix gallery preview image ([f2ddb87](https://github.com/redturtle/design-comuni-plone-theme/commit/f2ddb8798fcdd88cc003791c483240f4d95e3880))
|
|
9
|
+
* fix slider dr dots margin ([8e24914](https://github.com/redturtle/design-comuni-plone-theme/commit/8e2491430c7951cbc87fcf30cb860c1ae0f55460))
|
|
10
|
+
* RSS template div source moved inside condition and changed release.md ([#386](https://github.com/redturtle/design-comuni-plone-theme/issues/386)) ([200fefa](https://github.com/redturtle/design-comuni-plone-theme/commit/200fefad7b0c7596cdcb3109ef5962d53b643626))
|
|
11
|
+
* source added for rss single card ([#384](https://github.com/redturtle/design-comuni-plone-theme/issues/384)) ([669f165](https://github.com/redturtle/design-comuni-plone-theme/commit/669f16575e93944a354119aff4a6dd4ba9cf58b8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Maintenance
|
|
15
|
+
|
|
16
|
+
* preparing release 8.8.1 ([d12c618](https://github.com/redturtle/design-comuni-plone-theme/commit/d12c61899c0cd5b658e6fa38234f90a029b1786c))
|
|
17
|
+
|
|
18
|
+
## [8.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.7.12...v8.8.0) (2023-10-31)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* added id and title_it adttrs and handled h2 title_type in Gallery component ([4d5949e](https://github.com/redturtle/design-comuni-plone-theme/commit/4d5949eb2393f442e6541637e89123153606279e))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* fixed image url in Photogallery listing popup ([#383](https://github.com/redturtle/design-comuni-plone-theme/issues/383)) ([b8d2e20](https://github.com/redturtle/design-comuni-plone-theme/commit/b8d2e207cdefd018824229975ac0f5ac0bdb8d0c))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Maintenance
|
|
32
|
+
|
|
33
|
+
* preparing release ([2e6d0a5](https://github.com/redturtle/design-comuni-plone-theme/commit/2e6d0a56ddd96ecbf48e68e03fcc3caf061ceb55))
|
|
34
|
+
|
|
3
35
|
## [8.7.12](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.7.11...v8.7.12) (2023-10-27)
|
|
4
36
|
|
|
5
37
|
|
package/RELEASE.md
CHANGED
package/package.json
CHANGED
package/publiccode.yml
CHANGED
|
@@ -227,9 +227,9 @@ maintenance:
|
|
|
227
227
|
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
|
|
228
228
|
platforms:
|
|
229
229
|
- web
|
|
230
|
-
releaseDate: '2023-
|
|
230
|
+
releaseDate: '2023-11-03'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 8.
|
|
232
|
+
softwareVersion: 8.8.1
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
} from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
11
11
|
import React, { useRef, useState } from 'react';
|
|
12
12
|
import { defineMessages, useIntl } from 'react-intl';
|
|
13
|
-
|
|
14
|
-
import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg';
|
|
15
13
|
import { GalleryPreview } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
16
14
|
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
17
15
|
import PropTypes from 'prop-types';
|
|
@@ -139,12 +137,14 @@ const PhotogalleryTemplate = ({
|
|
|
139
137
|
|
|
140
138
|
const getCaption = (item) => item.description ?? item.rights ?? null;
|
|
141
139
|
|
|
142
|
-
const figure = (image, item) =>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
const figure = (image, item) => {
|
|
141
|
+
return (
|
|
142
|
+
<figure className="img-wrapper">
|
|
143
|
+
{image}
|
|
144
|
+
{getCaption(item) && <figcaption>{getCaption(item)}</figcaption>}
|
|
145
|
+
</figure>
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
148
|
|
|
149
149
|
return (
|
|
150
150
|
<div className="photogallery">
|
|
@@ -83,6 +83,11 @@ const CardWithImageRssTemplate = ({
|
|
|
83
83
|
</span>{' '}
|
|
84
84
|
</div>
|
|
85
85
|
<CardTitle tag="h6">{item.title}</CardTitle>
|
|
86
|
+
{item?.source?.length > 0 && (
|
|
87
|
+
<div className="source-title">
|
|
88
|
+
<span className="source">{item.source}</span>
|
|
89
|
+
</div>
|
|
90
|
+
)}
|
|
86
91
|
</CardBody>
|
|
87
92
|
<CardReadMore
|
|
88
93
|
iconName="it-arrow-right"
|
|
@@ -71,6 +71,11 @@ const CardWithoutImageRssTemplate = ({
|
|
|
71
71
|
)}
|
|
72
72
|
</div>
|
|
73
73
|
<CardTitle tag="h5">{item.title}</CardTitle>
|
|
74
|
+
{item?.source?.length > 0 && (
|
|
75
|
+
<div className="source-title">
|
|
76
|
+
<span className="source">{item.source}</span>
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
74
79
|
<CardText tag="p" className="font-serif">
|
|
75
80
|
{item.contentSnippet}
|
|
76
81
|
</CardText>
|
|
@@ -3,7 +3,6 @@ import { defineMessages, useIntl } from 'react-intl';
|
|
|
3
3
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
4
4
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
|
|
7
6
|
import { Modal, ModalBody, Button, ModalHeader } from 'design-react-kit';
|
|
8
7
|
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
9
8
|
import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg';
|
|
@@ -33,6 +32,16 @@ const messages = defineMessages({
|
|
|
33
32
|
const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
|
|
34
33
|
const intl = useIntl();
|
|
35
34
|
const [modalIsOpen, setModalIsOpen] = useState(false);
|
|
35
|
+
const image = items[viewIndex];
|
|
36
|
+
|
|
37
|
+
let checkUrlImage = image.image_field
|
|
38
|
+
? image.image_scales?.[image.image_field]?.[0]?.scales?.larger?.download
|
|
39
|
+
: image?.image?.scales?.larger?.download ||
|
|
40
|
+
image?.image_scales?.image[0]?.scales?.larger?.download;
|
|
41
|
+
|
|
42
|
+
if (checkUrlImage?.startsWith('@@')) {
|
|
43
|
+
checkUrlImage = image['@id'] + '/' + checkUrlImage;
|
|
44
|
+
}
|
|
36
45
|
|
|
37
46
|
const closeModal = () => {
|
|
38
47
|
setViewIndex(null);
|
|
@@ -69,12 +78,10 @@ const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
|
|
|
69
78
|
closeAriaLabel={intl.formatMessage(messages.close_preview)}
|
|
70
79
|
toggle={closeModal}
|
|
71
80
|
>
|
|
72
|
-
{
|
|
81
|
+
{image.title}
|
|
73
82
|
</ModalHeader>
|
|
74
83
|
<ModalBody>
|
|
75
|
-
{
|
|
76
|
-
<p className="pb-3">{items[viewIndex].description}</p>
|
|
77
|
-
)}
|
|
84
|
+
{image.description && <p className="pb-3">{image.description}</p>}
|
|
78
85
|
<div className="item-preview">
|
|
79
86
|
{items.length > 1 && (
|
|
80
87
|
<Button
|
|
@@ -92,13 +99,11 @@ const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
|
|
|
92
99
|
</Button>
|
|
93
100
|
)}
|
|
94
101
|
<div className="image">
|
|
95
|
-
{
|
|
102
|
+
{checkUrlImage ? (
|
|
96
103
|
<img
|
|
97
|
-
src={flattenToAppURL(
|
|
98
|
-
items[viewIndex].image.scales.larger.download,
|
|
99
|
-
)}
|
|
104
|
+
src={flattenToAppURL(checkUrlImage)}
|
|
100
105
|
loading="lazy"
|
|
101
|
-
alt={
|
|
106
|
+
alt={image.title}
|
|
102
107
|
/>
|
|
103
108
|
) : (
|
|
104
109
|
<img src={DefaultImageSVG} alt="" />
|
|
@@ -36,8 +36,10 @@ const messages = defineMessages({
|
|
|
36
36
|
const Gallery = ({
|
|
37
37
|
content,
|
|
38
38
|
folder_name,
|
|
39
|
+
id = '',
|
|
39
40
|
title,
|
|
40
41
|
title_type = 'h4',
|
|
42
|
+
title_id = 'galleria',
|
|
41
43
|
title_video,
|
|
42
44
|
className = '',
|
|
43
45
|
reactSlick,
|
|
@@ -121,12 +123,23 @@ const Gallery = ({
|
|
|
121
123
|
{images?.length > 0 ? (
|
|
122
124
|
<div
|
|
123
125
|
className={`it-carousel-wrapper it-carousel-landscape-abstract-three-cols ${className}`}
|
|
126
|
+
id={id}
|
|
124
127
|
>
|
|
125
128
|
<div className="slider-container">
|
|
126
129
|
<div className="it-header-block">
|
|
127
130
|
<div className="it-header-block-title">
|
|
128
|
-
{title_type === '
|
|
129
|
-
|
|
131
|
+
{title_type === 'h2' && (
|
|
132
|
+
<h2 id={title_id} className="mb-3 h4">
|
|
133
|
+
{gallery_title}
|
|
134
|
+
</h2>
|
|
135
|
+
)}
|
|
136
|
+
{title_type === 'h3' && (
|
|
137
|
+
<h3 id={title_id} className="h5">
|
|
138
|
+
{gallery_title}
|
|
139
|
+
</h3>
|
|
140
|
+
)}
|
|
141
|
+
{title_type === 'h4' && <h4 id={title_id}>{gallery_title}</h4>}
|
|
142
|
+
{title_type === 'h5' && <h5 id={title_id}>{gallery_title}</h5>}
|
|
130
143
|
</div>
|
|
131
144
|
</div>
|
|
132
145
|
<div className="it-carousel-all it-card-bg">
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
.rssBlock {
|
|
2
|
+
.card {
|
|
3
|
+
.card-body {
|
|
4
|
+
.source-title {
|
|
5
|
+
font-size: $card-category-size;
|
|
6
|
+
text-transform: uppercase;
|
|
7
|
+
color: $card-p-color;
|
|
8
|
+
margin-bottom: $card-category-m-bottom;
|
|
9
|
+
.source {
|
|
10
|
+
font-weight: bold;
|
|
11
|
+
letter-spacing: $card-category-l-spacing;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
1
18
|
#text-body {
|
|
2
19
|
.rssBlock {
|
|
3
20
|
.row > * {
|
|
@@ -294,6 +294,11 @@ div.sticky-wrapper {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
#view .it-carousel-wrapper .it-header-block .it-header-block-title h2.h4 {
|
|
298
|
+
border-bottom: none;
|
|
299
|
+
padding-bottom: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
297
302
|
form.ui.form.vertical-form fieldset.invisible {
|
|
298
303
|
min-width: 0;
|
|
299
304
|
}
|