Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/eea/volto-ims-theme into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
Alex Medesan committed Jan 27, 2021
2 parents 7676f2c + 8869ccd commit 9762919
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 11 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,35 @@ 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).

#### [1.1.0](https://github.com/eea/volto-ims-theme/compare/1.0.3...1.1.0)

- erge branch 'master' into develop [`e002ceb`](https://github.com/eea/volto-ims-theme/commit/e002ceb2caf61ee349851d30a3fd0497713b4a76)
- fix after merge with develop [`4672d9a`](https://github.com/eea/volto-ims-theme/commit/4672d9a8408b4c8bc54cab14fe022733c4141c92)
- implemented design for mobile sidebar also [`d7941fc`](https://github.com/eea/volto-ims-theme/commit/d7941fce67e453a9702bc38a4bd5d45e7d0b0092)
- Force reload on all themes links [`b63e90f`](https://github.com/eea/volto-ims-theme/commit/b63e90f396d7fb6a83138c30ace61a5af9d551ef)
- Force window.location refresh on nav and language links click [`0d97a48`](https://github.com/eea/volto-ims-theme/commit/0d97a48b6a2ff79b8731ab86d94281a716a84871)
- css list items are black and adjusted size, close sidebar on login [`c061778`](https://github.com/eea/volto-ims-theme/commit/c0617782d1be1d83c1513687b9257c46370b4ea4)
- added api to suggestions request [`d5f8c85`](https://github.com/eea/volto-ims-theme/commit/d5f8c85c1390902d452946ddcd0905b06bce1a62)
- Remove undefined function call [`71ae852`](https://github.com/eea/volto-ims-theme/commit/71ae852c249c3e209c29a6c3a3a0fd24be4b02a7)

#### [1.0.3](https://github.com/eea/volto-ims-theme/compare/1.0.2...1.0.3)

> 18 January 2021
- Release 1.0.3 [`31a1a96`](https://github.com/eea/volto-ims-theme/commit/31a1a967295cf66cacb2cfa9eab459eec0f6fd3a)
- merge origin [`ca37c7f`](https://github.com/eea/volto-ims-theme/commit/ca37c7f8b8ee11a51286112feaabb7ec33d41756)
- footer padding and icons size fix [`b2ec7c7`](https://github.com/eea/volto-ims-theme/commit/b2ec7c7248815a0864564b647477ac8f1515a4db)

#### [1.0.2](https://github.com/eea/volto-ims-theme/compare/1.0.1...1.0.2)

> 15 January 2021
- fix eea menu styling [`b00df36`](https://github.com/eea/volto-ims-theme/commit/b00df36abd2a038e1923931f218d09ea10c816d0)
- media query fix for header and footer [`c2b19f1`](https://github.com/eea/volto-ims-theme/commit/c2b19f14b3617a5de3531c49c9d6607b81fea60d)
- menu and logo style fix [`5614ae4`](https://github.com/eea/volto-ims-theme/commit/5614ae45e65396987f8d3bb6fadbd9518cdb4945)
- fixed header width [`95b568d`](https://github.com/eea/volto-ims-theme/commit/95b568d7f98eddb563dd2a93ae058758f7ac7a6d)
- Add link on EU flag [`ad876f0`](https://github.com/eea/volto-ims-theme/commit/ad876f09a23f23df5169a16311ec66d0d7033cbf)
- Release 1.0.2 [`8e4707d`](https://github.com/eea/volto-ims-theme/commit/8e4707de2f5eca65ff89c8bce618a4279378bf76)
- header media query fix [`7e45f17`](https://github.com/eea/volto-ims-theme/commit/7e45f17cc467349abcb6422121a4e4488c888cb3)
- change fontName [`cefb11e`](https://github.com/eea/volto-ims-theme/commit/cefb11e399f0cacf70f2af7a11ef433871e4c43e)

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-ims-theme",
"version": "1.0.2",
"version": "1.1.0",
"description": "volto-ims-theme: Volto Theme: EEA IMS",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
59 changes: 55 additions & 4 deletions src/customizations/components/theme/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import EUflag from '../../../../../theme/site/assets/images/europe-flag.svg';
* @returns {string} Markup of the component
*/
class Footer extends Component {
onLinkClick(evt, url) {
evt.preventDefault();
window.location = url;
}

render() {
return (
<Segment className="footer-wrapper">
Expand Down Expand Up @@ -244,18 +249,40 @@ class Footer extends Component {
</span>
</div>
<div className="mx-2">
<a href="https://www.eea.europa.eu/contact-us">
<a
href="https://www.eea.europa.eu/contact-us"
onClick={(evt) =>
this.onLinkClick(
evt,
'https://www.eea.europa.eu/contact-us',
)
}
>
<Icon name="comment" />
</a>
<span>
<a
href="https://www.eea.europa.eu/contact-us"
className="block"
onClick={(evt) =>
this.onLinkClick(
evt,
'https://www.eea.europa.eu/contact-us',
)
}
>
Ask your question
</a>
<br />
<a href="https://www.eea.europa.eu/media/">
<a
href="https://www.eea.europa.eu/media/"
onClick={(evt) =>
this.onLinkClick(
evt,
'https://www.eea.europa.eu/media/',
)
}
>
Media enquiries
</a>
</span>
Expand Down Expand Up @@ -293,7 +320,15 @@ class Footer extends Component {
<p className="colophon-links">
<Icon name="database" />
Engineered by:&nbsp;
<a href="https://www.eea.europa.eu/help/contact-info">
<a
href="https://www.eea.europa.eu/help/contact-info"
onClick={(evt) =>
this.onLinkClick(
evt,
'https://www.eea.europa.eu/help/contact-info',
)
}
>
EEA Web Team
</a>
</p>
Expand All @@ -313,6 +348,9 @@ class Footer extends Component {
<p className="colophon-links">
<a
href="https://www.eea.europa.eu/code"
onClick={(evt) =>
this.onLinkClick(evt, 'https://www.eea.europa.eu/code')
}
title="Code for developers"
>
Code for developers
Expand All @@ -326,7 +364,14 @@ class Footer extends Component {
</p>

<p className="colophon-links">
<a href="https://www.eea.europa.eu/legal/">Legal notice</a>
<a
href="https://www.eea.europa.eu/legal/"
onClick={(evt) =>
this.onLinkClick(evt, 'https://www.eea.europa.eu/legal/')
}
>
Legal notice
</a>
</p>

<p className="colophon-links">
Expand All @@ -343,6 +388,12 @@ class Footer extends Component {
<p className="colophon-links">
<a
href="https://www.eea.europa.eu/login_form"
onClick={(evt) =>
this.onLinkClick(
evt,
'https://www.eea.europa.eu/login_form',
)
}
title="Log in to CMS"
>
<strong>CMS login</strong>
Expand Down
7 changes: 6 additions & 1 deletion src/customizations/components/theme/Logo/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ const messages = defineMessages({
const Logo = () => {
const lang = useSelector((state) => state.intl.locale);
const intl = useIntl();
const url = settings.isMultilingual ? `/${lang}` : '/';

return (
<Link
to={settings.isMultilingual ? `/${lang}` : '/'}
to={url}
title={intl.formatMessage(messages.site)}
onClick={(evt) => {
evt.preventDefault();
window.location = url;
}}
>
<Image
src={LogoImage}
Expand Down
24 changes: 21 additions & 3 deletions src/customizations/components/theme/Navigation/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class Navigation extends Component {
super(props);
this.toggleMobileMenu = this.toggleMobileMenu.bind(this);
this.closeMobileMenu = this.closeMobileMenu.bind(this);
this.onLinkClick = this.onLinkClick.bind(this);
this.state = {
isMobileMenuOpen: false,
activeIndex: -1,
Expand Down Expand Up @@ -197,6 +198,17 @@ class Navigation extends Component {
this.setState({ isMobileMenuOpen: false });
}

/**
* Click an internal link
* @method onLinkClick
* @returns {undefined}
*/
onLinkClick(evt, url) {
evt.preventDefault();
this.closeMobileMenu();
window.location = url;
}

/**
* Render method.
* @method render
Expand Down Expand Up @@ -261,7 +273,7 @@ class Navigation extends Component {
? item.url === `/${lang}`
: item.url === ''
}
onClick={this.closeMobileMenu}
onClick={(evt) => this.onLinkClick(evt, item.url || '/')}
>
{item.title}
</NavLink>
Expand All @@ -286,7 +298,10 @@ class Navigation extends Component {
<List.Content>
<List.Description>
<a
href={`https://www.eea.europa.eu/${language.code}`}
href={`/${language.code}`}
onClick={(evt) =>
this.onLinkClick(evt, `/${language.code}`)
}
>
{`${language.name} (${language.code})`}
</a>
Expand Down Expand Up @@ -316,7 +331,10 @@ class Navigation extends Component {
<List.Content>
<List.Description>
<a
href={`https://www.eea.europa.eu/${language.code}`}
href={`/${language.code}`}
onClick={(evt) =>
this.onLinkClick(evt, `/${language.code}`)
}
>
{`${language.name} (${language.code})`}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
Icon,
Input,
List,
Popup
Popup,
} from 'semantic-ui-react';

const messages = defineMessages({
Expand Down Expand Up @@ -58,6 +58,7 @@ class SearchWidget extends Component {
this.onChangeText = this.onChangeText.bind(this);
this.onChangeSection = this.onChangeSection.bind(this);
this.onGoToSearchPage = this.onGoToSearchPage.bind(this);
this.onLinkClick = this.onLinkClick.bind(this);
this.state = {
text: '',
section: false,
Expand All @@ -66,6 +67,16 @@ class SearchWidget extends Component {
};
}

/**
* Click an internal link
* @method onLinkClick
* @returns {undefined}
*/
onLinkClick(evt, url) {
evt.preventDefault();
window.location = url;
}

/**
* On change text
* @method onChangeText
Expand Down Expand Up @@ -168,6 +179,12 @@ class SearchWidget extends Component {
<a
className="pull-right"
href="https://www.eea.europa.eu/help/glossary"
onClick={(evt) =>
this.onLinkClick(
evt,
'https://www.eea.europa.eu/help/glossary',
)
}
>
A-Z Glossary
</a>
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const applyConfig = (config) => {
config.settings.allowed_cors_destinations = [
...(config.settings.allowed_cors_destinations || []),
'www.eea.europa.eu',
'www.eea.europa.eu/eea-custom-search.tags',
];

return config;
Expand Down

0 comments on commit 9762919

Please sign in to comment.