Skip to content
Snippets Groups Projects
Commit 74011d6d authored by esikkala's avatar esikkala
Browse files

Improve main page layout

parent 1d75b44b
No related branches found
No related tags found
No related merge requests found
...@@ -15,11 +15,6 @@ const styles = theme => ({ ...@@ -15,11 +15,6 @@ const styles = theme => ({
overflow: 'auto' overflow: 'auto'
} }
}, },
heroContent: {
maxWidth: 1100,
paddingTop: theme.spacing(3),
paddingBottom: theme.spacing(1)
},
layout: { layout: {
width: 'auto', width: 'auto',
marginLeft: theme.spacing(3), marginLeft: theme.spacing(3),
...@@ -30,6 +25,10 @@ const styles = theme => ({ ...@@ -30,6 +25,10 @@ const styles = theme => ({
marginRight: 'auto' marginRight: 'auto'
} }
}, },
heroContent: {
paddingTop: theme.spacing(3),
paddingBottom: theme.spacing(1)
},
licenceText: { licenceText: {
marginTop: theme.spacing(0.5), marginTop: theme.spacing(0.5),
fontSize: '0.7em' fontSize: '0.7em'
...@@ -52,13 +51,9 @@ const Main = props => { ...@@ -52,13 +51,9 @@ const Main = props => {
{intl.get('selectPerspective')} {intl.get('selectPerspective')}
</Typography> </Typography>
</div> </div>
</div>
<div className={classes.layout}>
<Grid container spacing={1}> <Grid container spacing={1}>
{props.perspectives.map(perspective => <MainCard key={perspective.id} perspective={perspective} />)} {props.perspectives.map(perspective => <MainCard key={perspective.id} perspective={perspective} />)}
</Grid> </Grid>
</div>
<div className={classes.layout}>
<Typography className={classes.licenceText}>{intl.getHTML('mainPageImageLicence')}</Typography> <Typography className={classes.licenceText}>{intl.getHTML('mainPageImageLicence')}</Typography>
</div> </div>
</div> </div>
......
...@@ -22,6 +22,10 @@ const useStyles = makeStyles(theme => ({ ...@@ -22,6 +22,10 @@ const useStyles = makeStyles(theme => ({
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
}, },
[theme.breakpoints.up('lg')]: {
height: 180,
backgroundSize: 'cover'
},
'&:hover': { '&:hover': {
background: `linear-gradient( rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8) ), url(${props.perspective.frontPageImage})` background: `linear-gradient( rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8) ), url(${props.perspective.frontPageImage})`
} }
...@@ -35,7 +39,7 @@ const MainCard = props => { ...@@ -35,7 +39,7 @@ const MainCard = props => {
<Grid <Grid
className={classes.link} className={classes.link}
key={perspective.id} key={perspective.id}
item xs={12} sm={4} md item xs={12} sm={4} md lg={4}
component={Link} component={Link}
to={`/${perspective.id}/faceted-search`} to={`/${perspective.id}/faceted-search`}
> >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment