design-comuni-plone-theme 11.26.5 → 11.27.0
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 +29 -0
- package/RELEASE.md +16 -0
- package/locales/de/LC_MESSAGES/volto.po +94 -0
- package/locales/en/LC_MESSAGES/volto.po +95 -1
- package/locales/es/LC_MESSAGES/volto.po +94 -0
- package/locales/fr/LC_MESSAGES/volto.po +94 -0
- package/locales/it/LC_MESSAGES/volto.po +94 -0
- package/locales/volto.pot +95 -1
- package/package.json +1 -1
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +1 -0
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +23 -14
- package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +17 -4
- package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +4 -3
- package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +0 -3
- package/src/components/ItaliaTheme/Cards/CardPersona.jsx +1 -1
- package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +9 -1
- package/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +9 -1
- package/src/components/ItaliaTheme/Header/HeaderSearch/SearchModal.jsx +10 -1
- package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +15 -2
- package/src/components/ItaliaTheme/Header/HeaderSlim/TertiaryMenu.jsx +1 -1
- package/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +14 -1
- package/src/components/ItaliaTheme/SkipLinks/SkipLinks.jsx +9 -1
- package/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +19 -1
- package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeader.jsx +3 -4
- package/src/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx +14 -1
- package/src/components/ItaliaTheme/View/Commons/RelatedItems.jsx +5 -1
- package/src/components/ItaliaTheme/View/Commons/SideMenu.jsx +10 -6
- package/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +20 -1
- package/src/components/ItaliaTheme/View/EventoView/EventoView.jsx +20 -1
- package/src/components/ItaliaTheme/View/FAQ/FaqFolder/SearchBar.jsx +2 -0
- package/src/components/ItaliaTheme/View/NewsItemView/NewsItemView.jsx +19 -1
- package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks.jsx +14 -1
- package/src/components/ItaliaTheme/View/PersonaView/PersonaView.jsx +20 -1
- package/src/components/ItaliaTheme/View/ServizioView/ServizioView.jsx +19 -2
- package/src/components/ItaliaTheme/View/UOView/UOView.jsx +20 -1
- package/src/components/ItaliaTheme/View/VenueView/VenueView.jsx +24 -11
- package/src/components/SelectInput/SelectInput.jsx +2 -1
- package/src/components/TextInput.jsx +1 -0
- package/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js +1 -6
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +5 -2
- package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +16 -2
- package/src/customizations/volto/helpers/FormValidation/FormValidation.js +8 -5
- package/src/customizations/volto-form-block/components/Field.jsx +7 -0
- package/src/customizations/volto-form-block/fieldSchema.js +345 -0
- package/src/overrideTranslations.jsx +4 -0
- package/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +1 -0
- package/src/theme/ItaliaTheme/Blocks/_cardWithSlideUpTextTemplate.scss +10 -0
- package/src/theme/ItaliaTheme/Blocks/_search.scss +8 -2
- package/src/theme/ItaliaTheme/Components/_cardPersona.scss +2 -0
- package/src/theme/ItaliaTheme/_ar.scss +3 -2
|
@@ -69,17 +69,13 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
69
69
|
}).component;
|
|
70
70
|
|
|
71
71
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
href={isEditMode ? '#' : null}
|
|
72
|
+
<div
|
|
73
|
+
className="listing-item box bg-img"
|
|
75
74
|
style={
|
|
76
75
|
image && {
|
|
77
76
|
backgroundImage: `url(${image})`,
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
className="listing-item box bg-img"
|
|
81
|
-
key={index}
|
|
82
|
-
data-element={id_lighthouse}
|
|
83
79
|
>
|
|
84
80
|
<div className="bg-gradient"></div>
|
|
85
81
|
{(category || date) && (
|
|
@@ -89,14 +85,22 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
89
85
|
{date}
|
|
90
86
|
</div>
|
|
91
87
|
)}
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
88
|
+
<UniversalLink
|
|
89
|
+
item={!isEditMode ? item : null}
|
|
90
|
+
href={isEditMode ? '#' : null}
|
|
91
|
+
key={index}
|
|
92
|
+
data-element={id_lighthouse}
|
|
97
93
|
>
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
<h3
|
|
95
|
+
className={cx('title', {
|
|
96
|
+
ellipsis: title.length > 50,
|
|
97
|
+
})}
|
|
98
|
+
title={title.length > 50 ? title : undefined}
|
|
99
|
+
>
|
|
100
|
+
{title.substring(0, 50)}
|
|
101
|
+
</h3>
|
|
102
|
+
</UniversalLink>
|
|
103
|
+
|
|
100
104
|
<div className="box-slide-up">
|
|
101
105
|
{show_description && item.description && (
|
|
102
106
|
<p>{item.description}</p>
|
|
@@ -111,7 +115,12 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
111
115
|
className="justify-content-end"
|
|
112
116
|
/>
|
|
113
117
|
</div>
|
|
114
|
-
|
|
118
|
+
<UniversalLink
|
|
119
|
+
item={!isEditMode ? item : null}
|
|
120
|
+
className="card-link"
|
|
121
|
+
aria-hidden="true"
|
|
122
|
+
></UniversalLink>
|
|
123
|
+
</div>
|
|
115
124
|
);
|
|
116
125
|
})}
|
|
117
126
|
</div>
|
|
@@ -20,7 +20,6 @@ const ListingImage = ({
|
|
|
20
20
|
showDefault = false,
|
|
21
21
|
className = 'listing-image',
|
|
22
22
|
responsive = true,
|
|
23
|
-
showTitleAttr = true,
|
|
24
23
|
sizes = '(max-width:320px) 200px, (max-width:425px) 300px, (max-width:767px) 500px, 410px',
|
|
25
24
|
noWrapLink = false,
|
|
26
25
|
...imageProps
|
|
@@ -46,10 +45,18 @@ const ListingImage = ({
|
|
|
46
45
|
} else return null;
|
|
47
46
|
}
|
|
48
47
|
const Image = config.getComponent({ name: 'Image' }).component;
|
|
48
|
+
|
|
49
|
+
//Verifies if the item has a preview image or an header image
|
|
50
|
+
const showTitleAttr = !!(item.hasPreviewImage && item.preview_caption);
|
|
51
|
+
|
|
52
|
+
//Verifies with caption to show as alt and title text
|
|
53
|
+
const imageCaption =
|
|
54
|
+
item.hasPreviewImage && item.preview_caption ? item.preview_caption : null;
|
|
55
|
+
|
|
49
56
|
let commonImageProps = {
|
|
50
57
|
item,
|
|
51
58
|
'aria-hidden': imageProps.alt || item.title ? false : true,
|
|
52
|
-
alt: imageProps.alt ??
|
|
59
|
+
alt: imageProps.alt ?? imageCaption ?? '',
|
|
53
60
|
role: imageProps.alt || item.title ? '' : 'presentation',
|
|
54
61
|
className,
|
|
55
62
|
loading,
|
|
@@ -57,8 +64,14 @@ const ListingImage = ({
|
|
|
57
64
|
sizes,
|
|
58
65
|
...imageProps,
|
|
59
66
|
};
|
|
60
|
-
|
|
61
|
-
|
|
67
|
+
|
|
68
|
+
// show title attribute if preview_caption or image_caption is present for the alt text
|
|
69
|
+
if (showTitleAttr) {
|
|
70
|
+
commonImageProps = {
|
|
71
|
+
...commonImageProps,
|
|
72
|
+
title: imageCaption,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
62
75
|
|
|
63
76
|
return (
|
|
64
77
|
<ListingImageWrapper item={item} noWrapLink={noWrapLink}>
|
|
@@ -55,9 +55,10 @@ const GridGalleryTemplate = ({
|
|
|
55
55
|
)}
|
|
56
56
|
<div className="grid-gallery-grid">
|
|
57
57
|
{items.map((item, index) => {
|
|
58
|
-
let image = (
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
let image = ListingImage({
|
|
59
|
+
item,
|
|
60
|
+
className: '',
|
|
61
|
+
});
|
|
61
62
|
let scale = null;
|
|
62
63
|
let hasImage = contentHasImage(item);
|
|
63
64
|
if (index % 7 === 0 || index % 7 === 6 || index % 7 === 3) {
|
|
@@ -68,7 +68,4 @@ test('View renders all fields', async () => {
|
|
|
68
68
|
|
|
69
69
|
expect(screen.getByText(/Accordion 1/i)).toBeInTheDocument();
|
|
70
70
|
expect(screen.getByText(/Is this just fantasy/i)).toBeInTheDocument();
|
|
71
|
-
expect(
|
|
72
|
-
screen.getByRole('link', { name: /Caught in a landside/i }),
|
|
73
|
-
).toBeInTheDocument();
|
|
74
71
|
});
|
|
@@ -32,6 +32,10 @@ const messages = defineMessages({
|
|
|
32
32
|
id: 'feedback_form_title',
|
|
33
33
|
defaultMessage: 'How clear is the information on this page?',
|
|
34
34
|
},
|
|
35
|
+
aria_title_feedback: {
|
|
36
|
+
id: 'feedback_form_aria_title',
|
|
37
|
+
defaultMessage: 'Feedback form',
|
|
38
|
+
},
|
|
35
39
|
yes: {
|
|
36
40
|
id: 'feedback_form_yes',
|
|
37
41
|
defaultMessage: 'Yes',
|
|
@@ -255,7 +259,11 @@ const FeedbackForm = ({ title, pathname }) => {
|
|
|
255
259
|
<Container>
|
|
256
260
|
<Row className="d-flex justify-content-center bg-primary">
|
|
257
261
|
<Col className="col-12 col-lg-6">
|
|
258
|
-
<div
|
|
262
|
+
<div
|
|
263
|
+
className="feedback-form"
|
|
264
|
+
role="form"
|
|
265
|
+
aria-label={intl.formatMessage(messages.aria_title_feedback)}
|
|
266
|
+
>
|
|
259
267
|
<Card
|
|
260
268
|
className="shadow card-wrapper py-4 px-4"
|
|
261
269
|
data-element="feedback"
|
|
@@ -13,6 +13,10 @@ const messages = defineMessages({
|
|
|
13
13
|
id: 'Cerca',
|
|
14
14
|
defaultMessage: 'Cerca',
|
|
15
15
|
},
|
|
16
|
+
searchLabel: {
|
|
17
|
+
id: 'searchLabel',
|
|
18
|
+
defaultMessage: 'Cerca nel sito',
|
|
19
|
+
},
|
|
16
20
|
});
|
|
17
21
|
|
|
18
22
|
const HeaderSearch = () => {
|
|
@@ -21,7 +25,11 @@ const HeaderSearch = () => {
|
|
|
21
25
|
|
|
22
26
|
return (
|
|
23
27
|
<>
|
|
24
|
-
<div
|
|
28
|
+
<div
|
|
29
|
+
className="it-search-wrapper"
|
|
30
|
+
role="search"
|
|
31
|
+
aria-label={intl.formatMessage(messages.searchLabel)}
|
|
32
|
+
>
|
|
25
33
|
<span className="d-none d-md-block">
|
|
26
34
|
{intl.formatMessage(messages.search)}
|
|
27
35
|
</span>
|
|
@@ -166,6 +166,10 @@ const messages = defineMessages({
|
|
|
166
166
|
id: 'currentActive',
|
|
167
167
|
defaultMessage: 'attivo',
|
|
168
168
|
},
|
|
169
|
+
searchLabel: {
|
|
170
|
+
id: 'searchLabel',
|
|
171
|
+
defaultMessage: 'Cerca nel sito',
|
|
172
|
+
},
|
|
169
173
|
});
|
|
170
174
|
|
|
171
175
|
const SearchModal = ({ closeModal, show }) => {
|
|
@@ -334,6 +338,7 @@ const SearchModal = ({ closeModal, show }) => {
|
|
|
334
338
|
id="search-modal"
|
|
335
339
|
isOpen={show}
|
|
336
340
|
toggle={closeModal}
|
|
341
|
+
role="alertdialog"
|
|
337
342
|
>
|
|
338
343
|
<ModalHeader toggle={closeModal}>
|
|
339
344
|
<Container>
|
|
@@ -392,7 +397,11 @@ const SearchModal = ({ closeModal, show }) => {
|
|
|
392
397
|
<>
|
|
393
398
|
<div className="search-filters search-filters-text">
|
|
394
399
|
<div className="form-group">
|
|
395
|
-
<div
|
|
400
|
+
<div
|
|
401
|
+
className="input-group mb-3"
|
|
402
|
+
role="search"
|
|
403
|
+
aria-label={intl.formatMessage(messages.searchLabel)}
|
|
404
|
+
>
|
|
396
405
|
<input
|
|
397
406
|
id="search-text"
|
|
398
407
|
type="text"
|
|
@@ -12,13 +12,20 @@ import {
|
|
|
12
12
|
HeaderContent,
|
|
13
13
|
HeaderRightZone,
|
|
14
14
|
} from 'design-react-kit';
|
|
15
|
-
import { useIntl } from 'react-intl';
|
|
15
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
16
16
|
import {
|
|
17
17
|
getSiteProperty,
|
|
18
18
|
useHomePath,
|
|
19
19
|
} from 'design-comuni-plone-theme/helpers';
|
|
20
20
|
import { SiteProperty } from 'volto-site-settings';
|
|
21
21
|
|
|
22
|
+
const messages = defineMessages({
|
|
23
|
+
utilityMenu: {
|
|
24
|
+
id: 'utilityMenu',
|
|
25
|
+
defaultMessage: 'Utility Menu',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
22
29
|
const HeaderSlim = () => {
|
|
23
30
|
const subsite = useSelector((state) => state.subsite?.data);
|
|
24
31
|
const intl = useIntl();
|
|
@@ -45,7 +52,13 @@ const HeaderSlim = () => {
|
|
|
45
52
|
|
|
46
53
|
const target = subsite ? null : '_blank';
|
|
47
54
|
return (
|
|
48
|
-
<Header
|
|
55
|
+
<Header
|
|
56
|
+
small={false}
|
|
57
|
+
theme=""
|
|
58
|
+
type="slim"
|
|
59
|
+
role="navigation"
|
|
60
|
+
aria-label={intl.formatMessage(messages.utilityMenu)}
|
|
61
|
+
>
|
|
49
62
|
<HeaderContent>
|
|
50
63
|
<HeaderBrand
|
|
51
64
|
responsive
|
|
@@ -7,10 +7,10 @@ import React, { useEffect } from 'react';
|
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import { useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
import { useLocation } from 'react-router-dom';
|
|
10
|
+
import { useIntl } from 'react-intl';
|
|
10
11
|
import { Nav, NavItem, NavLink } from 'design-react-kit';
|
|
11
12
|
import { UniversalLink } from '@plone/volto/components';
|
|
12
13
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
13
|
-
import { useIntl } from 'react-intl';
|
|
14
14
|
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
15
15
|
import { getSlimHeader, getItemsByPath } from 'volto-slimheader';
|
|
16
16
|
|
|
@@ -9,8 +9,17 @@ import { Link } from 'react-router-dom';
|
|
|
9
9
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
10
10
|
import { Nav, NavItem, NavLink } from 'design-react-kit';
|
|
11
11
|
import { useHomePath } from 'design-comuni-plone-theme/helpers';
|
|
12
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
13
|
+
|
|
14
|
+
const messages = defineMessages({
|
|
15
|
+
parent_site_menu: {
|
|
16
|
+
id: 'parent_site_menu',
|
|
17
|
+
defaultMessage: 'Main site menu',
|
|
18
|
+
},
|
|
19
|
+
});
|
|
12
20
|
|
|
13
21
|
const ParentSiteMenu = () => {
|
|
22
|
+
const intl = useIntl();
|
|
14
23
|
const dropdownMenu = useSelector(
|
|
15
24
|
(state) => state.dropdownMenuNavItems?.result,
|
|
16
25
|
);
|
|
@@ -39,7 +48,11 @@ const ParentSiteMenu = () => {
|
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
return subsite && menu ? (
|
|
42
|
-
<Nav
|
|
51
|
+
<Nav
|
|
52
|
+
vertical={false}
|
|
53
|
+
className="parent-site-menu"
|
|
54
|
+
aria-label={intl.formatMessage(messages.parent_site_menu)}
|
|
55
|
+
>
|
|
43
56
|
{menu.items.map((navitem, id) => (
|
|
44
57
|
<NavItem tag="li" key={id}>
|
|
45
58
|
<NavLink
|
|
@@ -15,6 +15,10 @@ const messages = defineMessages({
|
|
|
15
15
|
id: 'skiplink-footer',
|
|
16
16
|
defaultMessage: 'Skip to footer',
|
|
17
17
|
},
|
|
18
|
+
skiplinks_description: {
|
|
19
|
+
id: 'skiplinks-description',
|
|
20
|
+
defaultMessage: 'Skiplinks',
|
|
21
|
+
},
|
|
18
22
|
});
|
|
19
23
|
|
|
20
24
|
const SkipLinks = () => {
|
|
@@ -32,7 +36,11 @@ const SkipLinks = () => {
|
|
|
32
36
|
|
|
33
37
|
return (
|
|
34
38
|
<div className="public-ui">
|
|
35
|
-
<Skiplink
|
|
39
|
+
<Skiplink
|
|
40
|
+
tag="div"
|
|
41
|
+
role="complementary"
|
|
42
|
+
aria-label={intl.formatMessage(messages.skiplinks_description)}
|
|
43
|
+
>
|
|
36
44
|
<SkiplinkItem href="#view" tag="a">
|
|
37
45
|
{intl.formatMessage(messages.mainView)}
|
|
38
46
|
</SkiplinkItem>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { createRef } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
8
9
|
|
|
9
10
|
import {
|
|
10
11
|
PageHeader,
|
|
@@ -25,6 +26,17 @@ import {
|
|
|
25
26
|
useSideMenu,
|
|
26
27
|
} from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
27
28
|
|
|
29
|
+
const messages = defineMessages({
|
|
30
|
+
sideMenuIndex: {
|
|
31
|
+
id: 'sideMenuIndex',
|
|
32
|
+
defaultMessage: 'Indice della pagina',
|
|
33
|
+
},
|
|
34
|
+
bandoContent: {
|
|
35
|
+
id: 'bandoContent',
|
|
36
|
+
defaultMessage: 'Contenuto del Bando',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
28
40
|
export const BandoViewSectionsOrder = [
|
|
29
41
|
{ /* Testo */ component: BandoText },
|
|
30
42
|
/* Responsabili */
|
|
@@ -46,6 +58,7 @@ export const BandoViewSectionsOrder = [
|
|
|
46
58
|
*/
|
|
47
59
|
const BandoView = ({ content, location }) => {
|
|
48
60
|
let documentBody = createRef();
|
|
61
|
+
const intl = useIntl();
|
|
49
62
|
const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
|
|
50
63
|
|
|
51
64
|
return (
|
|
@@ -61,7 +74,10 @@ const BandoView = ({ content, location }) => {
|
|
|
61
74
|
showbandostate={true}
|
|
62
75
|
/>
|
|
63
76
|
<div className="row row-column-border border-light row-column-menu-left">
|
|
64
|
-
<aside
|
|
77
|
+
<aside
|
|
78
|
+
className="col-lg-4"
|
|
79
|
+
aria-label={intl.formatMessage(messages.sideMenuIndex)}
|
|
80
|
+
>
|
|
65
81
|
{__CLIENT__ && (
|
|
66
82
|
<SideMenu data={sideMenuElements} content_uid={content?.UID} />
|
|
67
83
|
)}
|
|
@@ -70,6 +86,8 @@ const BandoView = ({ content, location }) => {
|
|
|
70
86
|
ref={documentBody}
|
|
71
87
|
id="main-content-section"
|
|
72
88
|
className="col-lg-8 it-page-sections-container border-light"
|
|
89
|
+
role="region"
|
|
90
|
+
aria-label={intl.formatMessage(messages.bandoContent)}
|
|
73
91
|
>
|
|
74
92
|
{/* SEZIONI */}
|
|
75
93
|
<ContentTypeViewSections
|
|
@@ -56,6 +56,7 @@ const PageHeader = (props) => {
|
|
|
56
56
|
} = props;
|
|
57
57
|
const intl = useIntl();
|
|
58
58
|
const Image = config.getComponent({ name: 'Image' }).component;
|
|
59
|
+
const subtitle = content.subtitle || content.sottotitolo;
|
|
59
60
|
return (
|
|
60
61
|
<div className="PageHeaderWrapper mb-4">
|
|
61
62
|
<div className="row mb-2 mb-lg-0 page-header">
|
|
@@ -75,10 +76,8 @@ const PageHeader = (props) => {
|
|
|
75
76
|
>
|
|
76
77
|
{content.title}
|
|
77
78
|
</h1>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{content.sottotitolo && `${content.sottotitolo}`}
|
|
81
|
-
</p>
|
|
79
|
+
|
|
80
|
+
{subtitle && <p className="h2">{subtitle}</p>}
|
|
82
81
|
|
|
83
82
|
<PageHeaderEventDates content={content} />
|
|
84
83
|
|
package/src/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx
CHANGED
|
@@ -3,6 +3,14 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import ItemInEvidence from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/ItemInEvidence';
|
|
4
4
|
import Arguments from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/Arguments';
|
|
5
5
|
import { Container, Row, Col } from 'design-react-kit';
|
|
6
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
const messages = defineMessages({
|
|
9
|
+
inEvidenceItems: {
|
|
10
|
+
id: 'inEvidenceItems',
|
|
11
|
+
defaultMessage: 'Contenuti in evidenza',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
6
14
|
|
|
7
15
|
/**
|
|
8
16
|
* RelatedItems view component class.
|
|
@@ -11,9 +19,14 @@ import { Container, Row, Col } from 'design-react-kit';
|
|
|
11
19
|
* @returns {string} Markup of the component.
|
|
12
20
|
*/
|
|
13
21
|
const RelatedItemInEvidence = ({ content }) => {
|
|
22
|
+
const intl = useIntl();
|
|
14
23
|
return (
|
|
15
24
|
content?.correlato_in_evidenza?.length > 0 && (
|
|
16
|
-
<section
|
|
25
|
+
<section
|
|
26
|
+
id="correlato-in-evidenza"
|
|
27
|
+
role="complementary"
|
|
28
|
+
aria-label={intl.formatMessage(messages.inEvidenceItems)}
|
|
29
|
+
>
|
|
17
30
|
<section className="section bg-primary">
|
|
18
31
|
<div className="section-content">
|
|
19
32
|
<Container>
|
|
@@ -71,7 +71,11 @@ const RelatedItems = ({
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
return related?.length > 0 || children ? (
|
|
74
|
-
<section
|
|
74
|
+
<section
|
|
75
|
+
id="contenuti-correlati"
|
|
76
|
+
role="complementary"
|
|
77
|
+
aria-label={intl.formatMessage(messages.related_items)}
|
|
78
|
+
>
|
|
75
79
|
<section className="section section-muted section-inset-shadow">
|
|
76
80
|
<div className="section-content">
|
|
77
81
|
<Container>
|
|
@@ -24,6 +24,10 @@ const messages = defineMessages({
|
|
|
24
24
|
id: 'Contenuto',
|
|
25
25
|
defaultMessage: 'Contenuto',
|
|
26
26
|
},
|
|
27
|
+
sideMenuNavigation: {
|
|
28
|
+
id: 'sideMenuNavigation',
|
|
29
|
+
defaultMessage: 'Navigazione della pagina',
|
|
30
|
+
},
|
|
27
31
|
});
|
|
28
32
|
|
|
29
33
|
const extractHeaders = (elements, intl) => {
|
|
@@ -151,7 +155,10 @@ const SideMenu = ({ data, content_uid }) => {
|
|
|
151
155
|
|
|
152
156
|
return headers?.length > 0 ? (
|
|
153
157
|
<div className="sticky-wrapper navbar-wrapper page-side-menu">
|
|
154
|
-
<nav
|
|
158
|
+
<nav
|
|
159
|
+
className="navbar it-navscroll-wrapper navbar-expand-lg"
|
|
160
|
+
aria-label={intl.formatMessage(messages.sideMenuNavigation)}
|
|
161
|
+
>
|
|
155
162
|
<div className="menu-wrapper">
|
|
156
163
|
<div className="link-list-wrapper menu-link-list">
|
|
157
164
|
<div className="accordion-wrapper">
|
|
@@ -162,6 +169,7 @@ const SideMenu = ({ data, content_uid }) => {
|
|
|
162
169
|
setIsNavOpen(!isNavOpen);
|
|
163
170
|
}}
|
|
164
171
|
aria-controls="side-menu-body"
|
|
172
|
+
aria-expanded={isNavOpen}
|
|
165
173
|
>
|
|
166
174
|
<h2 className="h3">{intl.formatMessage(messages.index)}</h2>
|
|
167
175
|
</AccordionHeader>
|
|
@@ -171,11 +179,7 @@ const SideMenu = ({ data, content_uid }) => {
|
|
|
171
179
|
role="progressbar"
|
|
172
180
|
/>
|
|
173
181
|
</div>
|
|
174
|
-
<AccordionBody
|
|
175
|
-
active={isNavOpen}
|
|
176
|
-
id="side-menu-body"
|
|
177
|
-
role="region"
|
|
178
|
-
>
|
|
182
|
+
<AccordionBody active={isNavOpen} id="side-menu-body">
|
|
179
183
|
<ul className="link-list" data-element="page-index">
|
|
180
184
|
{headers.map((item, i) => {
|
|
181
185
|
return (
|
|
@@ -25,6 +25,19 @@ import {
|
|
|
25
25
|
useSideMenu,
|
|
26
26
|
} from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
27
27
|
|
|
28
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
29
|
+
|
|
30
|
+
const messages = defineMessages({
|
|
31
|
+
sideMenuIndex: {
|
|
32
|
+
id: 'sideMenuIndex',
|
|
33
|
+
defaultMessage: 'Indice della pagina',
|
|
34
|
+
},
|
|
35
|
+
documentContent: {
|
|
36
|
+
id: 'documentContent',
|
|
37
|
+
defaultMessage: 'Contenuto del documento',
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
28
41
|
export const DocumentoViewSectionsOrder = [
|
|
29
42
|
{
|
|
30
43
|
/* HEADER IMAGE */
|
|
@@ -48,6 +61,7 @@ export const DocumentoViewSectionsOrder = [
|
|
|
48
61
|
*/
|
|
49
62
|
const DocumentoView = ({ content, location }) => {
|
|
50
63
|
let documentBody = createRef();
|
|
64
|
+
const intl = useIntl();
|
|
51
65
|
const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
|
|
52
66
|
|
|
53
67
|
//const userLogged = useSelector((state) => state.userSession);
|
|
@@ -66,7 +80,10 @@ const DocumentoView = ({ content, location }) => {
|
|
|
66
80
|
<ContentImage content={content} position="afterHeader" />
|
|
67
81
|
|
|
68
82
|
<div className="row row-column-border border-light row-column-menu-left">
|
|
69
|
-
<aside
|
|
83
|
+
<aside
|
|
84
|
+
className="col-lg-4"
|
|
85
|
+
aria-label={intl.formatMessage(messages.sideMenuIndex)}
|
|
86
|
+
>
|
|
70
87
|
{__CLIENT__ && (
|
|
71
88
|
<SideMenu data={sideMenuElements} content_uid={content?.UID} />
|
|
72
89
|
)}
|
|
@@ -75,6 +92,8 @@ const DocumentoView = ({ content, location }) => {
|
|
|
75
92
|
ref={documentBody}
|
|
76
93
|
id="main-content-section"
|
|
77
94
|
className="col-lg-8 it-page-sections-container border-light"
|
|
95
|
+
role="region"
|
|
96
|
+
aria-label={intl.formatMessage(messages.documentContent)}
|
|
78
97
|
>
|
|
79
98
|
{/* SEZIONI */}
|
|
80
99
|
<ContentTypeViewSections
|
|
@@ -27,6 +27,19 @@ import {
|
|
|
27
27
|
useSideMenu,
|
|
28
28
|
} from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
29
29
|
|
|
30
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
31
|
+
|
|
32
|
+
const messages = defineMessages({
|
|
33
|
+
sideMenuIndex: {
|
|
34
|
+
id: 'sideMenuIndex',
|
|
35
|
+
defaultMessage: 'Indice della pagina',
|
|
36
|
+
},
|
|
37
|
+
eventoContent: {
|
|
38
|
+
id: 'eventoContent',
|
|
39
|
+
defaultMessage: "Contenuto dell'evento",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
30
43
|
export const EventoViewSectionsOrder = [
|
|
31
44
|
{
|
|
32
45
|
/* HEADER IMAGE */
|
|
@@ -53,6 +66,7 @@ export const EventoViewSectionsOrder = [
|
|
|
53
66
|
*/
|
|
54
67
|
const EventoView = ({ content, location }) => {
|
|
55
68
|
let documentBody = createRef();
|
|
69
|
+
const intl = useIntl();
|
|
56
70
|
const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
|
|
57
71
|
|
|
58
72
|
return (
|
|
@@ -71,7 +85,10 @@ const EventoView = ({ content, location }) => {
|
|
|
71
85
|
<ContentImage content={content} position="afterHeader" />
|
|
72
86
|
|
|
73
87
|
<div className="row row-column-border border-light row-column-menu-left">
|
|
74
|
-
<aside
|
|
88
|
+
<aside
|
|
89
|
+
className="col-lg-4"
|
|
90
|
+
aria-label={intl.formatMessage(messages.sideMenuIndex)}
|
|
91
|
+
>
|
|
75
92
|
{__CLIENT__ && (
|
|
76
93
|
<SideMenu data={sideMenuElements} content_uid={content?.UID} />
|
|
77
94
|
)}
|
|
@@ -80,6 +97,8 @@ const EventoView = ({ content, location }) => {
|
|
|
80
97
|
ref={documentBody}
|
|
81
98
|
id="main-content-section"
|
|
82
99
|
className="col-lg-8 it-page-sections-container border-light"
|
|
100
|
+
role="region"
|
|
101
|
+
aria-label={intl.formatMessage(messages.eventoContent)}
|
|
83
102
|
>
|
|
84
103
|
{/* SEZIONI */}
|
|
85
104
|
<ContentTypeViewSections
|