design-comuni-plone-theme 12.3.0 → 12.3.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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +17 -0
- package/RELEASE.md +11 -0
- package/package.json +1 -1
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx +27 -2
- package/src/components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +9 -8
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +9 -6
- package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +2 -3
- package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +6 -1
- package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +5 -4
- package/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx +5 -4
- package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault.jsx +6 -4
- package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx +6 -1
- package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateOneForRow.jsx +6 -1
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Edit.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/View.jsx +1 -1
- package/src/config/Slate/Link/deserializer.js +5 -1
- package/src/theme/ItaliaTheme/Blocks/_completeBlockLinkstemplate.scss +5 -8
- package/src/theme/ItaliaTheme/Blocks/_listing.scss +18 -0
- package/src/theme/ItaliaTheme/Components/_card.scss +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [12.3.1](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v12.3.0...v12.3.1) (2025-08-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **a11y:** fixed titles and images attributes ([#973](https://github.com/RedTurtle/design-comuni-plone-theme/issues/973)) ([bd4cdd6](https://github.com/RedTurtle/design-comuni-plone-theme/commit/bd4cdd6bc4b417d1f0f1f6848e08ba346e0e4240))
|
|
9
|
+
* added state to close the date picker modal after endDate loses focus (Tab exit) ([#981](https://github.com/RedTurtle/design-comuni-plone-theme/issues/981)) ([9329f0e](https://github.com/RedTurtle/design-comuni-plone-theme/commit/9329f0e0ecf8b2588e2b44aecd81f541b3333df4))
|
|
10
|
+
* contentHasImage function + showImage conditions ([#985](https://github.com/RedTurtle/design-comuni-plone-theme/issues/985)) ([855779b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/855779bfdae49d87c87842a5632ef067d471c6f2))
|
|
11
|
+
* image in template "Blocco link completo" ([#971](https://github.com/RedTurtle/design-comuni-plone-theme/issues/971)) ([3622357](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3622357abdb17821cad69a17b7110b28db34ce2d))
|
|
12
|
+
* improved link visibility on images within listing blocks ([#978](https://github.com/RedTurtle/design-comuni-plone-theme/issues/978)) ([2beaedc](https://github.com/RedTurtle/design-comuni-plone-theme/commit/2beaedce9c176f81cc399fb938835192b1aa90c9))
|
|
13
|
+
* slate link deserializer convert <a> without href attribute into simple text ([#982](https://github.com/RedTurtle/design-comuni-plone-theme/issues/982)) ([f7acb30](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f7acb30b3513ff5e4c3dbbb16ba924eb2ef486c4))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
* updated publiccode and release log ([598e3e2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/598e3e281838d3bd5124009ffbde811783281dc0))
|
|
19
|
+
|
|
3
20
|
## [12.3.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v12.2.3...v12.3.0) (2025-07-31)
|
|
4
21
|
|
|
5
22
|
|
package/RELEASE.md
CHANGED
|
@@ -41,6 +41,17 @@
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
43
|
|
|
44
|
+
## Versione 12.3.1 (08/08/2025)
|
|
45
|
+
|
|
46
|
+
### Fix
|
|
47
|
+
|
|
48
|
+
- Migliorata l'accessibilità rimuovendo la visibilità delle immagini di presentazione nei blocchi elenco.
|
|
49
|
+
- Sistemata la semantica dei titoli nei blocchi elenco migliorando così l'accessibilità della pagina.
|
|
50
|
+
- Sistemata la visualizzazione delle immagini all’interno della card del blocco Link completo quando sono in landscape.
|
|
51
|
+
- Ripristinata la funzionalità per mostrare tutte le immagini del blocco elenco o solo quelle della prima fila, se presenti.
|
|
52
|
+
- Ora il calendario si chiude automaticamente quando si passa al campo successivo dopo aver selezionato la data di fine, nei blocchi di ricerca dove è possibile indicare una data di inizio e fine.
|
|
53
|
+
- Migliorata la visualizzazione dei link sulle immagini nei blocchi elenco, rimosso testo non necessario con tipo e dimensione dei file
|
|
54
|
+
|
|
44
55
|
## Versione 12.3.0 (31/07/2025)
|
|
45
56
|
|
|
46
57
|
### Novità
|
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: '2025-
|
|
230
|
+
releaseDate: '2025-08-08'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 12.3.
|
|
232
|
+
softwareVersion: 12.3.1
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
2
|
import { useIntl, defineMessages } from 'react-intl';
|
|
3
3
|
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
4
4
|
|
|
@@ -226,6 +226,31 @@ const DateFilter = (props) => {
|
|
|
226
226
|
}
|
|
227
227
|
}, []);
|
|
228
228
|
|
|
229
|
+
const endDateInputRef = useRef(null);
|
|
230
|
+
|
|
231
|
+
useEffect(() => {
|
|
232
|
+
const interval = setInterval(() => {
|
|
233
|
+
const endDateInput = document.querySelector(
|
|
234
|
+
`#end-date-filter-${blockID}`,
|
|
235
|
+
);
|
|
236
|
+
if (endDateInput && !endDateInputRef.current) {
|
|
237
|
+
endDateInputRef.current = endDateInput;
|
|
238
|
+
endDateInput.addEventListener('blur', handleEndDateBlur);
|
|
239
|
+
}
|
|
240
|
+
}, 100);
|
|
241
|
+
|
|
242
|
+
return () => {
|
|
243
|
+
clearInterval(interval);
|
|
244
|
+
if (endDateInputRef.current) {
|
|
245
|
+
endDateInputRef.current.removeEventListener('blur', handleEndDateBlur);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
}, []);
|
|
249
|
+
|
|
250
|
+
const handleEndDateBlur = () => {
|
|
251
|
+
setFocusedDateInput(null);
|
|
252
|
+
};
|
|
253
|
+
|
|
229
254
|
return (
|
|
230
255
|
<div className="me-lg-3 my-2 my-lg-1 filter-wrapper date-filter">
|
|
231
256
|
<DateRangePicker
|
|
@@ -264,7 +289,7 @@ const DateFilter = (props) => {
|
|
|
264
289
|
customCloseIcon={
|
|
265
290
|
<Icon
|
|
266
291
|
icon="it-close"
|
|
267
|
-
color="
|
|
292
|
+
color="black"
|
|
268
293
|
title={intl.formatMessage(messages.clearDates)}
|
|
269
294
|
/>
|
|
270
295
|
}
|
|
@@ -92,7 +92,7 @@ const BandiInEvidenceTemplate = ({
|
|
|
92
92
|
<Col lg={4} sm={6} xs={12} key={index} className="pb-3">
|
|
93
93
|
<Card key={index} className="listing-item card-bg mt-2">
|
|
94
94
|
<CardBody>
|
|
95
|
-
<CardTitle tag=
|
|
95
|
+
<CardTitle tag={title ? 'h3' : 'h2'} className="title">
|
|
96
96
|
<UniversalLink
|
|
97
97
|
className="bando-title"
|
|
98
98
|
item={!isEditMode ? item : null}
|
|
@@ -51,6 +51,7 @@ const CardWithImageDefault = (props) => {
|
|
|
51
51
|
natural_image_size = false,
|
|
52
52
|
id_lighthouse,
|
|
53
53
|
rrule,
|
|
54
|
+
title, // title of entire block
|
|
54
55
|
} = props;
|
|
55
56
|
|
|
56
57
|
const imagesToShow = set_four_columns ? 4 : 3;
|
|
@@ -62,10 +63,9 @@ const CardWithImageDefault = (props) => {
|
|
|
62
63
|
: getEventRecurrenceMore(item, isEditMode);
|
|
63
64
|
const listingText = show_description ? <ListingText item={item} /> : null;
|
|
64
65
|
|
|
65
|
-
const showImage =
|
|
66
|
-
item
|
|
67
|
-
|
|
68
|
-
);
|
|
66
|
+
const showImage =
|
|
67
|
+
contentHasImage(item) && (index < imagesToShow || always_show_image);
|
|
68
|
+
|
|
69
69
|
const category = getCategory(item, show_type, show_section, props);
|
|
70
70
|
const topics = show_topics ? item.tassonomia_argomenti : null;
|
|
71
71
|
|
|
@@ -124,10 +124,11 @@ const CardWithImageDefault = (props) => {
|
|
|
124
124
|
</CardCategory>
|
|
125
125
|
)}
|
|
126
126
|
<CardTitle
|
|
127
|
-
tag=
|
|
128
|
-
className={
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
tag={title ? 'h3' : 'h2'}
|
|
128
|
+
className={cx('', {
|
|
129
|
+
'rassegna-appointment-title': isEventAppointment,
|
|
130
|
+
h3: !title,
|
|
131
|
+
})}
|
|
131
132
|
>
|
|
132
133
|
<UniversalLink
|
|
133
134
|
item={!isEditMode ? item : null}
|
|
@@ -45,6 +45,8 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
45
45
|
rrule,
|
|
46
46
|
} = props;
|
|
47
47
|
|
|
48
|
+
const TitleTag = title ? 'h3' : 'h2';
|
|
49
|
+
|
|
48
50
|
return (
|
|
49
51
|
<div className="card-slide-text-template">
|
|
50
52
|
<Container className="px-4 mt-3">
|
|
@@ -62,7 +64,7 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
62
64
|
const date = hide_dates
|
|
63
65
|
? null
|
|
64
66
|
: getCalendarDate(item, rrule.rrulestr);
|
|
65
|
-
const
|
|
67
|
+
const itemTitle = item?.title || '';
|
|
66
68
|
|
|
67
69
|
const BlockExtraTags = getComponentWithFallback({
|
|
68
70
|
name: 'BlockExtraTags',
|
|
@@ -95,14 +97,15 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
95
97
|
'auto-margin-link': !category && !date,
|
|
96
98
|
})}
|
|
97
99
|
>
|
|
98
|
-
<
|
|
100
|
+
<TitleTag
|
|
99
101
|
className={cx('title', {
|
|
100
|
-
|
|
102
|
+
h3: !title,
|
|
103
|
+
ellipsis: itemTitle.length > 50,
|
|
101
104
|
})}
|
|
102
|
-
title={
|
|
105
|
+
title={itemTitle.length > 50 ? itemTitle : undefined}
|
|
103
106
|
>
|
|
104
|
-
{
|
|
105
|
-
</
|
|
107
|
+
{itemTitle.substring(0, 50)}
|
|
108
|
+
</TitleTag>
|
|
106
109
|
</UniversalLink>
|
|
107
110
|
<div className="box-slide-up">
|
|
108
111
|
{show_description && item.description && (
|
|
@@ -32,7 +32,6 @@ const ListingImage = ({
|
|
|
32
32
|
src={DefaultImageSVG}
|
|
33
33
|
alt=""
|
|
34
34
|
sizes={sizes}
|
|
35
|
-
aria-hidden={true}
|
|
36
35
|
role="presentation"
|
|
37
36
|
className="listing-image responsive"
|
|
38
37
|
style={{
|
|
@@ -55,9 +54,9 @@ const ListingImage = ({
|
|
|
55
54
|
|
|
56
55
|
let commonImageProps = {
|
|
57
56
|
item,
|
|
58
|
-
'aria-hidden': imageProps.alt ||
|
|
57
|
+
'aria-hidden': imageProps.alt || imageCaption ? '' : true,
|
|
59
58
|
alt: imageProps.alt ?? imageCaption ?? '',
|
|
60
|
-
role: imageProps.alt ||
|
|
59
|
+
role: imageProps.alt || imageCaption ? '' : 'presentation',
|
|
61
60
|
className,
|
|
62
61
|
loading,
|
|
63
62
|
responsive,
|
|
@@ -92,7 +92,12 @@ const CompleteBlockLinksTemplate = (props) => {
|
|
|
92
92
|
)}
|
|
93
93
|
<div>
|
|
94
94
|
<CardBody>
|
|
95
|
-
<CardTitle
|
|
95
|
+
<CardTitle
|
|
96
|
+
tag={title ? 'h3' : 'h2'}
|
|
97
|
+
className={cx('text-secondary', {
|
|
98
|
+
h3: !title,
|
|
99
|
+
})}
|
|
100
|
+
>
|
|
96
101
|
{item.title}
|
|
97
102
|
{item['@type'] === 'Link' &&
|
|
98
103
|
!isInternalURL(
|
|
@@ -130,10 +130,11 @@ const InEvidenceTemplate = (props) => {
|
|
|
130
130
|
</CardCategory>
|
|
131
131
|
)}
|
|
132
132
|
<CardTitle
|
|
133
|
-
tag=
|
|
134
|
-
className={
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
tag={title ? 'h3' : 'h2'}
|
|
134
|
+
className={cx('', {
|
|
135
|
+
'rassegna-appointment-title': isEventAppointment,
|
|
136
|
+
h3: !title,
|
|
137
|
+
})}
|
|
137
138
|
>
|
|
138
139
|
<UniversalLink
|
|
139
140
|
item={!isEditMode ? item : null}
|
|
@@ -140,10 +140,11 @@ const RibbonCardTemplate = (props) => {
|
|
|
140
140
|
>
|
|
141
141
|
{date && <div className="dates">{date}</div>}
|
|
142
142
|
<CardTitle
|
|
143
|
-
tag=
|
|
144
|
-
className={
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
tag={title ? 'h3' : 'h2'}
|
|
144
|
+
className={cx('', {
|
|
145
|
+
'rassegna-appointment-title': isEventAppointment,
|
|
146
|
+
h3: !title,
|
|
147
|
+
})}
|
|
147
148
|
>
|
|
148
149
|
<UniversalLink
|
|
149
150
|
item={!isEditMode ? item : null}
|
|
@@ -58,6 +58,7 @@ const SimpleCardDefault = (props) => {
|
|
|
58
58
|
id_lighthouse,
|
|
59
59
|
rrule,
|
|
60
60
|
index,
|
|
61
|
+
title,
|
|
61
62
|
} = props;
|
|
62
63
|
|
|
63
64
|
const getItemClass = (item) => {
|
|
@@ -123,10 +124,11 @@ const SimpleCardDefault = (props) => {
|
|
|
123
124
|
</CardCategory>
|
|
124
125
|
)}
|
|
125
126
|
<CardTitle
|
|
126
|
-
tag=
|
|
127
|
-
className={
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
tag={title ? 'h3' : 'h2'}
|
|
128
|
+
className={cx('', {
|
|
129
|
+
'rassegna-appointment-title': isEventAppointment,
|
|
130
|
+
h3: !title,
|
|
131
|
+
})}
|
|
130
132
|
>
|
|
131
133
|
<UniversalLink
|
|
132
134
|
item={!isEditMode ? item : null}
|
|
@@ -67,7 +67,12 @@ const SimpleCardTemplateCompact = ({
|
|
|
67
67
|
</div>
|
|
68
68
|
)}
|
|
69
69
|
<CardBody>
|
|
70
|
-
<CardTitle
|
|
70
|
+
<CardTitle
|
|
71
|
+
tag={title ? 'h3' : 'h2'}
|
|
72
|
+
className={cx('', {
|
|
73
|
+
h3: !title,
|
|
74
|
+
})}
|
|
75
|
+
>
|
|
71
76
|
<UniversalLink
|
|
72
77
|
item={!isEditMode ? item : null}
|
|
73
78
|
href={isEditMode ? '#' : null}
|
package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateOneForRow.jsx
CHANGED
|
@@ -218,7 +218,12 @@ const SimpleCardTemplateDefaultOneForRow = (props) => {
|
|
|
218
218
|
)}
|
|
219
219
|
</CardCategory>
|
|
220
220
|
)}
|
|
221
|
-
<CardTitle
|
|
221
|
+
<CardTitle
|
|
222
|
+
tag={title ? 'h3' : 'h2'}
|
|
223
|
+
className={cx('', {
|
|
224
|
+
h3: !title,
|
|
225
|
+
})}
|
|
226
|
+
>
|
|
222
227
|
<UniversalLink
|
|
223
228
|
item={!isEditMode ? item : null}
|
|
224
229
|
href={isEditMode ? '#' : null}
|
|
@@ -4,12 +4,16 @@ import { SIMPLELINK } from '@plone/volto-slate/constants';
|
|
|
4
4
|
|
|
5
5
|
export const simpleLinkDeserializer = (editor, el) => {
|
|
6
6
|
let parent = el;
|
|
7
|
-
|
|
8
7
|
let children = Array.from(parent.childNodes)
|
|
9
8
|
.map((el) => deserialize(editor, el))
|
|
10
9
|
.flat();
|
|
11
10
|
|
|
12
11
|
if (!children.length) children = [{ text: '' }];
|
|
12
|
+
|
|
13
|
+
if (el.getAttribute('href') === null) {
|
|
14
|
+
return jsx('text', {}, children);
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
const attrs = {
|
|
14
18
|
type: SIMPLELINK,
|
|
15
19
|
data: {
|
|
@@ -17,14 +17,6 @@
|
|
|
17
17
|
margin: 18px 0px 0px 18px;
|
|
18
18
|
|
|
19
19
|
background-color: $white;
|
|
20
|
-
|
|
21
|
-
.volto-image {
|
|
22
|
-
img {
|
|
23
|
-
width: 100%;
|
|
24
|
-
height: 100%;
|
|
25
|
-
object-fit: cover;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
20
|
}
|
|
29
21
|
|
|
30
22
|
.card.card-bg {
|
|
@@ -52,4 +44,9 @@
|
|
|
52
44
|
.no-external-if-link > .external-link {
|
|
53
45
|
display: none;
|
|
54
46
|
}
|
|
47
|
+
|
|
48
|
+
img.responsive {
|
|
49
|
+
height: 100%;
|
|
50
|
+
object-fit: cover;
|
|
51
|
+
}
|
|
55
52
|
}
|
|
@@ -30,4 +30,22 @@
|
|
|
30
30
|
padding-bottom: 15px;
|
|
31
31
|
border-bottom: 1px solid #455b71;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
//* customizzazione: nascondere enhance-link quando è un'immagine
|
|
35
|
+
.card-with-image-template,
|
|
36
|
+
.in-evidence,
|
|
37
|
+
.contentInEvidenceTemplate,
|
|
38
|
+
.list-template {
|
|
39
|
+
.img-responsive-wrapper {
|
|
40
|
+
.enhance-link {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.small-block-links,
|
|
46
|
+
.contentInEvidenceTemplate {
|
|
47
|
+
.enhance-link {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
33
51
|
}
|