diff --git a/src/client/components/main_layout/Main.js b/src/client/components/main_layout/Main.js index 0a2fce3d72d02b17a649430ec7408d568c42179b..f5493078e57e27aa005b16f3ae61dd7f79818dc3 100644 --- a/src/client/components/main_layout/Main.js +++ b/src/client/components/main_layout/Main.js @@ -10,7 +10,7 @@ import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; import { Link } from 'react-router-dom'; import { has } from 'lodash'; -import thumbImage from '../../img/thumb.png'; +import defaultThumbImage from '../../img/thumb.png'; const styles = theme => ({ root: { @@ -84,7 +84,9 @@ let Main = props => { <CardActionArea> <CardMedia className={classes.media} - image={thumbImage} + image={has(perspective, 'thumbImage') + ? perspective.thumbImage + : defaultThumbImage} title={perspective.label} /> <CardContent className={classes.cardContent}> @@ -102,7 +104,9 @@ let Main = props => { <CardActionArea component={Link} to={`/${perspective.id}/faceted-search`}> <CardMedia className={classes.media} - image={thumbImage} + image={has(perspective, 'thumbImage') + ? perspective.thumbImage + : defaultThumbImage} title={perspective.label} /> <CardContent className={classes.cardContent}> diff --git a/src/client/components/perspectives/PerspectiveArray.js b/src/client/components/perspectives/PerspectiveArray.js index 947550aa09d44f078a65ce9ab846db8edfbfaae9..2216b22f2700a151b8f79afaa9daacb6a059fc23 100644 --- a/src/client/components/perspectives/PerspectiveArray.js +++ b/src/client/components/perspectives/PerspectiveArray.js @@ -1,9 +1,12 @@ +// import akaLogo from '../../img/logos/funders/aka_en_vaaka_rgb.jpg'; + export const perspectiveArr = [ { id: 'manuscripts', label: 'Manuscripts', desc: 'Physical manuscript objects.', // externalUrl: 'https://seco.cs.aalto.fi/', + // thumbImage: akaLogo, // note: the image has to be imported in this js file tabs: [ { id: 'table',