added redirect, changed card effect
This commit is contained in:
Generated
+11
@@ -21,6 +21,7 @@
|
|||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"react-spring": "^9.4.4",
|
"react-spring": "^9.4.4",
|
||||||
"styled-components": "^5.3.5",
|
"styled-components": "^5.3.5",
|
||||||
|
"vanilla-tilt": "^1.7.2",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -15934,6 +15935,11 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vanilla-tilt": {
|
||||||
|
"version": "1.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vanilla-tilt/-/vanilla-tilt-1.7.2.tgz",
|
||||||
|
"integrity": "sha512-arf2wY2Y65rP6Zxve9PnUUnRl9nQ1KenPNae6QRaVq/PEvaIto2bC4jYirNJ19U7nLkzI1H9O+nYtcQlX7BTsA=="
|
||||||
|
},
|
||||||
"node_modules/vary": {
|
"node_modules/vary": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
@@ -28300,6 +28306,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"vanilla-tilt": {
|
||||||
|
"version": "1.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vanilla-tilt/-/vanilla-tilt-1.7.2.tgz",
|
||||||
|
"integrity": "sha512-arf2wY2Y65rP6Zxve9PnUUnRl9nQ1KenPNae6QRaVq/PEvaIto2bC4jYirNJ19U7nLkzI1H9O+nYtcQlX7BTsA=="
|
||||||
|
},
|
||||||
"vary": {
|
"vary": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"react-scripts": "^5.0.1",
|
"react-scripts": "^5.0.1",
|
||||||
"react-spring": "^9.4.4",
|
"react-spring": "^9.4.4",
|
||||||
"styled-components": "^5.3.5",
|
"styled-components": "^5.3.5",
|
||||||
|
"vanilla-tilt": "^1.7.2",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ const MainAccordion = ({items, title}) => {
|
|||||||
imageURL={project.imageURL}
|
imageURL={project.imageURL}
|
||||||
title={project.title}
|
title={project.title}
|
||||||
description={project.description}
|
description={project.description}
|
||||||
|
url={project.url}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
@@ -6,39 +7,65 @@ import {
|
|||||||
CardActionArea,
|
CardActionArea,
|
||||||
Typography,
|
Typography,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
|
|
||||||
import { useTheme } from '@mui/material/styles';
|
import { useTheme } from '@mui/material/styles';
|
||||||
import { VioletColorWheel, SeaGreenCrayola } from 'themes/Colors';
|
|
||||||
|
import { Tilt } from './Tilt';
|
||||||
|
|
||||||
|
// import { VioletColorWheel, SeaGreenCrayola } from 'themes/Colors';
|
||||||
|
|
||||||
const MainCard = ({ imageURL, title, description, url }) => {
|
const MainCard = ({ imageURL, title, description, url }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const shadowColor =
|
// const shadowColor =
|
||||||
theme.palette.mode === 'dark' ? SeaGreenCrayola : VioletColorWheel;
|
// theme.palette.mode === 'dark' ? SeaGreenCrayola : VioletColorWheel;
|
||||||
|
const options = {
|
||||||
|
reverse: true,
|
||||||
|
speed: 1200,
|
||||||
|
reset: false,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<a
|
||||||
|
href={url}
|
||||||
|
target='_blank'
|
||||||
|
rel='noopener noreferrer'
|
||||||
|
style={{ textDecoration: 'none' }}>
|
||||||
|
<Tilt
|
||||||
|
// onClick={(e) => handleClick(e)}
|
||||||
|
options={options}
|
||||||
|
children={
|
||||||
<Card
|
<Card
|
||||||
sx={{
|
sx={{
|
||||||
maxWidth: '320px',
|
maxWidth: '320px',
|
||||||
mx: 'auto',
|
mx: 'auto',
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
'&:hover': {
|
// '&:hover': {
|
||||||
transition: 'all .7s ease',
|
// transition: 'all .7s ease',
|
||||||
boxShadow: `1px 1px 20px 10px ${shadowColor}`,
|
// boxShadow: `1px 1px 20px 10px ${shadowColor}`,
|
||||||
},
|
// },
|
||||||
}}>
|
}}>
|
||||||
<CardActionArea>
|
<CardActionArea>
|
||||||
<CardMedia component='img' height='150' image={imageURL} alt={title} />
|
<CardMedia
|
||||||
|
component='img'
|
||||||
|
height='150'
|
||||||
|
image={imageURL}
|
||||||
|
alt={title}
|
||||||
|
/>
|
||||||
<CardContent color='white'>
|
<CardContent color='white'>
|
||||||
<Typography gutterBottom variant='h6' component='div'>
|
<Typography gutterBottom variant='h6' component='div'>
|
||||||
{title}
|
{title}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Typography></Typography>
|
||||||
{{ description } !== '' && (
|
{{ description } !== '' && (
|
||||||
<Typography variant='body2'>{description}</Typography>
|
<Typography variant='body2'>{description}</Typography>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CardActionArea>
|
</CardActionArea>
|
||||||
</Card>
|
</Card>
|
||||||
|
}
|
||||||
|
style={{ padding: 0, margin: 0 }}
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import React, { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
import VanillaTilt from 'vanilla-tilt';
|
||||||
|
|
||||||
|
export const Tilt = (props) => {
|
||||||
|
const { options, children } = props;
|
||||||
|
const tilt = useRef(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
VanillaTilt.init(tilt.current, options);
|
||||||
|
}, [options]);
|
||||||
|
|
||||||
|
return <div ref={tilt}>{children}</div>;
|
||||||
|
};
|
||||||
+15
-15
@@ -1,48 +1,48 @@
|
|||||||
export const FreeCodeCampData = [
|
export const FreeCodeCampData = [
|
||||||
{
|
{
|
||||||
videoURL:
|
// videoURL:
|
||||||
'https://res.cloudinary.com/dadobos/video/upload/v1653827756/web/TechnicalDocumentationPage_h03qkv',
|
// 'https://res.cloudinary.com/dadobos/video/upload/v1653827756/web/TechnicalDocumentationPage_h03qkv',
|
||||||
imageURL:
|
imageURL:
|
||||||
'https://res.cloudinary.com/dadobos/image/upload/v1653827744/web/TechnicalDocumentationPage_pbudut',
|
'https://res.cloudinary.com/dadobos/image/upload/v1653827744/web/TechnicalDocumentationPage_pbudut',
|
||||||
title: 'Technical Documentation',
|
title: 'Technical Documentation',
|
||||||
description: '',
|
description: '',
|
||||||
url: 'https://codepen.io/diaid/pen/PoopdWd',
|
url: 'https://codepen.io/diaid/full/PoopdWd',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
videoURL:
|
// videoURL:
|
||||||
'https://res.cloudinary.com/dadobos/video/upload/v1653827749/web/TributePage_iarfpr',
|
// 'https://res.cloudinary.com/dadobos/video/upload/v1653827749/web/TributePage_iarfpr',
|
||||||
imageURL:
|
imageURL:
|
||||||
'https://res.cloudinary.com/dadobos/image/upload/v1653827749/web/TributePage_hpxmr6',
|
'https://res.cloudinary.com/dadobos/image/upload/v1653827749/web/TributePage_hpxmr6',
|
||||||
title: 'Tribut Page',
|
title: 'Tribut Page',
|
||||||
description: '',
|
description: '',
|
||||||
url: 'https://codepen.io/diaid/pen/MWWeorj',
|
url: 'https://codepen.io/diaid/full/MWWeorj',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
videoURL:
|
// videoURL:
|
||||||
'https://res.cloudinary.com/dadobos/video/upload/v1653827744/web/SurveyForm_g0ornr',
|
// 'https://res.cloudinary.com/dadobos/video/upload/v1653827744/web/SurveyForm_g0ornr',
|
||||||
imageURL:
|
imageURL:
|
||||||
'https://res.cloudinary.com/dadobos/image/upload/v1653827742/web/SurveyForm_upho4b',
|
'https://res.cloudinary.com/dadobos/image/upload/v1653827742/web/SurveyForm_upho4b',
|
||||||
title: 'Survey Form',
|
title: 'Survey Form',
|
||||||
description: '',
|
description: '',
|
||||||
url: 'https://codepen.io/diaid/pen/jOOMBeL',
|
url: 'https://codepen.io/diaid/full/jOOMBeL',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
videoURL:
|
// videoURL:
|
||||||
'https://res.cloudinary.com/dadobos/video/upload/v1653827744/web/ProductLandingPage_fqwfjg',
|
// 'https://res.cloudinary.com/dadobos/video/upload/v1653827744/web/ProductLandingPage_fqwfjg',
|
||||||
imageURL:
|
imageURL:
|
||||||
'https://res.cloudinary.com/dadobos/image/upload/v1653827745/web/ProductLandingPage_hebmnn',
|
'https://res.cloudinary.com/dadobos/image/upload/v1653827745/web/ProductLandingPage_hebmnn',
|
||||||
title: 'Product Landing Page',
|
title: 'Product Landing Page',
|
||||||
description: '',
|
description: '',
|
||||||
url: 'https://codepen.io/diaid/pen/GRRrKLW',
|
url: 'https://codepen.io/diaid/full/GRRrKLW',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
videoURL:
|
// videoURL:
|
||||||
'https://res.cloudinary.com/dadobos/video/upload/v1653827745/web/PersonalPortofolio_nibw6t',
|
// 'https://res.cloudinary.com/dadobos/video/upload/v1653827745/web/PersonalPortofolio_nibw6t',
|
||||||
imageURL:
|
imageURL:
|
||||||
'https://res.cloudinary.com/dadobos/image/upload/v1653827743/web/PersonalPortofolio_exblcg',
|
'https://res.cloudinary.com/dadobos/image/upload/v1653827743/web/PersonalPortofolio_exblcg',
|
||||||
title: 'Personal Portofolio',
|
title: 'Personal Portofolio',
|
||||||
description: '',
|
description: '',
|
||||||
url: 'https://codepen.io/diaid/pen/YzzVgwK',
|
url: 'https://codepen.io/diaid/full/YzzVgwK',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
const MuiCardActionArea = {
|
const MuiCardActionArea = {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
|
'@media (min-width: 900px)': {
|
||||||
filter: 'grayscale(1);',
|
filter: 'grayscale(1);',
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
filter: 'grayscale(0);',
|
filter: 'grayscale(0);',
|
||||||
transition: 'all .3s ease',
|
transition: 'all .3s ease',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user