design-comuni-plone-theme 8.5.0 → 8.6.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/RELEASE.md +31 -0
  3. package/package.json +3 -2
  4. package/publiccode.yml +2 -2
  5. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/ViewBlock.jsx +1 -1
  6. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +2 -2
  7. package/src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx +2 -2
  8. package/src/components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate.jsx +7 -4
  9. package/src/components/ItaliaTheme/Blocks/Listing/Commons/utils.js +9 -2
  10. package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +1 -5
  11. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +5 -5
  12. package/src/components/ItaliaTheme/View/Commons/LocationsMap.jsx +1 -6
  13. package/src/components/ItaliaTheme/View/Commons/Metadata.jsx +2 -2
  14. package/src/components/ItaliaTheme/View/Commons/RichText.jsx +1 -1
  15. package/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx +3 -1
  16. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -3
  17. package/src/components/ReleaseLog/ReleaseLog.css +4 -0
  18. package/src/components/ReleaseLog/ReleaseLog.jsx +147 -0
  19. package/src/config/Blocks/blocks.js +3 -4
  20. package/src/config/italiaConfig.js +24 -4
  21. package/src/customizations/volto/components/manage/Blocks/Grid/Edit.jsx +55 -0
  22. package/src/icons/log.svg +3 -0
  23. package/src/theme/ItaliaTheme/Blocks/_contentInEvidenceTemplate.scss +1 -1
  24. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +27 -0
  25. package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +2 -2
  26. package/src/theme/ItaliaTheme/Components/_cmp-timeline.scss +1 -0
  27. package/src/theme/ItaliaTheme/Views/_evento.scss +4 -0
  28. package/src/theme/ItaliaTheme/_common.scss +12 -0
  29. package/src/theme/ItaliaTheme/_main.scss +1 -0
  30. package/src/theme/_cms-ui.scss +1 -0
  31. package/src/theme/_cms-ui_container.scss +87 -0
  32. package/src/theme/site.scss +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
 
2
2
 
3
+ ## [8.6.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.5.1...v8.6.0) (2023-09-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * added Release log ([#332](https://github.com/redturtle/design-comuni-plone-theme/issues/332)) ([d1f73d0](https://github.com/redturtle/design-comuni-plone-theme/commit/d1f73d033c54e4c5e9f6b8ec231e938d7bc97c8b))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix container in edit mode ([#328](https://github.com/redturtle/design-comuni-plone-theme/issues/328)) ([d52a02d](https://github.com/redturtle/design-comuni-plone-theme/commit/d52a02d7218d6ccfcfa13a1b66993887820f7114))
14
+
15
+ ## [8.5.1](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.5.0...v8.5.1) (2023-09-18)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * added clear float to page sections ([#324](https://github.com/RedTurtle/design-comuni-plone-theme/issues/324)) ([7f1e46d](https://github.com/RedTurtle/design-comuni-plone-theme/commit/7f1e46d42b8cae11b04f68b3a01988c3e9226db7))
21
+ * fix cContacts block horizontal alignment ([#329](https://github.com/RedTurtle/design-comuni-plone-theme/issues/329)) ([b68ee5e](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b68ee5e9901c81db0048dc2eb29f9611cdc3fb5a))
22
+ * fix Content in Evidence template when there's more than one item ([#327](https://github.com/RedTurtle/design-comuni-plone-theme/issues/327)) ([049f520](https://github.com/RedTurtle/design-comuni-plone-theme/commit/049f5205685d2010982cf4a990479f719142fadf))
23
+ * fix height of icons in Icons Block ([#330](https://github.com/RedTurtle/design-comuni-plone-theme/issues/330)) ([c77ada8](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c77ada86763de62060f95b2fec52a824cbe76011))
24
+ * gridBlock edit overlapping when using 4 columns and adding image block ([#322](https://github.com/RedTurtle/design-comuni-plone-theme/issues/322)) ([018deb7](https://github.com/RedTurtle/design-comuni-plone-theme/commit/018deb7081b3830df526304330349855e5b79d4d))
25
+ * load of locations data in LocationsMap ([#323](https://github.com/RedTurtle/design-comuni-plone-theme/issues/323)) ([093f08b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/093f08bcdb92c46053ec78878b1ed2e375efd2ff))
26
+ * slider a11y ([3d5bcc4](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3d5bcc485c6d280647712ad2d0e3ccf6b8c4974a))
27
+ * updated volto-dropdownmenu to remove upload image when editing dropdownmenu blocks ([#331](https://github.com/RedTurtle/design-comuni-plone-theme/issues/331)) ([2c5605f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/2c5605f3be09632c923196eedc166485c15b04a3))
28
+
29
+
30
+ ### Documentation
31
+
32
+ * updated publiccode ([55e59c7](https://github.com/RedTurtle/design-comuni-plone-theme/commit/55e59c7822ca93330c4d509461d0cd32a9b2ea0b))
33
+
3
34
  ## [8.5.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.4.6...v8.5.0) (2023-09-05)
4
35
 
5
36
 
package/RELEASE.md ADDED
@@ -0,0 +1,31 @@
1
+ <!--- RELEASE file. La cura di questo file è in carico ai dev.
2
+ Qui vanno inserite tutte le novità e bugfix, spiegati in un linguaggio comprensibile anche ai non dev.
3
+ Se ci sono delle migliorie/novità per cui è stato aggiunto qualcosa nel manuale, linkarlo come nell'esempio sotto.
4
+ -->
5
+
6
+ <!--- -----------------------------------------------------------------
7
+ Esempio:
8
+ ---------------------------------------------------------------------
9
+ ## Versione 7.10.9
10
+ ### Migliorie
11
+ - Fissato il layout di stampa per pagine con Accordion
12
+ ### Novità
13
+ - Nuovo blocco "Informazioni" [`Istruzioni`](https://docs.google.com/document/d/1SThuxa_ah0BuNXukWs564kKPfprK41WLQE8Mome-0xg/edit#heading=h.7ty110jumgmd)
14
+ ### Fix
15
+ - il numero di telefono dentro card ufficio adesso è visibile anche senza indirizzo
16
+ -->
17
+
18
+ <!--- -----------------------------------------------------------------
19
+ TEMPLATE PER RELEASE
20
+ ----------------------------------------------------------------------
21
+
22
+ ## Versione X.X.X
23
+ ### Migliorie
24
+ - ...
25
+
26
+ ### Novità
27
+ - ... [`Istruzioni`](url della documentazione relativa alla novità)
28
+
29
+ ### Fix
30
+ - ...
31
+ -->
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "8.5.0",
5
+ "version": "8.6.0",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
@@ -117,6 +117,7 @@
117
117
  "classnames": "^2.3.2",
118
118
  "design-react-kit": "italia/design-react-kit#fc9b40257ba3cb613141faf217f1f5b806489740",
119
119
  "htmldiff-js": "1.0.5",
120
+ "marked": "9.0.0",
120
121
  "react-dropzone": "11.0.1",
121
122
  "react-google-recaptcha-v3": "1.7.0",
122
123
  "react-highlight-words": "0.18.0",
@@ -130,7 +131,7 @@
130
131
  "typeface-titillium-web": "0.0.72",
131
132
  "volto-blocks-widget": "3.1.0",
132
133
  "volto-data-grid-widget": "2.2.1",
133
- "volto-dropdownmenu": "4.0.0",
134
+ "volto-dropdownmenu": "4.1.0",
134
135
  "volto-editablefooter": "5.0.1",
135
136
  "volto-feedback": "0.1.5",
136
137
  "volto-form-block": "3.1.0",
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-09-05'
230
+ releaseDate: '2023-09-18'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.5.0
232
+ softwareVersion: 8.5.1
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -20,7 +20,7 @@ import { checkRedraftHasContent } from 'design-comuni-plone-theme/helpers';
20
20
  const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
21
21
  return (
22
22
  <Card
23
- className="card-bg rounded subblock-view"
23
+ className="card-bg rounded subblock-view "
24
24
  noWrapper={false}
25
25
  space
26
26
  tag="div"
@@ -106,7 +106,7 @@ class Edit extends SubblocksEdit {
106
106
  </div>
107
107
 
108
108
  <SubblocksWrapper node={this.node}>
109
- <Row>
109
+ <Row className="justify-content-center">
110
110
  {this.state.subblocks.map((subblock, subindex) => (
111
111
  <Col lg="4" key={subblock.id}>
112
112
  <EditBlock
@@ -120,7 +120,7 @@ class Edit extends SubblocksEdit {
120
120
  ))}
121
121
 
122
122
  {this.props.selected && (
123
- <Col lg={4}>
123
+ <Col lg={12} className="text-center pb-3">
124
124
  {this.renderAddBlockButton(
125
125
  this.props.intl.formatMessage(messages.addItem),
126
126
  )}
@@ -42,9 +42,9 @@ const AccordionView = ({ data, block }) => {
42
42
  )}
43
43
  </div>
44
44
  </div>
45
- <Row>
45
+ <Row className="justify-content-center">
46
46
  {data.subblocks.map((subblock, index) => (
47
- <Col lg="4" key={subblock.id}>
47
+ <Col lg="4" key={subblock.id} className="pb-3">
48
48
  <ViewBlock
49
49
  data={subblock}
50
50
  key={index}
@@ -137,6 +137,7 @@ const BandiInEvidenceTemplate = ({
137
137
  )}
138
138
 
139
139
  {/* Tipologia */}
140
+
140
141
  {show_tipologia && item.tipologia_bando?.title?.length > 0 && (
141
142
  <span className="d-flex flex-wrap align-items-baseline bando-dati-info">
142
143
  <div className="bando-dati-label me-2">
@@ -206,10 +207,12 @@ const BandiInEvidenceTemplate = ({
206
207
  className={cx('bando-state', {
207
208
  open: item.bando_state?.includes('open'),
208
209
  closed: item.bando_state?.includes('closed'),
209
- scheduled:
210
- item.bando_state?.includes('scheduled'),
211
- 'in-progress':
212
- item.bando_state?.includes('inProgress'),
210
+ scheduled: item.bando_state?.includes(
211
+ 'scheduled',
212
+ ),
213
+ 'in-progress': item.bando_state?.includes(
214
+ 'inProgress',
215
+ ),
213
216
  })}
214
217
  >
215
218
  {intl.formatMessage(messages[item.bando_state[0]])}
@@ -61,7 +61,7 @@ export const useSlider = (userAutoplay) => {
61
61
 
62
62
  if ((userAutoplay && !slide) || (userAutoplay && !slide.length > 0)) return;
63
63
 
64
- // Custom handling of focus as per Arter a11y audit and request
64
+ // Custom handling of focus for a11y
65
65
  const link = visibleSlideTitle(
66
66
  `a.slide-link[data-slide="${currentSlide}"]`,
67
67
  );
@@ -70,7 +70,14 @@ export const useSlider = (userAutoplay) => {
70
70
  return;
71
71
  }
72
72
  // eslint-disable-next-line no-unused-expressions
73
- else link.focus();
73
+ else if (
74
+ // if the focus was already on a slide, move it to the current one
75
+ Array.from(document.querySelectorAll('.slick-slide')).some((el) =>
76
+ el.contains(document.activeElement),
77
+ )
78
+ ) {
79
+ link.focus();
80
+ }
74
81
  };
75
82
 
76
83
  return {
@@ -46,11 +46,7 @@ const ContentInEvidenceTemplate = ({
46
46
 
47
47
  return (
48
48
  <div className="contentInEvidenceTemplate">
49
- <Container
50
- className={cx('', {
51
- 'px-4': isEditMode,
52
- })}
53
- >
49
+ <Container>
54
50
  {title && (
55
51
  <Row>
56
52
  <Col>
@@ -50,7 +50,7 @@ const messages = defineMessages({
50
50
  });
51
51
 
52
52
  function NextArrow(props) {
53
- // Custom handling of focus as per Arter a11y audit and request
53
+ // Custom handling of focus for a11y
54
54
  const { className, style, onClick, intl, currentSlide } = props;
55
55
  const handleClick = (options) => {
56
56
  onClick(options, false);
@@ -85,7 +85,7 @@ function NextArrow(props) {
85
85
  }
86
86
 
87
87
  function PrevArrow(props) {
88
- // Custom handling of focus as per Arter a11y audit and request
88
+ // Custom handling of focus for a11y
89
89
  const {
90
90
  className,
91
91
  style,
@@ -225,7 +225,7 @@ const SliderTemplate = ({
225
225
  };
226
226
 
227
227
  const renderCustomDots = (props) => {
228
- // Custom handling of focus as per Arter a11y audit and request
228
+ // Custom handling of focus for a11y
229
229
  return (
230
230
  <ul
231
231
  className="slick-dots"
@@ -281,13 +281,13 @@ const SliderTemplate = ({
281
281
  pauseOnDotsHover: true,
282
282
  swipe: true,
283
283
  swipeToSlide: true,
284
- focusOnSelect: true,
284
+ focusOnSelect: false,
285
285
  draggable: true,
286
286
  accessibility: true,
287
287
  nextArrow: <NextArrow intl={intl} focusNext={focusNext} />,
288
288
  prevArrow: <PrevArrow intl={intl} focusNext={focusNext} />,
289
289
  appendDots: renderCustomDots,
290
- // Custom handling of focus as per Arter a11y audit and request
290
+ // Custom handling of focus for a11y
291
291
  afterChange: focusNext,
292
292
  responsive: [
293
293
  {
@@ -43,12 +43,7 @@ const LocationsMap = ({ center, locations }) => {
43
43
 
44
44
  useEffect(() => {
45
45
  venues.forEach((loc) => {
46
- if (
47
- !fetchedLocations?.[loc.key]?.loading &&
48
- !fetchedLocations?.[loc.key]?.loaded
49
- ) {
50
- dispatch(getContent(loc.url, null, loc.key));
51
- }
46
+ dispatch(getContent(loc.url, null, loc.key));
52
47
  });
53
48
 
54
49
  return () =>
@@ -48,13 +48,13 @@ const Metadata = ({
48
48
  </h4>
49
49
  )}
50
50
  {children}
51
- <p className="font-serif mb-0 mt-4">
51
+ <p className="font-serif mb-0 mt-4 last-modified">
52
52
  <strong>{intl.formatMessage(messages.modified)}:</strong>{' '}
53
53
  {viewDate(intl.locale, content.modified, 'DD-MM-Y, HH:MM')}
54
54
  </p>
55
55
  {content.rights && (
56
56
  <>
57
- <p className="font-serif mb-0 mt-4">
57
+ <p className="font-serif mb-0 mt-4 metadata">
58
58
  {intl.formatMessage(messages.rights)}
59
59
  </p>
60
60
  <strong>{content.rights}</strong>
@@ -31,7 +31,7 @@ const RichText = ({
31
31
  <>
32
32
  {title && (
33
33
  <Tag
34
- className={cx('mt-4', {
34
+ className={cx('mt-4 it-page-subsection', {
35
35
  'fw-bold': title_size === 'h6',
36
36
  })}
37
37
  >
@@ -45,7 +45,9 @@ const EventoCosE = ({ content }) => {
45
45
  >
46
46
  {content?.persone_amministrazione?.length > 0 && (
47
47
  <>
48
- <h5>{intl.formatMessage(messages.parteciperanno)}</h5>
48
+ <h5 className="parteciperanno-section">
49
+ {intl.formatMessage(messages.parteciperanno)}
50
+ </h5>
49
51
  {content.persone_amministrazione.map((item, i) => (
50
52
  <UniversalLink
51
53
  href={flattenToAppURL(item['@id'])}
@@ -43,7 +43,6 @@ const EventoUlterioriInformazioni = ({ content }) => {
43
43
  {richTextHasContent(content?.ulteriori_informazioni) && (
44
44
  <HelpBox text={content?.ulteriori_informazioni} />
45
45
  )}
46
-
47
46
  {content?.event_url && (
48
47
  <div className="mt-4">
49
48
  <h5>{intl.formatMessage(messages.event_url)}</h5>
@@ -52,7 +51,6 @@ const EventoUlterioriInformazioni = ({ content }) => {
52
51
  </UniversalLink>
53
52
  </div>
54
53
  )}
55
-
56
54
  {richTextHasContent(content?.patrocinato_da) && (
57
55
  <div className="mt-4">
58
56
  {richTextHasContent(content?.patrocinato_da) && (
@@ -66,7 +64,6 @@ const EventoUlterioriInformazioni = ({ content }) => {
66
64
  )}
67
65
  </div>
68
66
  )}
69
-
70
67
  {content?.strutture_politiche.length > 0 && (
71
68
  <div className="mt-4">
72
69
  <h5>{intl.formatMessage(messages.strutture_politiche)}</h5>
@@ -0,0 +1,4 @@
1
+ h2 {
2
+ border-top: 1px solid grey;
3
+ font-weight: 600 !important;
4
+ }
@@ -0,0 +1,147 @@
1
+ /**
2
+ * ReleaseLog component.
3
+ * @module components/ReleaseLog/ReleaseLog
4
+ */
5
+
6
+ import React, { useState, useEffect } from 'react';
7
+
8
+ import {
9
+ Container,
10
+ Nav,
11
+ NavItem,
12
+ NavLink,
13
+ TabContent,
14
+ TabPane,
15
+ } from 'design-react-kit';
16
+ import { Helmet } from '@plone/volto/helpers';
17
+ import { marked } from 'marked';
18
+
19
+ import './ReleaseLog.css';
20
+
21
+ const ReleaseLog = () => {
22
+ let ReleaseDCPT = null;
23
+ let ReleaseIoCittadino = null;
24
+ let ReleaseIoPrenoto = null;
25
+ try {
26
+ ReleaseDCPT = require('design-comuni-plone-theme/../RELEASE.md');
27
+ } catch {
28
+ console.log("design-comuni-plone-theme/../RELEASE.md doesn't exists");
29
+ }
30
+ try {
31
+ ReleaseIoCittadino = require('@redturtle/volto-io-cittadino/../RELEASE.md');
32
+ } catch {
33
+ console.log("@redturtle/volto-io-cittadino/../RELEASE.md doesn't exists");
34
+ }
35
+ try {
36
+ ReleaseIoPrenoto = require('@redturtle/volto-io-prenoto/../RELEASE.md');
37
+ } catch {
38
+ console.log("@redturtle/volto-io-prenoto/../RELEASE.md doesn't exists");
39
+ }
40
+
41
+ const LOGS_TO_VIEW = [
42
+ { name: 'io-comune', file: ReleaseDCPT },
43
+ {
44
+ name: 'io-cittadino',
45
+ file: ReleaseIoCittadino,
46
+ },
47
+ { name: 'io-prenoto', file: ReleaseIoPrenoto },
48
+ ];
49
+
50
+ const [activeTab, toggleTab] = useState(LOGS_TO_VIEW[0].name);
51
+ const [logDCPT, setLogDCPT] = useState('');
52
+ const [logIoCittadino, setLogIoCittadino] = useState('');
53
+ const [logIoPrenoto, setLogIoPrenoto] = useState('');
54
+
55
+ useEffect(() => {
56
+ if (ReleaseDCPT) {
57
+ try {
58
+ fetch(ReleaseDCPT)
59
+ .then((res) => res.text())
60
+ .then((text) => {
61
+ setLogDCPT(marked(text));
62
+ });
63
+ } catch {
64
+ console.log(ReleaseDCPT + ' not found.');
65
+ }
66
+ }
67
+ if (ReleaseIoCittadino) {
68
+ try {
69
+ fetch(ReleaseIoCittadino)
70
+ .then((res) => res.text())
71
+ .then((text) => {
72
+ setLogIoCittadino(marked(text));
73
+ });
74
+ } catch {
75
+ console.log(ReleaseIoCittadino + ' not found.');
76
+ }
77
+ }
78
+ if (ReleaseIoPrenoto) {
79
+ try {
80
+ fetch(ReleaseIoPrenoto)
81
+ .then((res) => res.text())
82
+ .then((text) => {
83
+ setLogIoPrenoto(marked(text));
84
+ });
85
+ } catch {
86
+ console.log(ReleaseIoPrenoto + ' not found.');
87
+ }
88
+ }
89
+ }, []);
90
+
91
+ const viewTab = (tab) => {
92
+ if (activeTab !== tab) {
93
+ toggleTab(tab);
94
+ }
95
+ };
96
+
97
+ return (
98
+ <div className="public-ui">
99
+ <Helmet title="Release LOG" />
100
+ <Helmet>
101
+ <meta name="robots" content="noindex" />
102
+ </Helmet>
103
+ <Container className="px-4 my-4">
104
+ <Nav tabs className="mb-3">
105
+ {LOGS_TO_VIEW.filter((log) => log.file != null).map((log) => (
106
+ <NavItem key={log.name}>
107
+ <NavLink
108
+ href="#"
109
+ active={activeTab === log.name}
110
+ onClick={() => viewTab(log.name)}
111
+ >
112
+ <span>{log.name}</span>
113
+ </NavLink>
114
+ </NavItem>
115
+ ))}
116
+ </Nav>
117
+
118
+ <TabContent activeTab={activeTab}>
119
+ {LOGS_TO_VIEW.filter((log) => log.file != null).map((log) => (
120
+ <TabPane
121
+ tabId={log.name}
122
+ className="p-3"
123
+ key={log.name + 'tabcontent'}
124
+ >
125
+ <div
126
+ dangerouslySetInnerHTML={{
127
+ __html:
128
+ log.name === 'io-comune' ? (
129
+ logDCPT
130
+ ) : log.name == 'io-cittadino' ? (
131
+ logIoCittadino
132
+ ) : log.name == 'io-prenoto' ? (
133
+ logIoPrenoto
134
+ ) : (
135
+ <div></div>
136
+ ),
137
+ }}
138
+ ></div>
139
+ </TabPane>
140
+ ))}
141
+ </TabContent>
142
+ </Container>
143
+ </div>
144
+ );
145
+ };
146
+
147
+ export default ReleaseLog;
@@ -364,10 +364,9 @@ const italiaBlocks = {
364
364
 
365
365
  const getItaliaBlocks = (config) => {
366
366
  delete config.blocks.blocksConfig.teaser;
367
- config.blocks.blocksConfig.gridBlock.allowedBlocks =
368
- config.blocks.blocksConfig.gridBlock.allowedBlocks
369
- .filter((item) => !['slate', 'teaser'].includes(item))
370
- .concat(['text']);
367
+ config.blocks.blocksConfig.gridBlock.allowedBlocks = config.blocks.blocksConfig.gridBlock.allowedBlocks
368
+ .filter((item) => !['slate', 'teaser'].includes(item))
369
+ .concat(['text']);
371
370
  return italiaBlocks;
372
371
  };
373
372
  export default getItaliaBlocks;
@@ -1,3 +1,4 @@
1
+ import loadable from '@loadable/component';
1
2
  import menuSVG from '@plone/volto/icons/menu.svg';
2
3
  import menuAltSVG from '@plone/volto/icons/menu-alt.svg';
3
4
  import navSVG from '@plone/volto/icons/nav.svg';
@@ -54,6 +55,7 @@ import faBuildingSVG from 'design-comuni-plone-theme/icons/building.svg';
54
55
  import faFileDownloadSVG from 'design-comuni-plone-theme/icons/file-download.svg';
55
56
  import faQuestionSVG from 'design-comuni-plone-theme/icons/question-solid.svg';
56
57
  import bandoSVG from 'design-comuni-plone-theme/icons/bando.svg';
58
+ import logSVG from 'design-comuni-plone-theme/icons/log.svg';
57
59
 
58
60
  import applyRichTextConfig from 'design-comuni-plone-theme/config/RichTextEditor/config';
59
61
 
@@ -63,6 +65,10 @@ import { schemaListing } from 'design-comuni-plone-theme/components/ItaliaTheme/
63
65
 
64
66
  import reducers from 'design-comuni-plone-theme/reducers';
65
67
 
68
+ const ReleaseLog = loadable(() =>
69
+ import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
70
+ );
71
+
66
72
  export default function applyConfig(voltoConfig) {
67
73
  let config = applyRichTextConfig(voltoConfig);
68
74
 
@@ -155,6 +161,15 @@ export default function applyConfig(voltoConfig) {
155
161
  great: 1200,
156
162
  huge: 1600,
157
163
  },
164
+ controlpanels: [
165
+ ...(config.settings.controlpanels ?? []),
166
+ {
167
+ '@id': '/release-log',
168
+ group: 'Generali',
169
+ title: 'Novità ultimi rilasci',
170
+ id: 'release-log',
171
+ },
172
+ ],
158
173
  controlPanelsIcons: {
159
174
  ...config.settings.controlPanelsIcons,
160
175
  'dropdown-menu-settings': menuSVG,
@@ -163,6 +178,7 @@ export default function applyConfig(voltoConfig) {
163
178
  'design-plone-settings': contentSVG,
164
179
  'bandi-settings': bookSVG,
165
180
  'social-settings': shareSVG,
181
+ 'release-log': logSVG,
166
182
  },
167
183
  defaultBlockType: 'text',
168
184
  defaultExcludedFromSearch: {
@@ -306,6 +322,7 @@ export default function applyConfig(voltoConfig) {
306
322
  config.settings.nonContentRoutes = config.settings.nonContentRoutes.filter(
307
323
  (route) => route !== '/contact-form',
308
324
  );
325
+ config.settings.nonContentRoutes.push('/release-log');
309
326
 
310
327
  /******************************************************************************
311
328
  * VIEWS
@@ -462,10 +479,9 @@ export default function applyConfig(voltoConfig) {
462
479
  },
463
480
  };
464
481
  // Remove Horizontal Menu variation of TOC Block
465
- config.blocks.blocksConfig.toc.variations =
466
- config.blocks.blocksConfig.toc.variations.filter(
467
- (v) => v.id !== 'horizontalMenu',
468
- );
482
+ config.blocks.blocksConfig.toc.variations = config.blocks.blocksConfig.toc.variations.filter(
483
+ (v) => v.id !== 'horizontalMenu',
484
+ );
469
485
 
470
486
  // REDUCERS
471
487
  config.addonReducers = {
@@ -484,6 +500,10 @@ export default function applyConfig(voltoConfig) {
484
500
  path: ['/login', '/**/login'],
485
501
  component: LoginAgid,
486
502
  },
503
+ {
504
+ path: ['/controlpanel/release-log', '/release-log'],
505
+ component: ReleaseLog,
506
+ },
487
507
  ];
488
508
 
489
509
  return config;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Customizations:
3
+ * - make the block full-width and fix overlapping ui for
4
+ * some inner blocks like image using custom class
5
+ */
6
+
7
+ import PropTypes from 'prop-types';
8
+ import cx from 'classnames';
9
+ import { useState } from 'react';
10
+ import ContainerEdit from '@plone/volto/components/manage/Blocks/Container/Edit';
11
+
12
+ const GridBlockEdit = (props) => {
13
+ const { data } = props;
14
+
15
+ const columnsLength = data?.blocks_layout?.items?.length || 0;
16
+ const [selectedBlock, setSelectedBlock] = useState(null);
17
+
18
+ return (
19
+ <div
20
+ className={cx({
21
+ one: columnsLength === 1,
22
+ two: columnsLength === 2,
23
+ three: columnsLength === 3,
24
+ four: columnsLength >= 4,
25
+ 'grid-items': true,
26
+ 'full-width': true,
27
+ })}
28
+ // This is required to enabling a small "in-between" clickable area
29
+ // for bringing the Grid sidebar alive once you have selected an inner block
30
+ onClick={(e) => {
31
+ if (!e.block) setSelectedBlock(null);
32
+ }}
33
+ role="presentation"
34
+ >
35
+ <div className="gridBlock-container">
36
+ <ContainerEdit
37
+ {...props}
38
+ selectedBlock={selectedBlock}
39
+ setSelectedBlock={setSelectedBlock}
40
+ direction="horizontal"
41
+ />
42
+ </div>
43
+ </div>
44
+ );
45
+ };
46
+
47
+ GridBlockEdit.propTypes = {
48
+ block: PropTypes.string.isRequired,
49
+ onChangeBlock: PropTypes.func.isRequired,
50
+ pathname: PropTypes.string.isRequired,
51
+ selected: PropTypes.bool.isRequired,
52
+ manage: PropTypes.bool.isRequired,
53
+ };
54
+
55
+ export default GridBlockEdit;
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="28" height="32" viewBox="0 0 28 32"><g fill="none" fill-rule="evenodd" transform="translate(0 1)"><path stroke="#000" d="M11,0 L7,0 L0,0 L0,30 L19,30 C20.654,30 22,28.654 22,27 L22,3 C22,1.346 20.654,0 19,0 L11,0 Z" transform="translate(3)"/><line x1="13" x2="21" y1="17" y2="17" stroke="#000" stroke-linecap="square"/><g transform="translate(0 22)"><rect width="27" height="8" x=".5" y=".5" fill="#FFF" stroke="#000"/><text fill="#000" font-family="Arial-Black, Arial Black" font-size="6" font-weight="700">
2
+ <tspan x="7.552" y="7">LOG</tspan>
3
+ </text></g><line x1="13" x2="21" y1="7" y2="7" stroke="#000" stroke-linecap="square"/><line x1="13" x2="21" y1="12" y2="12" stroke="#000" stroke-linecap="square"/><polygon fill="#000" points="9 8 7.824 8.618 8.049 7.309 7.098 6.382 8.412 6.191 9 5 9.588 6.191 10.902 6.382 9.951 7.309 10.176 8.618"/><polygon fill="#000" points="9 13 7.824 13.618 8.049 12.309 7.098 11.382 8.412 11.191 9 10 9.588 11.191 10.902 11.382 9.951 12.309 10.176 13.618"/><polygon fill="#000" points="9 18 7.824 18.618 8.049 17.309 7.098 16.382 8.412 16.191 9 15 9.588 16.191 10.902 16.382 9.951 17.309 10.176 18.618"/></g></svg>
@@ -44,7 +44,7 @@
44
44
  @media (min-width: #{map-get($grid-breakpoints, lg)}) {
45
45
  .content-in-evidence:nth-of-type(2n) {
46
46
  .order-lg-2 {
47
- order: 1;
47
+ order: 1 !important;
48
48
 
49
49
  &.offset-lg-1 {
50
50
  margin-left: 0;
@@ -0,0 +1,27 @@
1
+ .block.gridBlock {
2
+ margin-top: 2rem;
3
+ .full-width {
4
+ height: unset !important;
5
+ }
6
+ .gridBlock-container {
7
+ max-width: 1320px;
8
+ padding: 0 4px;
9
+ margin: auto;
10
+ position: relative;
11
+ .toolbar {
12
+ left: 16px !important;
13
+ }
14
+ .block {
15
+ .image {
16
+ .ui.message {
17
+ padding-left: 8px;
18
+ padding-right: 8px;
19
+ }
20
+ .ui.input {
21
+ font-size: 14px;
22
+ margin-left: 16px;
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -167,8 +167,8 @@
167
167
  }
168
168
 
169
169
  .icon {
170
- width: 3.35rem;
171
- height: auto;
170
+ width: auto;
171
+ height: 4rem;
172
172
  color: $tertiary;
173
173
  }
174
174
  }
@@ -26,6 +26,7 @@
26
26
 
27
27
  .calendar-vertical {
28
28
  color: $link-color;
29
+ clear: both;
29
30
 
30
31
  &::after {
31
32
  display: block;
@@ -1,4 +1,8 @@
1
1
  body.contenttype-event {
2
+ .parteciperanno-section {
3
+ clear: both;
4
+ }
5
+
2
6
  .supported-by {
3
7
  margin-bottom: 1rem;
4
8
  }
@@ -3,6 +3,7 @@
3
3
  .text-justify {
4
4
  text-align: justify;
5
5
  }
6
+
6
7
  button.btn,
7
8
  button.rounded-right {
8
9
  &:focus {
@@ -30,6 +31,7 @@
30
31
 
31
32
  a.btn-tertiary {
32
33
  color: $tertiary-text !important;
34
+
33
35
  &:focus {
34
36
  border-color: $focus-outline-color;
35
37
  box-shadow: inset 0 1px 0 $focus-outline-color,
@@ -58,6 +60,7 @@
58
60
  }
59
61
  }
60
62
  }
63
+
61
64
  .btn-primary,
62
65
  .btn-secondary,
63
66
  .btn-tertiary,
@@ -66,12 +69,15 @@
66
69
  fill: $external-link-fill-buttons !important;
67
70
  }
68
71
  }
72
+
69
73
  .external-link {
70
74
  fill: $link-color !important;
75
+
71
76
  &:hover {
72
77
  fill: #004080 !important;
73
78
  }
74
79
  }
80
+
75
81
  .it-footer-small-prints-list .external-link {
76
82
  fill: $external-link-fill-subfooter !important;
77
83
  }
@@ -80,3 +86,9 @@
80
86
  .icon.external-link.icon-xs {
81
87
  height: 1rem;
82
88
  }
89
+
90
+ section.it-page-section,
91
+ .last-modified,
92
+ .it-page-subsection {
93
+ clear: both;
94
+ }
@@ -143,6 +143,7 @@ iframe {
143
143
 
144
144
  .draftjs-buttons {
145
145
  margin: 0;
146
+ clear: both;
146
147
 
147
148
  a {
148
149
  display: inline-block;
@@ -1,3 +1,4 @@
1
+ @import 'cms-ui_container';
1
2
  body.cms-ui {
2
3
  .block {
3
4
  font-family: $font-family-serif;
@@ -0,0 +1,87 @@
1
+ $maxWidth: 100%;
2
+ $emSize: 14px;
3
+ $scrollbarWidth: 17px;
4
+ $toolbarWidth: 80px;
5
+ $sidebarWidth: 375px;
6
+ $collapsedWidth: 20px;
7
+
8
+ $tabletBreakpoint: 768px;
9
+ $largeMonitorBreakpoint: 1200px;
10
+ $computerBreakpoint: 992px;
11
+
12
+ $largestTabletScreen: ($computerBreakpoint - 1px);
13
+
14
+ /* Devices */
15
+ $mobileMinimumGutter: 0em;
16
+ $mobileWidth: auto;
17
+ $mobileGutter: 1em;
18
+
19
+ $tabletMinimumGutter: ($emSize * 1);
20
+ $tabletWidth: $tabletBreakpoint - ($tabletMinimumGutter * 2) - $scrollbarWidth;
21
+ $tabletGutter: auto;
22
+
23
+ $computerMinimumGutter: ($emSize * 1.5);
24
+ $computerWidth: $computerBreakpoint - ($computerMinimumGutter * 2) -
25
+ $scrollbarWidth;
26
+ $computerGutter: auto;
27
+
28
+ $largeMonitorMinimumGutter: ($emSize * 2);
29
+ $largeMonitorWidth: $largeMonitorBreakpoint - ($largeMonitorMinimumGutter * 2) -
30
+ $scrollbarWidth;
31
+ $largeMonitorGutter: auto;
32
+
33
+ @mixin contentWidthMedia($width, $gutter, $offset) {
34
+ .public-ui .container {
35
+ width: $width !important;
36
+ margin-right: $gutter !important;
37
+ margin-left: $gutter !important;
38
+ }
39
+ .public-ui .full-width > .px-4.container {
40
+ padding-left: 0 !important;
41
+ padding-right: 0 !important;
42
+ }
43
+ }
44
+
45
+ @mixin contentWidth($offset) {
46
+ @media only screen and (max-width: #{map-get($grid-breakpoints, sm)} + $offset) {
47
+ @include contentWidthMedia($mobileWidth, $mobileGutter, -12px);
48
+ }
49
+ @media only screen and (min-width: $tabletBreakpoint + $offset) and (max-width: $largestTabletScreen + $offset) {
50
+ @include contentWidthMedia($tabletWidth, $tabletGutter, -30px);
51
+ }
52
+ @media only screen and (min-width: $computerBreakpoint + $offset) {
53
+ @include contentWidthMedia($computerWidth, $computerGutter, -30px);
54
+ }
55
+
56
+ @media only screen and (min-width: $largeMonitorBreakpoint + $offset) {
57
+ @include contentWidthMedia($largeMonitorWidth, $largeMonitorGutter, -30px);
58
+ }
59
+ }
60
+
61
+ body.cms-ui:not(.has-toolbar):not(.has-sidebar):not(.has-toolbar-collapsed):not(.has-sidebar-collapsed) {
62
+ @include contentWidth(0);
63
+ }
64
+
65
+ body.cms-ui.has-toolbar:not(.has-sidebar):not(.has-sidebar-collapsed) {
66
+ @include contentWidth($toolbarWidth);
67
+ }
68
+
69
+ body.cms-ui.has-toolbar.has-sidebar {
70
+ @include contentWidth($toolbarWidth + $sidebarWidth);
71
+ }
72
+
73
+ body.cms-ui.has-toolbar.has-sidebar-collapsed {
74
+ @include contentWidth($toolbarWidth + $collapsedWidth);
75
+ }
76
+
77
+ body.cms-ui.has-toolbar-collapsed:not(.has-sidebar):not(.has-sidebar-collapsed) {
78
+ @include contentWidth($collapsedWidth);
79
+ }
80
+
81
+ body.cms-ui.has-toolbar-collapsed.has-sidebar {
82
+ @include contentWidth($collapsedWidth + $sidebarWidth);
83
+ }
84
+
85
+ body.cms-ui.has-toolbar-collapsed.has-sidebar-collapsed {
86
+ @include contentWidth($collapsedWidth + $collapsedWidth);
87
+ }
@@ -88,6 +88,7 @@
88
88
  @import 'ItaliaTheme/Blocks/HTML';
89
89
  @import 'ItaliaTheme/Blocks/simpleCardTemplate';
90
90
  @import 'ItaliaTheme/Blocks/search';
91
+ @import 'ItaliaTheme/Blocks/gridBlock';
91
92
 
92
93
  @import 'ItaliaTheme/Views/uo';
93
94
  @import 'ItaliaTheme/Views/evento';