Skip to content

Commit

Permalink
xchem#149 changed "Supported by" to "Contributors" and added more ent…
Browse files Browse the repository at this point in the history
…ities
  • Loading branch information
matej-vavrek authored and tibor-postek-m2ms committed Mar 10, 2020
1 parent cb7a766 commit 71cbe49
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 28 deletions.
95 changes: 69 additions & 26 deletions js/components/funders/fundersModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import React, { memo } from 'react';
import Modal from '../common/Modal';
import { Grid, makeStyles } from '@material-ui/core';
import { Grid, makeStyles, Typography } from '@material-ui/core';

const useStyles = makeStyles(theme => ({
image: {
Expand All @@ -16,7 +16,7 @@ const useStyles = makeStyles(theme => ({
cursor: 'pointer',
margin: 'auto',
display: 'block',
maxWidth: '95%',
maxWidth: '72%',
maxHeight: '100%'
}
}));
Expand All @@ -29,53 +29,68 @@ export const FundersModal = memo(({ openModal, onModalClose }) => {
onModalClose();
}

const openLink = link => {
// window.location.href = link;
window.open(link, 'blank');
};

// funded by
const openXchem = () => {
// window.location.href = 'https://www.diamond.ac.uk/Instruments/Mx/Fragment-Screening.html';
window.open('https://www.diamond.ac.uk/Instruments/Mx/Fragment-Screening.html', 'blank');
openLink('https://www.diamond.ac.uk/Instruments/Mx/Fragment-Screening.html');
};
const openDls = () => {
// window.location.href = 'https://www.diamond.ac.uk/Home.html';
window.open('https://www.diamond.ac.uk/Home.html', 'blank');
openLink('https://www.diamond.ac.uk/Home.html');
};
const openSgc = () => {
// window.location.href = 'https://www.sgc.ox.ac.uk/';
window.open('https://www.sgc.ox.ac.uk/', 'blank');
openLink('https://www.sgc.ox.ac.uk/');
};
const openInext = () => {
// window.location.href = 'http://www.inext-eu.org/';
window.open('http://www.inext-eu.org/', 'blank');
openLink('http://www.inext-eu.org/');
};
const openJff = () => {
// window.location.href = 'https://researchsupport.admin.ox.ac.uk/funding/internal/jff';
window.open('https://researchsupport.admin.ox.ac.uk/funding/internal/jff', 'blank');
openLink('https://researchsupport.admin.ox.ac.uk/funding/internal/jff');
};
const openNf = () => {
// window.location.href = 'https://www.newtonfund.ac.uk/';
window.open('https://www.newtonfund.ac.uk/', 'blank');
openLink('https://www.newtonfund.ac.uk/');
};
const openMrc = () => {
// window.location.href = 'https://mrc.ukri.org/';
window.open('https://mrc.ukri.org/', 'blank');
openLink('https://mrc.ukri.org/');
};
const openWt = () => {
// window.location.href = 'https://wellcome.ac.uk/';
window.open('https://wellcome.ac.uk/', 'blank');
openLink('https://wellcome.ac.uk/');
};
const openUltradd = () => {
// window.location.href = 'https://ultra-dd.org/';
window.open('https://ultra-dd.org/', 'blank');
openLink('https://ultra-dd.org/');
};
const openImi = () => {
// window.location.href = 'https://www.imi.europa.eu/';
window.open('https://www.imi.europa.eu/', 'blank');
openLink('https://www.imi.europa.eu/');
};
const openHorizon = () => {
// window.location.href = 'https://ec.europa.eu/programmes/horizon2020/';
window.open('https://ec.europa.eu/programmes/horizon2020/', 'blank');
openLink('https://ec.europa.eu/programmes/horizon2020/');
};
const openJanssen = () => {
openLink('https://www.janssen.com/');
};
// contributors and collaborators
const openM2ms = () => {
openLink('https://www.en.m2ms.sk/');
};
const openInformatics = () => {
openLink('https://www.informaticsmatters.com/');
};
const openAcellera = () => {
openLink('https://www.acellera.com/');
};
const openOxrse = () => {
openLink('https://www.rse.ox.ac.uk/');
};
const openMolsoft = () => {
openLink('https://www.molsoft.com/');
};

return (
<Modal open={openModal} onClose={() => onModalClose()}>
<Typography variant="h5">Funded by:</Typography>
<Grid container justify="center" alignItems="center">
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/xchemLogo.png')} className={classes.img} onClick={() => openXchem()} />
Expand All @@ -99,17 +114,45 @@ export const FundersModal = memo(({ openModal, onModalClose }) => {
<img src={require('../../img/jffLogo.jpg')} className={classes.img} onClick={() => openJff()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/nfLogo.png')} className={classes.img} onClick={() => openNf()} />
<img src={require('../../img/ultraddLogo.png')} className={classes.img} onClick={() => openUltradd()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/ultraddLogo.png')} className={classes.img} onClick={() => openUltradd()} />
<img src={require('../../img/nfLogo.png')} className={classes.img} onClick={() => openNf()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/imiLogo.png')} className={classes.img} onClick={() => openImi()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/horizon2020Logo.jpg')} className={classes.img} onClick={() => openHorizon()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/janssenLogo.png')} className={classes.img} onClick={() => openJanssen()} />
</Grid>
</Grid>
<Typography variant="h5">Contributors and collaborators:</Typography>
<Grid container justify="center" alignItems="center">
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/m2msLogo.png')} className={classes.img} onClick={() => openM2ms()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img
src={require('../../img/informaticsLogo.png')}
className={classes.img}
onClick={() => openInformatics()}
/>
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/acelleraLogo.png')} className={classes.img} onClick={() => openAcellera()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/oxrseLogo.png')} className={classes.img} onClick={() => openOxrse()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/molsoftLogo.png')} className={classes.img} onClick={() => openMolsoft()} />
</Grid>
<Grid item xs={4} md={4} className={classes.image}>
<img src={require('../../img/janssenLogo.png')} className={classes.img} onClick={() => openJanssen()} />
</Grid>
</Grid>
</Modal>
);
Expand Down
4 changes: 2 additions & 2 deletions js/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export default memo(
size="small"
onClick={() => setOpenFunders(true)}
>
Supported by
Contributors
</Button>
</Grid>
</Grid>
Expand Down Expand Up @@ -332,7 +332,7 @@ export default memo(
<ListItemIcon>
<SupervisorAccount />
</ListItemIcon>
<ListItemText primary="Supported by" />
<ListItemText primary="Contributors" />
</ListItem>
<Divider />
{authListItem}
Expand Down

0 comments on commit 71cbe49

Please sign in to comment.