Skip to content

Commit

Permalink
Merge pull request #404 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
kreafox authored Feb 24, 2025
2 parents dfaecbe + bd586aa commit 6935e03
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 39 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.3.12](https://github.com/eea/volto-cca-policy/compare/0.3.11...0.3.12) - 24 February 2025

#### :bug: Bug Fixes

- fix(style): prevent column break in main menu [kreafox - [`3fb7a9f`](https://github.com/eea/volto-cca-policy/commit/3fb7a9f8347e229acb896bd807fb658570ff615f)]
- fix(listing): code cleanup [kreafox - [`19d48f3`](https://github.com/eea/volto-cca-policy/commit/19d48f33afcbab5de0475c145fedb9c4121e397c)]
- fix(listing): remove organisation logo from mission events - refs #271085 [kreafox - [`4e6c459`](https://github.com/eea/volto-cca-policy/commit/4e6c4592d434c626b1e4fc0ddffdf8814a83c318)]

### [0.3.11](https://github.com/eea/volto-cca-policy/compare/0.3.10...0.3.11) - 21 February 2025

#### :rocket: Dependency updates
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-cca-policy",
"version": "0.3.11",
"version": "0.3.12",
"description": "@eeacms/volto-cca-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
15 changes: 6 additions & 9 deletions src/components/manage/Blocks/Listing/EventCardsListingView.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import { compose } from 'redux';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { connect, useSelector } from 'react-redux';
import { useSelector } from 'react-redux';
import { Card, Grid, Icon, Label, Image } from 'semantic-ui-react';
import { ConditionalLink, UniversalLink } from '@plone/volto/components';
import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
import eeaLogo from '@eeacms/volto-cca-policy/../theme/assets/images/eea-logo.svg';
import { capitalizeFirstLetter } from '@eeacms/volto-cca-policy/helpers';
import config from '@plone/volto/registry';

import eeaLogo from '@eeacms/volto-cca-policy/../theme/assets/images/eea-logo.svg';
import './styles.less';

const goToContact = (contactInfo) =>
Expand Down Expand Up @@ -97,10 +97,11 @@ const BottomInfo = ({ item, isEditMode }) => {
const { '@type': itemType, event_url, subjects, contact_email } = item || {};
const isCcaEventType = itemType === 'cca-event';
const isExternal = event_url && !event_url.includes(config.settings.apiPath);
const isMissionEvent = item['@id'].includes('/en/mission');

return (
<>
{(!isExternal || isCcaEventType) && (
{!isMissionEvent && (!isExternal || isCcaEventType) && (
<div className="event-organisation">
<FormattedMessage
id="Organised by EEA"
Expand Down Expand Up @@ -166,8 +167,4 @@ EventCardsListingView.propTypes = {
isEditMode: PropTypes.bool,
};

export default compose(
connect((state) => ({
token: state.userSession.token,
})),
)(EventCardsListingView);
export default EventCardsListingView;
21 changes: 6 additions & 15 deletions src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { compose } from 'redux';
import cx from 'classnames';
import { ConditionalLink } from '@plone/volto/components';
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers';

import './styles.less';

const fixedTitles = {
Expand All @@ -16,22 +14,19 @@ const fixTitle = (title) => {
return fixedTitles[title] || title;
};

const IndicatorCardsListingView = ({ items, isEditMode, token }) => {
const IndicatorCardsListingView = ({ items, isEditMode }) => {
return (
<div className={cx('ui fluid indicatorCards')}>
<div className="ui fluid indicatorCards">
{items.map((item, index) => (
<div
className={cx('u-item listing-item simple-listing-item')}
key={item['@id']}
>
<div className="u-item listing-item simple-listing-item" key={index}>
<div className="wrapper">
<div className="slot-top">
<ConditionalLink
to={flattenToAppURL(getBaseUrl(item['@id']))}
condition={!isEditMode}
>
<div className="listing-body">
<h4 className={'listing-header'}>
<h4 className="listing-header">
{item.title ? item.title : item.id}
</h4>
</div>
Expand Down Expand Up @@ -61,8 +56,4 @@ IndicatorCardsListingView.propTypes = {
isEditMode: PropTypes.bool,
};

export default compose(
connect((state) => ({
token: state.userSession.token,
})),
)(IndicatorCardsListingView);
export default IndicatorCardsListingView;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import { makeContributionsSearchQuery } from '@eeacms/volto-cca-policy/helpers';
import { UniversalLink } from '@plone/volto/components';
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
import { makeContributionsSearchQuery } from '@eeacms/volto-cca-policy/helpers';

import './styles.less';
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';

const messages = defineMessages({
website: {
Expand All @@ -19,7 +19,7 @@ const OrganisationCardsListingView = ({ items }) => {
return (
<div className="ui fluid four cards">
{items.map((item, index) => (
<div className="ui fluid card u-card" key={item['@id']}>
<div className="ui fluid card u-card" key={index}>
<div className="content">
<div className="header">
<UniversalLink className="image" href={item['@id']}>
Expand Down
7 changes: 1 addition & 6 deletions src/components/manage/Blocks/Listing/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ div.organisationCards {
// Indicators Cards Listing
div.indicatorCards {
a {
color: #006bb8 !important;
color: @linkColor !important;
}

h4 {
Expand Down Expand Up @@ -91,10 +91,6 @@ div.indicatorCards {
justify-content: flex-start;
gap: 1em;

.sep {
color: #ddd;
}

.email-info {
display: flex;
align-items: center;
Expand Down Expand Up @@ -125,7 +121,6 @@ div.indicatorCards {
align-items: center;
margin: 1em 0;
gap: 0.5em;
// flex-direction: column;
}
}
}
Expand Down
13 changes: 8 additions & 5 deletions theme/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
@import './blocks.less';
@import './print.less';

// [class~='view-defaultview'] [id='page-document'] > *,
// [class~='view-viewview'] [id='page-document'] > * {
// --container-text-width: 628px;
// }

@subsiteBackgroundGradient: linear-gradient(
248.86deg,
@green-1 24.22%,
Expand Down Expand Up @@ -237,3 +232,11 @@ iframe {
}
}
}

#mega-menu {
.ui.list.has--4--columns {
a.item {
break-inside: avoid-column;
}
}
}

0 comments on commit 6935e03

Please sign in to comment.