Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frontend/src/components/events/EventCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const useStyles = makeStyles(theme => ({
flex: 1,
},
top: {
height: '148px',
height: '200px',
maxWidth: 'min(100%, 400px)',
aspectRatio: '16/9',
margin: '0 auto',
position: 'relative',
display: 'flex',
justifyContent: 'flex-end',
Expand Down
59 changes: 44 additions & 15 deletions frontend/src/components/events/EventHeroImage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'

import { useDispatch } from 'react-redux'
import { goBack } from 'connected-react-router'
import { Box } from '@material-ui/core'
import { Box, Grid } from '@material-ui/core'
import { makeStyles } from '@material-ui/core/styles'

import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos'
Expand All @@ -12,22 +12,31 @@ import Container from 'components/generic/Container'

const useStyles = makeStyles(theme => ({
wrapper: {
position: 'relative',
background: props => props.backgroundColor ?? undefined,
paddingTop: theme.spacing(2),
},
imageContainer: {
display: 'flex',
overflow: 'hidden',
},
image: {
zIndex: 1,
top: 0,
left: 0,
width: '100%',
height: '465px',
objectFit: 'cover',
aspectRatio: '16/9',
maxHeight: 500,
borderRadius: 6,
margin: '0 auto',
boxShadow: '2px 7px 15px rgba(0, 0, 0, 0.12)',
},
backButtonWrapper: {
position: 'absolute',
zIndex: 10,
width: 'auto',
paddingTop: theme.spacing(3),
top: 0,
left: 0,
},
buttonInner: {
color: 'black',
Expand Down Expand Up @@ -67,20 +76,40 @@ const useStyles = makeStyles(theme => ({
},
}))

export default ({ event, title = '', subheading = '', onBack }) => {
export default ({
event,
title = '',
subheading = '',
onBack,
backgroundColor,
alignRight,
}) => {
const dispatch = useDispatch()
const classes = useStyles()
const classes = useStyles({ backgroundColor })
return (
<Box className={classes.wrapper}>
<Image
className={classes.image}
publicId={event?.coverImage?.publicId}
defaultImage={require('assets/images/default_cover_image.png')}
transformation={{
width: 1440,
height: 465,
}}
/>
<Container>
<Grid container>
{alignRight && <Grid item xs={12} md={4} />}
<Grid
item
xs={12}
md={alignRight ? 8 : 12}
className={classes.imageContainer}
>
<Image
className={classes.image}
publicId={event?.coverImage?.publicId}
defaultImage={require('assets/images/default_cover_image.png')}
transformation={{
width: 1920,
height: 1080,
}}
/>
</Grid>
</Grid>
</Container>

{/* <Box className={classes.logoWrapper}>
<FadeInWrapper enterDelay={0.3} verticalOffset={50}>
<Box
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/pages/_events/slug/default/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ export default () => {
<meta property="og:image" content={coverImage()} />
<meta name="twitter:image" content={coverImage()} />
</Helmet>
<EventHeroImage event={event} onBack={() => dispatch(push('/'))} />

<EventHeroImage
event={event}
onBack={() => dispatch(push('/'))}
alignRight
backgroundColor={event.theme.headerBackgroundColor}
/>
<FadeInWrapper>
<StaggeredList>
<Box className={classes.header}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/_pricing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default () => {
const { t } = useTranslation()
const body1 = [
'Event registration and organization through platform.',
'For non - profit organizations.'
'For non - profit organizations.',
]
const body2 = [
'Event registration and organization through platform',
Expand Down