Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit 6fd2900

Browse files
Fetch images from youtube api for fast web loading (#43)
1 parent 0fdd256 commit 6fd2900

File tree

5 files changed

+31
-28
lines changed

5 files changed

+31
-28
lines changed
-145 KB
Binary file not shown.
-15.3 KB
Binary file not shown.
-1.77 MB
Binary file not shown.

src/views/pages/HomeView/Events.js

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ import {
1414
import Card from '@material-ui/core/Card';
1515
import CardContent from '@material-ui/core/CardContent';
1616
import CardMedia from '@material-ui/core/CardMedia';
17+
import { events } from './HomeViewData';
1718

18-
const useStyles = makeStyles(theme => ({
19+
const useStyles = makeStyles((theme) => ({
1920
root: {
2021
backgroundColor: theme.palette.background.LIGHT,
2122
padding: '30px 0',
@@ -40,7 +41,7 @@ const useStyles = makeStyles(theme => ({
4041
position: 'relative',
4142
},
4243
cardMedia: {
43-
paddingTop: '61.25%', // 16:9
44+
paddingTop: '55.75%', // set 61.25% for 16:9 or highresolution images--- currently set to 55.75% to fit hqquality images.
4445
},
4546
cardContent: {
4647
flexGrow: 1
@@ -88,32 +89,6 @@ const useStyles = makeStyles(theme => ({
8889
backgroundColor: '#00FF75'
8990
},
9091
}));
91-
const events = [
92-
{
93-
img: '/static/images/events/mlboot/session2.jpg',
94-
title: 'Machine Learning',
95-
link: 'https://www.youtube.com/watch?v=FAposp6k-lA',
96-
type: 'Webinar',
97-
description: 'Image Processing with NumPy and OpenCV',
98-
date_time: 'July 12, 7pm IST'
99-
},
100-
{
101-
img: '/static/images/events/mlboot/session1.jpg',
102-
title: 'Machine Learning',
103-
link: 'https://www.youtube.com/watch?v=ycvSMpsg7qk',
104-
type: 'Webinar',
105-
description: 'Introduction to Machine Learning',
106-
date_time: 'July 11, 7pm IST'
107-
},
108-
{
109-
img: '/static/images/events/workshops/api.png',
110-
title: 'Web Development',
111-
link: 'https://www.youtube.com/watch?v=QHS7_IwTMcc',
112-
type: 'Webinar',
113-
description: 'What is Web API? Hands-on with GitHub API',
114-
date_time: 'July 7, 6pm IST'
115-
}
116-
];
11792

11893
function Events({ className, ...rest }) {
11994
const classes = useStyles();

src/views/pages/HomeView/HomeViewData.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
// event data------------------
2+
export const events = [
3+
{
4+
img: 'https://img.youtube.com/vi/bAp8YJAJ5Ek/hqdefault.jpg',
5+
title: 'Machine Learning',
6+
link: 'https://www.youtube.com/watch?v=bAp8YJAJ5Ek',
7+
type: 'Webinar',
8+
description: 'Collecting and Generating data with Pandas',
9+
date_time: 'July 16, 7pm IST'
10+
},
11+
{
12+
img: 'https://img.youtube.com/vi/Ir9FNhoPyYc/hqdefault.jpg',
13+
title: 'Machine Learning Web',
14+
link: 'https://www.youtube.com/watch?v=Ir9FNhoPyYc',
15+
type: 'Webinar',
16+
description: 'Machine Learning for the web with TensorFlow.js',
17+
date_time: 'July 19, 9:30pm IST'
18+
},
19+
{
20+
img: 'https://img.youtube.com/vi/QHS7_IwTMcc/hqdefault.jpg',
21+
title: 'Web Development',
22+
link: 'https://www.youtube.com/watch?v=QHS7_IwTMcc',
23+
type: 'Webinar',
24+
description: 'What is Web API? Hands-on with GitHub API',
25+
date_time: 'July 7, 6pm IST'
26+
}
27+
];
28+
129
// mentors data----------------
230

331
export const mentors = [

0 commit comments

Comments
 (0)