back to top, main card

This commit is contained in:
2022-05-31 22:45:38 +02:00
parent 7c17607c27
commit 6f247c37fd
6 changed files with 73 additions and 68 deletions
+39 -43
View File
@@ -20,52 +20,48 @@ const MainCard = ({ imageURL, title, description, url }) => {
const options = {
reverse: true,
speed: 1200,
reset: false,
easing: 'cubic-bezier(.09,.67,.54,.76)'
// reset: false,
};
return (
<a
href={url}
target='_blank'
rel='noopener noreferrer'
style={{ textDecoration: 'none' }}>
<Tilt
// onClick={(e) => handleClick(e)}
options={options}
children={
<Card
sx={{
maxWidth: '320px',
mx: 'auto',
color: theme.palette.text.secondary,
backgroundColor: theme.palette.background.paper,
// '&:hover': {
// transition: 'all .7s ease',
// boxShadow: `1px 1px 20px 10px ${shadowColor}`,
// },
}}>
<CardActionArea>
<CardMedia
component='img'
height='150'
image={imageURL}
alt={title}
/>
<CardContent color='white'>
<Typography gutterBottom variant='h6' component='div'>
{title}
</Typography>
<Typography></Typography>
{{ description } !== '' && (
<Typography variant='body2'>{description}</Typography>
)}
</CardContent>
</CardActionArea>
</Card>
}
style={{ padding: 0, margin: 0 }}
/>
</a>
<Tilt
// style={{ padding: 0, margin: 0 }}
options={options}
children={
<Card
sx={{
maxWidth: '320px',
mx: 'auto',
color: theme.palette.text.secondary,
backgroundColor: theme.palette.background.paper,
// '&:hover': {
// transition: 'all .7s ease',
// boxShadow: `1px 1px 20px 10px ${shadowColor}`,
// },
}}>
<CardMedia
component='img'
height='150'
image={imageURL}
alt={title}
/>
<CardActionArea>
<CardContent
color='white'
onClick={() => window.open(url, '_blank')}>
<Typography gutterBottom variant='h6' component='div'>
{title}
</Typography>
<Typography></Typography>
{{ description } !== '' && (
<Typography variant='body2'>{description}</Typography>
)}
</CardContent>
</CardActionArea>
</Card>
}
/>
);
};