diff --git a/CHANGELOG.md b/CHANGELOG.md index ce83d0882..5d418d078 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ +## [11.7.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.2...v11.7.0) (2024-03-15) + + +### Features + +* editable footer top ([#528](https://github.com/redturtle/design-comuni-plone-theme/issues/528)) ([542e2ec](https://github.com/redturtle/design-comuni-plone-theme/commit/542e2ecc95be9b182f7d9f6b45ef893852587022)) +* update volto-feedback 0.3.0 ([3d9dfbe](https://github.com/redturtle/design-comuni-plone-theme/commit/3d9dfbe16111065ec04924430a6d3487ab6d1b05)) +* updated volto-form-block to fix multiple form in same page and added schema field custom validator ([#586](https://github.com/redturtle/design-comuni-plone-theme/issues/586)) ([407ae18](https://github.com/redturtle/design-comuni-plone-theme/commit/407ae18d876f6d5ada3095a2990ccbe3727ba06e)) +* view error for each form field, validate form config ([#578](https://github.com/redturtle/design-comuni-plone-theme/issues/578)) ([45e2f72](https://github.com/redturtle/design-comuni-plone-theme/commit/45e2f727ac6ea5f23f57661a1acef83f94b19a2e)) + + +### Bug Fixes + +* added condition for focus when going back within feedback form ([#588](https://github.com/redturtle/design-comuni-plone-theme/issues/588)) ([7911d89](https://github.com/redturtle/design-comuni-plone-theme/commit/7911d892e04fcb5584ba52d180f8bb79768d5c28)) +* button clear in form block ([68c8bf8](https://github.com/redturtle/design-comuni-plone-theme/commit/68c8bf85183edfeb53cd5525327d6210fae18df3)) +* button type of cancel button in form block ([9a10ff8](https://github.com/redturtle/design-comuni-plone-theme/commit/9a10ff8f40b20753c9400ceb6909e3ff5a543805)) +* default value for show_type in card-with-image-template ([#579](https://github.com/redturtle/design-comuni-plone-theme/issues/579)) ([fe95462](https://github.com/redturtle/design-comuni-plone-theme/commit/fe95462a49e99c5a442023d727676b485ab8edfe)) +* imaged full width view in edit mode ([#570](https://github.com/redturtle/design-comuni-plone-theme/issues/570)) ([053183b](https://github.com/redturtle/design-comuni-plone-theme/commit/053183baea2ce3e11b365bf29559ea532af33fc1)) +* restored right border in listing block small links template ([#582](https://github.com/redturtle/design-comuni-plone-theme/issues/582)) ([beb07ad](https://github.com/redturtle/design-comuni-plone-theme/commit/beb07ad251cb5e5b96c67c6a64ac01ea3f229526)) +* update volto-form-block for subdomain mail validation ([#584](https://github.com/redturtle/design-comuni-plone-theme/issues/584)) ([92939a2](https://github.com/redturtle/design-comuni-plone-theme/commit/92939a28e59d829e05423f83dc0564b9c008692e)) + + +### Maintenance + +* Update RELEASE.md ([f308e6b](https://github.com/redturtle/design-comuni-plone-theme/commit/f308e6bf000ca0d41ccfd63557f73b1372ab8faa)) + + +### Documentation + +* fix merge mistake in the release docs ([232af7a](https://github.com/redturtle/design-comuni-plone-theme/commit/232af7a1624724e60722c346533223bea95fd8be)) +* updated publiccode and release log ([3e48692](https://github.com/redturtle/design-comuni-plone-theme/commit/3e48692faa06bf6fff7ee16a06032e1b1e7dd782)) + ## [11.6.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.1...v11.6.2) (2024-03-08) diff --git a/README.md b/README.md index ffd434b33..550f0e753 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ Si veda ad esempio: - [Comune di Piacenza](https://www.comune.piacenza.it/) - [Comune di Prignano sulla Secchia](https://www.comune.prignano.mo.it/) - [Comune di Reggio Emilia](https://www.comune.re.it/) +- [Comune di Rolo](https://www.comune.rolo.re.it/) - [Comune di San Felice sul Panaro](https://www.comune.sanfelice.mo.it/) - [Comune di San Lazzaro di Savena](https://www.comune.sanlazzaro.bo.it) - [Comune di San Polo d'Enza](https://www.comune.sanpolodenza.re.it/) diff --git a/RELEASE.md b/RELEASE.md index 5510961ee..cc63b79cc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -47,18 +47,36 @@ - Gli stili del tipo di contenuto Unità Organizzativa sono stati ottimizzati per la stampa. -## Versione 11.6.1 (06/03/2024) +### Novità + +- E' possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso. + +## Versione 11.7.0 (15/03/2024) + +### Novità + +- Ora la fascia del footer contenente il logo e il nome del sito è configurabile da pannello di controllo. +- Nel pannello di controllo dei Feedback, ora gli utenti con permesso di eliminare elementi da questa sezione, possono eliminare i feedback. + +### Migliorie + +- Nel blocco form, se in fase di compilazione ci sono degli errori, viene mostrato un messaggio di errore specifico per ogni campo con errori. ### Fix -- Quando si imposta una ricorrenza per giorni feriali negli Eventi, viene visualizzato il testo corretto "ogni giorno feriale". +- Il bordo destro della variazione Link solo immagine del blocco Elenco è stato ripristinato. +- Se si mettono due blocchi Form nella stessa pagina, ora funzionano correttamente. +- Aggiustato il modulo di Feedback quando si cambia valutazione dopo averne già selezionata un'altra. -## Versione 11.6.0 (05/03/2024) +## Versione 11.6.1 (06/03/2024) ### Fix +- Quando si imposta una ricorrenza per giorni feriali negli Eventi, viene visualizzato il testo corretto "ogni giorno feriale". - Le icone social nel menu laterale mobile sono tutte dello stesso colore. +## Versione 11.6.0 (05/03/2024) + ### Migliorie - Nel blocco form è stata aggiunta una legenda per i campi obbligatori. diff --git a/jest-addon.config.js b/jest-addon.config.js index 59ad11305..d2e69502d 100644 --- a/jest-addon.config.js +++ b/jest-addon.config.js @@ -39,6 +39,8 @@ module.exports = { '^volto-dropdownmenu/(.*)$': '/node_modules/volto-dropdownmenu/src/$1', '^volto-feedback/(.*)$': '/node_modules/volto-feedback/src/$1', + '^volto-blocks-widget/(.*)$': + '/node_modules/volto-blocks-widget/src/$1', }, collectCoverage: false, collectCoverageFrom: [ diff --git a/package.json b/package.json index dd8c9ede5..f4ba54707 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "design-comuni-plone-theme", "description": "Volto Theme for Italia design guidelines", "license": "GPL-v3", - "version": "11.6.2", + "version": "11.7.0", "main": "src/index.js", "keywords": [ "volto-addon", @@ -141,16 +141,16 @@ "typeface-lora": "0.0.72", "typeface-roboto-mono": "0.0.75", "typeface-titillium-web": "0.0.72", - "volto-blocks-widget": "3.1.0", + "volto-blocks-widget": "3.4.0", "volto-data-grid-widget": "2.3.1", "volto-dropdownmenu": "4.1.1", - "volto-editablefooter": "5.0.3", - "volto-feedback": "0.2.0", - "volto-form-block": "3.3.1", + "volto-editablefooter": "5.1.0", + "volto-feedback": "0.3.0", + "volto-form-block": "3.7.0", "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.0.0", - "volto-querywidget-with-browser": "0.4.1", + "volto-querywidget-with-browser": "0.4.2", "volto-rss-block": "3.0.0", "volto-secondarymenu": "4.0.0", "volto-social-settings": "3.0.0", diff --git a/publiccode.yml b/publiccode.yml index a9cdd5254..e8acbf330 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -227,9 +227,9 @@ maintenance: name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici platforms: - web -releaseDate: '2024-03-08' +releaseDate: '2024-03-15' softwareType: standalone/web -softwareVersion: 11.6.2 +softwareVersion: 11.7.0 url: 'https://github.com/italia/design-comuni-plone-theme' usedBy: - ASP Comuni Modenesi Area Nord @@ -277,6 +277,7 @@ usedBy: - Comune di Piacenza - Comune di Prignano - Comune di Reggio Emilia + - Comune di Rolo - Comune di San Felice sul Panaro - Comune di San Lazzaro di Savena - Comune di San Polo d'Enza diff --git a/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx index bedd83a4b..65e723954 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx @@ -50,7 +50,7 @@ const CardWithImageTemplate = (props) => { show_block_bg = false, always_show_image = false, set_four_columns = false, - show_type = true, + show_type = false, show_section, show_icon = true, show_description = true, diff --git a/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx b/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx index 6ab1b3741..900fef33f 100644 --- a/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +++ b/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx @@ -1,10 +1,4 @@ -import React, { - useState, - useEffect, - useLayoutEffect, - useCallback, - useMemo, -} from 'react'; +import React, { useState, useEffect, useCallback } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { useLocation } from 'react-router-dom'; import { useIntl, defineMessages } from 'react-intl'; @@ -215,7 +209,9 @@ const FeedbackForm = ({ contentType, pathname }) => { satisfaction > threshold ? 'positive' : 'negative' }-${getFormFieldValue('answer')}`, ); - selectedAnswer.focus(); + if (selectedAnswer) { + selectedAnswer.focus(); + } } // eslint-disable-next-line react-hooks/exhaustive-deps }, [step]); diff --git a/src/components/ItaliaTheme/CustomerSatisfaction/Steps/CommentsStep.jsx b/src/components/ItaliaTheme/CustomerSatisfaction/Steps/CommentsStep.jsx index 69ae8d9f0..12b002a93 100644 --- a/src/components/ItaliaTheme/CustomerSatisfaction/Steps/CommentsStep.jsx +++ b/src/components/ItaliaTheme/CustomerSatisfaction/Steps/CommentsStep.jsx @@ -1,4 +1,4 @@ -import React, { useRef, useEffect } from 'react'; +import React from 'react'; import { TextArea, Form, FormGroup } from 'design-react-kit'; import { defineMessages } from 'react-intl'; import { FormHeader } from 'volto-feedback'; diff --git a/src/components/ItaliaTheme/Footer/FooterMain.jsx b/src/components/ItaliaTheme/Footer/FooterMain.jsx index c4a474493..48d68f871 100644 --- a/src/components/ItaliaTheme/Footer/FooterMain.jsx +++ b/src/components/ItaliaTheme/Footer/FooterMain.jsx @@ -15,12 +15,16 @@ import { FooterPNRRLogo, } from 'design-comuni-plone-theme/components/ItaliaTheme/'; +import { FooterTop } from 'volto-editablefooter'; + /** * FooterMain component class. * @class FooterMain * @extends Component */ const FooterMain = () => { + const footerTopContent = FooterTop(); + return (
@@ -28,11 +32,15 @@ const FooterMain = () => {
- - - - - + {footerTopContent ?? ( + <> + + + + + + + )}
diff --git a/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx b/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx index 06d5c319a..50ef0cbdc 100644 --- a/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx +++ b/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx @@ -48,6 +48,9 @@ const RenderBlocks = ({ if (block['@type'] === 'text' && !block.text) { return null; } + if (block['@type'] === 'slate' && block.plaintext?.length === 0) { + return null; + } } return items?.length > 0 ? ( <> diff --git a/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx b/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx index 05aa33c98..6b12bd1cf 100644 --- a/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx +++ b/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx @@ -5,6 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; +import cx from 'classnames'; import { Dimmer, Button } from 'design-react-kit'; import { readAsDataURL } from 'promise-file-reader'; import { injectIntl, defineMessages, useIntl } from 'react-intl'; @@ -56,14 +57,25 @@ const messages = defineMessages({ * @returns {string} Markup of the component. */ const FileWidget = (props) => { - const { id, value, onChange, label, onEdit, infoText, required, invalid } = - props; + const { + id, + value, + onChange, + label, + onEdit, + infoText, + required, + invalid, + validationText, + } = props; const [isImage, setIsImage] = React.useState(false); const intl = useIntl(); React.useEffect(() => { if (value && imageMimetypes.includes(value['content-type'])) { setIsImage(true); + } else { + setIsImage(false); } }, [value]); @@ -150,7 +162,7 @@ const FileWidget = (props) => {
)} - + {value ? intl.formatMessage(messages.replaceFile) : intl.formatMessage(messages.addNewFile)} @@ -171,7 +183,16 @@ const FileWidget = (props) => { )} - {infoText && {infoText}} + {infoText && ( + + {infoText} + + )} {value && (
{value.filename} @@ -189,6 +210,11 @@ const FileWidget = (props) => {
)} + {validationText && ( +
+ {validationText} +
+ )} ); }; diff --git a/src/customizations/volto-form-block/components/Edit.jsx b/src/customizations/volto-form-block/components/Edit.jsx index 27889ad7d..8f281d6d5 100644 --- a/src/customizations/volto-form-block/components/Edit.jsx +++ b/src/customizations/volto-form-block/components/Edit.jsx @@ -11,6 +11,7 @@ import React from 'react'; import EditBlock from 'volto-form-block/components/EditBlock'; // eslint-disable-next-line import/no-unresolved import Sidebar from 'volto-form-block/components/Sidebar'; +import ValidateConfigForm from 'volto-form-block/components/ValidateConfigForm'; import { Card, CardBody, Button, Row, Col } from 'design-react-kit'; import { @@ -78,17 +79,24 @@ class Edit extends SubblocksEdit { return (
-
- {this.props?.data?.title &&

{this.props.data.title}

} - {this.props?.data?.description && ( -
- {this.props.data.description} -
- )} - - - - {/*this.state.subblocks.filter((s) => s.field_type === 'from') + { + this.props.onChangeBlock(this.props.block, data); + }} + > +
+ {this.props?.data?.title &&

{this.props.data.title}

} + {this.props?.data?.description && ( +
+ {this.props.data.description} +
+ )} + + + + {/*this.state.subblocks.filter((s) => s.field_type === 'from') .length == 0 && (

{this.props.intl.formatMessage(messages.warning)}

@@ -98,48 +106,49 @@ class Edit extends SubblocksEdit {
)*/} - {this.state.subblocks.map((subblock, subindex) => ( -
- -
- ))} + {this.state.subblocks.map((subblock, subindex) => ( +
+ +
+ ))} - {this.props.selected && ( -
- {this.renderAddBlockButton( - this.props.intl.formatMessage(messages.addField), - )} -
- )} + {this.props.selected && ( +
+ {this.renderAddBlockButton( + this.props.intl.formatMessage(messages.addField), + )} +
+ )} - - - {this.props.data?.show_cancel && ( - + )} + - )} - - - -
-
-
-
+ + +
+
+
+
+ { @@ -56,6 +57,15 @@ const Field = ({ return !isOnEdit && !valid; }; + const infoText = errorMessage ? ( + <> +
{description}
+ {errorMessage} + + ) : ( + description + ); + return (
{field_type === 'text' && ( @@ -65,7 +75,7 @@ const Field = ({ label={getLabel()} type="text" required={required} - infoText={description} + infoText={infoText} disabled={disabled} readOnly={disabled} invalid={isInvalid() ? 'true' : null} @@ -83,14 +93,14 @@ const Field = ({ tag="textarea" rows={10} required={required} - infoText={description} + infoText={infoText} disabled={disabled} readOnly={disabled} invalid={isInvalid() ? 'true' : null} onChange={(e) => { onChange(name, e.target.value); }} - {...(value ? { value } : {})} + value={value ?? undefined} /> )} {field_type === 'select' && ( @@ -120,9 +130,13 @@ const Field = ({ aria-label={intl.formatMessage(messages.select_a_value)} classNamePrefix="react-select" className={isInvalid() ? 'is-invalid' : ''} + value={value ? [{ value: value, label: value }] : []} /> - {description && ( - {description} + {description && {description}} + {errorMessage && ( +
+ {errorMessage} +
)}
@@ -146,16 +160,19 @@ const Field = ({ onChange={(e) => { onChange(name, v); }} - invalid={isInvalid() ? 'true' : null} addon // Needed to avoid application of form-control class as of kit v4.0.2 + checked={value === v} /> ))} - {description && ( - {description} + {description && {description}} + {errorMessage && ( +
+ {errorMessage} +
)} @@ -192,8 +209,11 @@ const Field = ({ ))} - {description && ( - {description} + {description && {description}} + {errorMessage && ( +
+ {errorMessage} +
)} @@ -222,8 +242,11 @@ const Field = ({ {getLabel()} - {description && ( - {description} + {description && {description}} + {errorMessage && ( +
+ {errorMessage} +
)} @@ -235,13 +258,14 @@ const Field = ({ label={getLabel()} type="date" required={required} - infoText={description} + infoText={infoText} disabled={disabled} readOnly={disabled} invalid={isInvalid() ? 'true' : null} onChange={(e) => { onChange(name, e.target.value); }} + value={value ?? ''} /> )} {field_type === 'attachment' && ( @@ -251,7 +275,7 @@ const Field = ({ label={getLabel()} type="file" required={required} - infoText={description} + infoText={infoText} disabled={disabled} readOnly={disabled} invalid={isInvalid() ? 'true' : null} @@ -267,14 +291,15 @@ const Field = ({ label={getLabel()} type="email" required={true} - infoText={description} + infoText={infoText} disabled={disabled} readOnly={disabled} invalid={isInvalid() ? 'true' : null} + validationText={errorMessage} onChange={(e) => { onChange(name, e.target.value); }} - {...(value ? { value } : {})} + value={value ?? ''} /> )} {field_type === 'static_text' && @@ -305,6 +330,7 @@ const Field = ({ name={name} title={label} description={description} + infoText={infoText} required={required} onChange={onChange} value={value} diff --git a/src/customizations/volto-form-block/components/FormView.jsx b/src/customizations/volto-form-block/components/FormView.jsx index 77f6534a8..4bd5cabe7 100644 --- a/src/customizations/volto-form-block/components/FormView.jsx +++ b/src/customizations/volto-form-block/components/FormView.jsx @@ -38,9 +38,9 @@ const messages = defineMessages({ id: 'Email Success', defaultMessage: 'Form inviato correttamente', }, - empty_values: { - id: 'form_empty_values_validation', - defaultMessage: 'Compila i campi richiesti', + form_errors: { + id: 'form_errors_validation', + defaultMessage: 'Attenzione! Alcuni campi inseriti sono da controllare.', }, reset: { id: 'form_reset', @@ -62,6 +62,8 @@ const FormView = ({ resetFormState, resetFormOnError, captcha, + id, + getErrorMessage, }) => { const intl = useIntl(); const alertTransition = { @@ -81,7 +83,7 @@ const FormView = ({ config.settings.siteProperties.enableVoltoFormBlockCaptcha; const isValidField = (field) => { - return formErrors?.indexOf(field) < 0; + return formErrors?.filter((e) => e.field === field).length === 0; }; /* Function that replaces variables from the user customized message */ @@ -146,7 +148,15 @@ const FormView = ({
)} - @@ -220,6 +230,7 @@ const FormView = ({ : formData[name]?.value } valid={isValidField(name)} + errorMessage={getErrorMessage(name)} formHasErrors={formErrors.length > 0} /> @@ -238,7 +249,7 @@ const FormView = ({ transition={alertTransition} >

{intl.formatMessage(messages.error)}

-

{intl.formatMessage(messages.empty_values)}

+

{intl.formatMessage(messages.form_errors)}

)} {formState.error && ( @@ -259,8 +270,12 @@ const FormView = ({ {data?.show_cancel && ( + )} + + + ); +}; + +/** + * Property types. + * @property {Object} propTypes Property types. + * @static + */ +FileWidget.propTypes = { + id: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, + description: PropTypes.string, + required: PropTypes.bool, + error: PropTypes.arrayOf(PropTypes.string), + value: PropTypes.shape({ + '@type': PropTypes.string, + title: PropTypes.string, + }), + onChange: PropTypes.func.isRequired, + wrapped: PropTypes.bool, +}; + +/** + * Default properties. + * @property {Object} defaultProps Default properties. + * @static + */ +FileWidget.defaultProps = { + description: null, + required: false, + error: [], + value: null, +}; + +export default injectIntl(FileWidget); diff --git a/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss b/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss index 5b83c8004..cd85f48ba 100644 --- a/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss +++ b/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss @@ -107,8 +107,10 @@ font-weight: 400; letter-spacing: 1.1px; } + &.wrap-dates-four-columns { flex-wrap: wrap; + .data { margin-top: 0.5rem; } diff --git a/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss b/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss index c6ece4a28..990e6006d 100644 --- a/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss @@ -25,8 +25,8 @@ line-height: 1.44444rem; a { - text-decoration: none; display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card + text-decoration: none; &:hover { text-decoration: underline; diff --git a/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss b/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss index 28bf9a5e8..e31e9bb25 100644 --- a/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss @@ -54,8 +54,8 @@ a { @include rem-size(font-size, 24); @include rem-size(line-height, 26); - font-weight: 700; display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card + font-weight: 700; &:hover, &:active { @@ -128,9 +128,9 @@ a { @include rem-size(font-size, 32); @include rem-size(line-height, 32); + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card font-weight: 700; text-decoration: none; - display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card &:hover, &:active { diff --git a/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss b/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss index d66134d78..d93a7eed0 100644 --- a/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss @@ -13,7 +13,6 @@ align-items: center; justify-content: center; border: 8px solid $white; - border-right: none; background: $white; box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1); diff --git a/src/theme/ItaliaTheme/Components/_card.scss b/src/theme/ItaliaTheme/Components/_card.scss index f41242b58..49e855da6 100644 --- a/src/theme/ItaliaTheme/Components/_card.scss +++ b/src/theme/ItaliaTheme/Components/_card.scss @@ -150,9 +150,9 @@ a { @include rem-size(font-size, 18); @include rem-size(line-height, 24); + display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card font-weight: 600; text-decoration: none; - display: inline-block; //per avere il bordo tutto unito al focus di un link, ad esempio nelle card } a:hover { diff --git a/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Views/_common.scss b/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Views/_common.scss index cff5edb4b..ad7910b77 100644 --- a/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Views/_common.scss +++ b/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Views/_common.scss @@ -13,6 +13,7 @@ .progress { background-color: $subsite-primary-a0; } + .progress-bar { @if $subsite-light-theme { background-color: $subsite-link-color; @@ -39,6 +40,7 @@ border-left: 2px solid $subsite-primary; } } + .nav-link { // evita che il bordo a sinistra mostri il primary nel momento in cui si scorre @if $subsite-light-theme { @@ -54,6 +56,7 @@ h5 { color: $subsite-primary-text; } + .chip { @if $subsite-light-theme { border-color: $subsite-link-color; @@ -61,16 +64,20 @@ .chip-label { color: $subsite-link-color; } + &:hover { background-color: #fff; } } @else { border-color: $subsite-primary-text; + .chip-label { color: $subsite-primary-text; } + &:hover { background-color: #fff; + .chip-label { color: $subsite-primary; } @@ -118,6 +125,7 @@ .draftjs-buttons a { background-color: $subsite-secondary !important; color: $subsite-secondary-text !important; + &:hover { background-color: darken($subsite-secondary, 5%) !important; } @@ -138,6 +146,7 @@ &:before { background-color: $subsite-link-color; } + &:after { background-color: $subsite-link-color; } @@ -145,11 +154,13 @@ &:before { background-color: $subsite-primary; } + &:after { background-color: $subsite-primary; } } } + .calendar-date-description .calendar-date-description-content { border-left: 8px solid $subsite-primary-a0; } @@ -160,11 +171,13 @@ .point-list-wrapper .point-list .point-list-aside.point-list-warning { @if $subsite-light-theme { color: $subsite-link-color; + &:after { background-color: $subsite-link-color; } } @else { color: $subsite-primary; + &:after { background-color: $subsite-primary; } diff --git a/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Widgets/reactSelect.scss b/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Widgets/reactSelect.scss index 84daea14a..1d0768071 100644 --- a/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Widgets/reactSelect.scss +++ b/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Widgets/reactSelect.scss @@ -9,6 +9,7 @@ background-color: $subsite-primary-a0; color: color-contrast($subsite-primary-a0); } + &.react-select__option--is-focused.react-select__option--is-selected, &.react-select__option--is-selected { background-color: $subsite-secondary; diff --git a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss index c5836b3e2..d60d8dbe1 100644 --- a/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss +++ b/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss @@ -131,8 +131,8 @@ .navbar-collapsable { .navbar-nav { li a.nav-link { - font-size: 16px; color: $subsite-link-color; + font-size: 16px; &.active { border-left-color: $subsite-link-color; diff --git a/src/theme/ItaliaTheme/Views/_common.scss b/src/theme/ItaliaTheme/Views/_common.scss index 32ca3040c..229e8dfbe 100644 --- a/src/theme/ItaliaTheme/Views/_common.scss +++ b/src/theme/ItaliaTheme/Views/_common.scss @@ -68,14 +68,39 @@ picture.volto-image.responsive img.full-width, margin-left: -50vw !important; object-fit: cover; + $toolbar-width: 80px; + $toolbar-collapsed-width: 20px; + $sidebar-width: 375px; + $sidebar-collapsed-width: 20px; + .has-toolbar & { - left: calc(50% + 40px); - width: calc(100vw - 80px) !important; + left: calc(50% + calc($toolbar-width / 2)); + width: calc(100vw - $toolbar-width) !important; + } + .has-toolbar.has-sidebar & { + $toolbars-width: calc($toolbar-width + $sidebar-width); + left: calc(50% + calc($toolbars-width / 2)); + width: calc(100vw - $toolbars-width) !important; + } + .has-toolbar.has-sidebar-collapsed & { + $toolbars-width: calc($toolbar-width + $sidebar-collapsed-width); + left: calc(50% + calc($toolbars-width / 2)); + width: calc(100vw - $toolbars-width) !important; } .has-toolbar-collapsed & { - left: calc(50% + 10px); - width: calc(100vw - 20px) !important; + left: calc(50% + calc($toolbar-collapsed-width / 2)); + width: calc(100vw - $toolbar-collapsed-width) !important; + } + .has-toolbar-collapsed.has-sidebar & { + $toolbars-width: calc($toolbar-collapsed-width + $sidebar-width); + left: calc(50% + calc($toolbars-width / 2)); + width: calc(100vw - $toolbars-width) !important; + } + .has-toolbar-collapsed.has-sidebar-collapsed & { + $toolbars-width: calc($toolbar-collapsed-width + $sidebar-collapsed-width); + left: calc(50% + calc($toolbars-width / 2)); + width: calc(100vw - $toolbars-width) !important; } } diff --git a/src/theme/ItaliaTheme/_main.scss b/src/theme/ItaliaTheme/_main.scss index d2b7dad38..0201a47d5 100644 --- a/src/theme/ItaliaTheme/_main.scss +++ b/src/theme/ItaliaTheme/_main.scss @@ -328,6 +328,36 @@ iframe { } } +//fix footer styles for volto-editablefooter footerTop field +.it-footer .it-footer-main .it-brand-wrapper .footerTop, +.footer-configuration-widget .footer-top-segment .block.gridBlock .grid-items { + h2 { + margin-bottom: 0; + font-size: 1.777778rem; + font-weight: 600; + letter-spacing: unset; + line-height: 1.1; + } + + h3 { + font-weight: 600; + } + + .block.image img { + width: auto; + height: 75px; + } + + .block.gridBlock { + .col { + &:has(.block.image) { + width: auto; + flex: 0 0 auto; + } + } + } +} + .bg-light { --bs-light-rgb: #{red($primary-a0)}, #{green($primary-a0)}, #{blue($primary-a0)}; diff --git a/src/theme/bootstrap-override/bootstrap-italia/_form.scss b/src/theme/bootstrap-override/bootstrap-italia/_form.scss index 28f3d7a6b..7389d3a20 100644 --- a/src/theme/bootstrap-override/bootstrap-italia/_form.scss +++ b/src/theme/bootstrap-override/bootstrap-italia/_form.scss @@ -5,12 +5,6 @@ &.is-invalid { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f73e5a' viewBox='0 0 384 512'%3E%3Cpath d='M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192 216.4 61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z'/%3E%3C/svg%3E"); - - small, - small.text-muted, - small.form-feedback.just-validate-error-label { - color: $danger !important; - } } .was-validated &:valid, @@ -50,3 +44,8 @@ } } } + +.invalid-feedback { + //nella versione vecchia di bootstrap-italia che usiamo (2.3.4) questa regola non c'è e serve. + display: block; +} diff --git a/yarn.lock b/yarn.lock index 8052dc649..243f8d55d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6571,16 +6571,16 @@ __metadata: typeface-lora: 0.0.72 typeface-roboto-mono: 0.0.75 typeface-titillium-web: 0.0.72 - volto-blocks-widget: 3.1.0 + volto-blocks-widget: 3.4.0 volto-data-grid-widget: 2.3.1 volto-dropdownmenu: 4.1.1 - volto-editablefooter: 5.0.3 - volto-feedback: 0.2.0 - volto-form-block: 3.3.1 + volto-editablefooter: 5.1.0 + volto-feedback: 0.3.0 + volto-form-block: 3.7.0 volto-gdpr-privacy: 2.1.1 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.0.0 - volto-querywidget-with-browser: 0.4.1 + volto-querywidget-with-browser: 0.4.2 volto-rss-block: 3.0.0 volto-secondarymenu: 4.0.0 volto-social-settings: 3.0.0 @@ -14302,12 +14302,12 @@ __metadata: languageName: node linkType: hard -"volto-blocks-widget@npm:3.1.0": - version: 3.1.0 - resolution: "volto-blocks-widget@npm:3.1.0" +"volto-blocks-widget@npm:3.4.0": + version: 3.4.0 + resolution: "volto-blocks-widget@npm:3.4.0" peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" - checksum: 91fc5fc102acdf17f8a8f733aef4331622246fc6b008a1c486dd21b08b71583332b53d32bb4a2b75529edaa5f740421c913e04a9565c09d03fbab41c5d700978 + checksum: 355675359cc64b23c0357de8b952195a9693543a7e95c2c1f463b65fc7bd081d64aca8f2086e95775d5771f7071d681276f18a968e666dbead40e2c48ee9843a languageName: node linkType: hard @@ -14331,32 +14331,33 @@ __metadata: languageName: node linkType: hard -"volto-editablefooter@npm:5.0.3": - version: 5.0.3 - resolution: "volto-editablefooter@npm:5.0.3" +"volto-editablefooter@npm:5.1.0": + version: 5.1.0 + resolution: "volto-editablefooter@npm:5.1.0" dependencies: react-outside-click-handler: 1.3.0 peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" - checksum: efbc8e7679dc78727fa465e238421346d682edc80780baa56baa8ec047e6009ed5dee436b120143c464427735820f2dac52fa98f9c46890a17f0e16c30a18c36 + volto-blocks-widget: ">=3.4.0" + checksum: 2a1316344048e7447da39b513e067b9368f90057d1ef9bc6541ba0b9cd4a1c04b5246943677a5238d3391c30f3778320fe6e12f3f7c8f310adc61b1c6c8016ad languageName: node linkType: hard -"volto-feedback@npm:0.2.0": - version: 0.2.0 - resolution: "volto-feedback@npm:0.2.0" +"volto-feedback@npm:0.3.0": + version: 0.3.0 + resolution: "volto-feedback@npm:0.3.0" dependencies: react-google-recaptcha-v3: 1.9.5 semantic-ui-css: 2.5.0 peerDependencies: "@plone/volto": ">=16.0.0" - checksum: ada1f08b987352d5856c2ade2aea4c26cf13a7d19f5e132fcb3213231b7f8e4b7d64fda981931a010c271002d3e76eb09759065274498a594c2dc0d0772e98b1 + checksum: 5d4fe0327995d0e6dfaaed5594938b463212856d80b66619f19815fcd1c65b71ed422f47b012082900dfff176d18806f6e568091ae1239288e870b5996a370b7 languageName: node linkType: hard -"volto-form-block@npm:3.3.1": - version: 3.3.1 - resolution: "volto-form-block@npm:3.3.1" +"volto-form-block@npm:3.7.0": + version: 3.7.0 + resolution: "volto-form-block@npm:3.7.0" dependencies: "@hcaptcha/react-hcaptcha": ^0.3.6 file-saver: ^2.0.5 @@ -14365,7 +14366,7 @@ __metadata: peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-subblocks: ^2.0.0 - checksum: 8bd22321126b19e5fccaff8f7783b42f83f7d4cc175d821bfe247c21bc9afcd52c9f301bc7b17ab1dbab0907748cd85e8897d3311ff30a50f84b2ebcc2465581 + checksum: c2289a75f34027be1f8fb6f8a69628f9dfc4b773ed757cad83be7a0f42259e3efdac56d5c17dbaca98aff772abc6a1cff8edaef766fe395ad18270cb36f2cf98 languageName: node linkType: hard @@ -14401,12 +14402,12 @@ __metadata: languageName: node linkType: hard -"volto-querywidget-with-browser@npm:0.4.1": - version: 0.4.1 - resolution: "volto-querywidget-with-browser@npm:0.4.1" +"volto-querywidget-with-browser@npm:0.4.2": + version: 0.4.2 + resolution: "volto-querywidget-with-browser@npm:0.4.2" peerDependencies: "@plone/volto": ^17.0.0 - checksum: a01eacb7fa67561066f288c7ba18f5af177a88deca142f57c33638eb63bc1894d46ac66f01c6d2e3ea4e4f43479b762a63246a08f6600d665174d55d2a49c207 + checksum: 881cede295a8609f1f01d67835533b73f0f8199e3fc2c209f350897b670a40f9c631567dacbbd0db8160a94c36c9b97465e87c2b90a82e2e128619f07658a212 languageName: node linkType: hard