Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
- ...
-->

## Versione X.X.X (xx/xx/xxxx)

### Fix

- Rimosso il link dagli elementi di tipo immagine dagli slider del blocco elenco.

## Versione 12.11.2 (06/03/2026)

### Fix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { defineMessages } from 'react-intl';
import { UniversalLink } from '@plone/volto/components';
import { ConditionalLink } from '@plone/volto/components';
import { Container } from 'design-react-kit';
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';

Expand All @@ -21,6 +21,7 @@ const SlideItemDefault = ({
userAutoplay,
slider,
}) => {
const isImage = item['@type'] === 'Image';
return (
<React.Fragment>
{image ? (
Expand All @@ -30,32 +31,38 @@ const SlideItemDefault = ({
)}
{show_image_title && (
<div className="slide-title">
<UniversalLink
<ConditionalLink
/* Se l'elemento è di tipo Image, non passiamo l'oggetto item per disabilitare il link mantenendo l'uso di UniversalLink */
item={item}
condition={!isImage}
tabIndex={0}
data-slide={index}
className={'slide-link no-external-if-link'}
>
{full_width ? (
<Container>
{item.title}{' '}
<Icon
icon="arrow-right"
key="arrow-right-fw"
title={intl.formatMessage(messages.openLink)}
/>
{!isImage && (
<Icon
icon="arrow-right"
key="arrow-right-fw"
title={intl.formatMessage(messages.openLink)}
/>
)}
</Container>
) : (
<>
{item.title}{' '}
<Icon
icon="arrow-right"
key="arrow-right"
title={intl.formatMessage(messages.openLink)}
/>
{!isImage && (
<Icon
icon="arrow-right"
key="arrow-right"
title={intl.formatMessage(messages.openLink)}
/>
)}
</>
)}
</UniversalLink>
</ConditionalLink>
</div>
)}
</React.Fragment>
Expand Down
2 changes: 2 additions & 0 deletions src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ const SliderTemplate = ({
sizes={`max-width(991px) 620px, ${1300 / nSlidesToShow}px`}
critical
showDefault
/* Se l'elemento è di tipo Image, disabilitiamo il link che avvolge l'immagine */
noWrapLink={item['@type'] === 'Image'}
/>
);
const nextIndex = index < items.length - 1 ? index + 1 : null;
Expand Down
10 changes: 5 additions & 5 deletions src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@
margin: 0 auto;

background-color: #3f4142e0;
color: $white;

.slide-link {
color: $white;
&:hover,
&:active {
text-decoration-line: underline;
}
}

font-size: 1.8rem;
font-weight: bold;
text-decoration: none;

&:hover,
&:active {
text-decoration-line: underline;
}

.icon {
margin-left: 0.5em;
}
Expand Down