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
5 changes: 5 additions & 0 deletions frontend/packages/devsite/locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,8 @@ msgstr ""
#: components/Controlpanels/UpgradeControlPanel
msgid "Your site is up to date."
msgstr ""

#. Default: "Zoom"
#: components/Blocks/Listing/ImageAlbum
msgid "Zoom"
msgstr ""
5 changes: 5 additions & 0 deletions frontend/packages/devsite/locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,8 @@ msgstr ""
#: components/Controlpanels/UpgradeControlPanel
msgid "Your site is up to date."
msgstr ""

#. Default: "Zoom"
#: components/Blocks/Listing/ImageAlbum
msgid "Zoom"
msgstr ""
5 changes: 5 additions & 0 deletions frontend/packages/devsite/locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,8 @@ msgstr ""
#: components/Controlpanels/UpgradeControlPanel
msgid "Your site is up to date."
msgstr ""

#. Default: "Zoom"
#: components/Blocks/Listing/ImageAlbum
msgid "Zoom"
msgstr ""
5 changes: 5 additions & 0 deletions frontend/packages/devsite/locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,8 @@ msgstr ""
#: components/Controlpanels/UpgradeControlPanel
msgid "Your site is up to date."
msgstr ""

#. Default: "Zoom"
#: components/Blocks/Listing/ImageAlbum
msgid "Zoom"
msgstr "Visualizar"
7 changes: 6 additions & 1 deletion frontend/packages/devsite/locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2025-08-06T16:50:29.518Z\n"
"POT-Creation-Date: 2025-08-20T22:43:27.383Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Content-Type: text/plain; charset=utf-8\n"
Expand Down Expand Up @@ -142,3 +142,8 @@ msgstr ""
#: components/Controlpanels/UpgradeControlPanel
msgid "Your site is up to date."
msgstr ""

#. Default: "Zoom"
#: components/Blocks/Listing/ImageAlbum
msgid "Zoom"
msgstr ""
1 change: 1 addition & 0 deletions frontend/packages/devsite/news/5.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Altera botão de abertura da modal de pré-visualização do album de imagens. @ericof
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
import React, { useState } from 'react';
import { defineMessages } from 'react-intl';
import { useIntl } from 'react-intl';
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
import Icon from '@plone/volto/components/theme/Icon/Icon';
import { Button, Modal } from 'semantic-ui-react';
import { Container } from '@plone/components';
import type { ContainedItem } from '@plone/types';
import zoomSVG from '@plone/volto/icons/zoom-in.svg';
import config from '@plone/volto/registry';

const messages = defineMessages({
zoomAction: {
id: 'Zoom',
defaultMessage: 'Zoom',
},
});

const AlbumItem = ({ item }: { item: ContainedItem }) => {
const intl = useIntl();
const [modalOpen, setModalOpen] = useState(false);
const baseURL = flattenToAppURL(item['@id']);
const imageField = item.image_field || 'image';
const image = item.image_scales?.[imageField]?.[0] || {};
const scales = image.scales || {};
const originalImage = `${baseURL}/${image?.download}`;
const previewImage = `${baseURL}/${scales?.preview?.download}`;
const acao = intl.formatMessage(messages.zoomAction);
return (
image && (
<div className="album-item">
Expand All @@ -26,11 +39,12 @@ const AlbumItem = ({ item }: { item: ContainedItem }) => {
size="fullscreen"
trigger={
<Button
className="btn-open"
title={item.title}
className="zoom btn-open"
title={acao}
onClick={(evt) => evt.preventDefault()}
>
<span>{item.title}</span>
<Icon name={zoomSVG} className={'zoom icon'} />
<span className="zoom text">{acao}</span>
</Button>
}
onClose={() => setModalOpen(false)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
pointer-events: none;
text-align: center;
transition: opacity 0.3s ease;
.zoom.btn-open {
display: flex;
flex-direction: row;
align-items: center;
background-color: var(--primary-color);
color: var(--primary-foreground-color);
gap: $spacing-small;
.icon {
filter: drop-shadow(1px 1px var(--primary-foreground-color));
}
}
}
&:hover {
.album-item-image {
Expand Down
Loading