Skip to content

Commit

Permalink
Add eea settings in Volto config
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Mar 1, 2022
1 parent 49cad25 commit 472d08c
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 131 deletions.
120 changes: 120 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import biseLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/bise.svg';
import energyLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/energy.svg';
import insituLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/insitu.svg';
import ipchemLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/ipchem.svg';
import freshwaterLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/freshwater.svg';
import fiseLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/fise.svg';
import ccaLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/cca.svg';
import copernicusLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/copernicus.svg';
import industryLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/industry.svg';
import marineLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/marine.svg';

export const partnerWebsites = [
{
link: 'https://biodiversity.europa.eu/',
src: biseLogo,
alt: 'Biodiversity',
},
{
link: 'https://climate-energy.eea.europa.eu/',
src: energyLogo,
alt: 'Climate and energy in the EU',
},
{
link: 'https://insitu.copernicus.eu/',
src: insituLogo,
alt: 'Copernicus in situ',
},
{
link: 'https://ipchem.jrc.ec.europa.eu/RDSIdiscovery/ipchem/index.html',
src: ipchemLogo,
alt: 'Information platform for chemical monitoring',
},
{
link: 'https://water.europa.eu/freshwater',
src: freshwaterLogo,
alt: 'WISE freshwater',
},
{
link: 'https://forest.eea.europa.eu/',
src: fiseLogo,
alt: 'Forest information system for europe',
},
{
link: 'https://climate-adapt.eea.europa.eu/',
src: ccaLogo,
alt: 'Climate adapt',
},
{
link: 'https://land.copernicus.eu/',
src: copernicusLogo,
alt: 'Copernicus land monitoring service',
},
{
link: 'https://industry.eea.europa.eu/',
src: industryLogo,
alt: 'European industrial emissions portal',
},
{
link: 'https://water.europa.eu/marine',
src: marineLogo,
alt: 'WISE marine',
},
];

export const globalActions = [
{
link: 'https://www.eea.europa.eu/login_form',
title: 'CMS Login',
},
{
link: '/sitemap',
title: 'Sitemap',
},
{
link: 'https://www.eea.europa.eu/legal/',
title: 'Privacy',
},
{
link: 'https://www.eea.europa.eu/copyright',
title: '@Copyright',
},
];

export const socialActions = [
{
name: 'twitter',
link: 'https://twitter.com/euenvironment',
},
{
name: 'facebook',
link: 'https://www.facebook.com/European.Environment.Agency',
},
{
name: 'linkedin',
link: 'https://www.linkedin.com/company/european-environment-agency',
},
{
name: 'youtube',
link: 'https://www.youtube.com/user/EEAvideos',
},
{
name: 'rss',
link: '/subscription/news-feeds',
},
];

export const footerActions = [
{
icon: 'comment outline',
text: 'Ask your question',
link: 'https://www.eea.europa.eu/contact-us',
},
{
icon: 'envelope outline',
text: 'Sign up to our newsletter',
link: 'https://www.eea.europa.eu/subscription/targeted-subscription',
},
];

export const address = 'Kongens Nytorv 6 1050 Copenhagen K (+45) 33 36 71 00';
142 changes: 11 additions & 131 deletions src/customizations/volto/components/theme/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,139 +6,19 @@
import React from 'react';
import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
import { Grid, Image } from 'semantic-ui-react';
import Logo1 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group.svg';
import Logo2 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-3.svg';
import Logo3 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-154.svg';
import Logo4 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-95.svg';
import Logo5 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-2.svg';
import Logo6 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-98.svg';
import Logo7 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-5.svg';
import Logo8 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-96.svg';
import Logo9 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-4.svg';
import Logo10 from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/Extras/Group-1.svg';
import EIONETLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/EIONETLogo.png';
import EEALogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Footer/EEA-Logo-white.svg';

import EIONETLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/EIONETLogo.png';
import EEALogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/EEA-Logo-white.svg';

import config from '@plone/volto/registry';

const Footer = (props) => {
const defaultProps = {
actions: [
{
link: 'https://www.eea.europa.eu/login_form',
title: 'CMS Login',
copy: false,
},
{
link: '/sitemap',
title: 'Sitemap',
copy: false,
},
{
link: 'https://www.eea.europa.eu/legal/',
title: 'Privacy',
copy: false,
},
{
link: 'https://www.eea.europa.eu/copyright',
title: 'Copyright',
copy: true,
},
],
sites: [
{
link: 'https://biodiversity.europa.eu/',
src: Logo1,
alt: 'Biodiversity',
},
{
link: 'https://climate-energy.eea.europa.eu/',
src: Logo2,
alt: 'Climate and energy in the EU',
},
{
link: 'https://insitu.copernicus.eu/',
src: Logo3,
alt: 'Copernicus in situ',
},
{
link: 'https://ipchem.jrc.ec.europa.eu/RDSIdiscovery/ipchem/index.html',
src: Logo4,
alt: 'Information platform for chemical monitoring',
},
{
link: 'https://water.europa.eu/freshwater',
src: Logo5,
alt: 'WISE freshwater',
},
{
link: 'https://forest.eea.europa.eu/',
src: Logo6,
alt: 'Forest information system for europe',
},
{
link: 'https://climate-adapt.eea.europa.eu/',
src: Logo7,
alt: 'Climate adapt',
},
{
link: 'https://land.copernicus.eu/',
src: Logo8,
alt: 'Copernicus land monitoring service',
},
{
link: 'https://industry.eea.europa.eu/',
src: Logo9,
alt: 'European industrial emissions portal',
},
{
link: 'https://water.europa.eu/marine',
src: Logo10,
alt: 'WISE marine',
},
],
social: [
{
name: 'twitter',
link: 'https://twitter.com/euenvironment',
},
{
name: 'facebook',
link: 'https://www.facebook.com/European.Environment.Agency',
},
{
name: 'linkedin',
link: 'https://www.linkedin.com/company/european-environment-agency',
},
{
name: 'youtube',
link: 'https://www.youtube.com/user/EEAvideos',
},
{
name: 'rss',
link: '/subscription/news-feeds',
},
],
contacts: {
header: 'Contact Us',
contacts: [
{
icon: 'comment outline',
text: 'Ask your question',
link: 'https://www.eea.europa.eu/contact-us',
},
{
icon: 'envelope outline',
text: 'Sign up to our newsletter',
link: 'https://www.eea.europa.eu/subscription/targeted-subscription',
},
],
address: 'Kongens Nytorv 6 1050 Copenhagen K (+45) 33 36 71 00',
},
...props,
};
const { eea } = config.settings;

return (
<EEAFooter>
<EEAFooter.Header>The EEA also contributes to</EEAFooter.Header>
<EEAFooter.Sites sites={defaultProps.sites} />
<EEAFooter.Sites sites={config.settings.eea.partnerWebsites} />

<EEAFooter.SubFooter>
<div className="subfooter">
Expand Down Expand Up @@ -168,15 +48,15 @@ const Footer = (props) => {
</Grid.Column>
<Grid.Column mobile={6} tablet={5} computer={4}>
<div className="item">
<EEAFooter.Contact contacts={defaultProps.contacts} />
<EEAFooter.Social social={defaultProps.social} />
<EEAFooter.Contact contacts={eea.footerActions} />
<EEAFooter.Social social={eea.socialActions} />
</div>
</Grid.Column>
</Grid>
<Grid>
<Grid.Row>
<Grid.Column>
<EEAFooter.Actions actions={defaultProps.actions} />
<EEAFooter.Actions actions={eea.globalActions} />
</Grid.Column>
</Grid.Row>
</Grid>
Expand Down
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import * as eea from './config';

const applyConfig = (config) => {
config.settings.eea = {
...eea,
};

return config;
};

Expand Down

0 comments on commit 472d08c

Please sign in to comment.