File tree Expand file tree Collapse file tree 3 files changed +31
-22
lines changed Expand file tree Collapse file tree 3 files changed +31
-22
lines changed Original file line number Diff line number Diff line change 9
9
"lint" : " next lint"
10
10
},
11
11
"dependencies" : {
12
+ "next" : " 14.2.15" ,
12
13
"react" : " ^18" ,
13
- "react-dom" : " ^18" ,
14
- "next" : " 14.2.15"
14
+ "react-dom" : " ^18"
15
15
},
16
16
"devDependencies" : {
17
- "typescript" : " ^5" ,
18
17
"@types/node" : " ^20" ,
19
18
"@types/react" : " ^18" ,
20
19
"@types/react-dom" : " ^18" ,
20
+ "eslint" : " ^8" ,
21
+ "eslint-config-next" : " 14.2.15" ,
21
22
"postcss" : " ^8" ,
22
23
"tailwindcss" : " ^3.4.1" ,
23
- "eslint" : " ^8" ,
24
- "eslint-config-next" : " 14.2.15"
24
+ "typescript" : " ^5"
25
25
}
26
26
}
Original file line number Diff line number Diff line change @@ -12,12 +12,17 @@ const Demo = () => {
12
12
'Description for what\'s happening in Demo 2. This block of text will contain all the info needed to understand the demo.' ,
13
13
'Description for what\'s happening in Demo 3. This block of text will contain all the info needed to understand the demo.'
14
14
] ;
15
+ const demoCardVideos = [
16
+ "https://player.vimeo.com/video/1022732764" ,
17
+ "https://player.vimeo.com/video/1022732772" ,
18
+ ] ;
15
19
for ( let i = 0 ; i < 3 ; i ++ ) {
16
20
demos . push (
17
21
< DemoCard
18
22
key = { `demoCard${ i } ` }
19
23
header = { demoCardHeaders [ i ] }
20
24
blurb = { demoCardBlurbs [ i ] }
25
+ video = { demoCardVideos [ i ] }
21
26
/>
22
27
) ;
23
28
}
Original file line number Diff line number Diff line change 1
- import Image from 'next/image' ;
2
-
3
1
const DemoCard = ( {
4
2
header,
5
3
blurb,
4
+ video
6
5
} : {
7
6
key : string ;
8
7
blurb : string ;
9
8
header : string ;
9
+ video : string ;
10
10
} ) => {
11
11
return (
12
- < div className = 'demoCard' >
13
- < Image
14
- src = 'https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExaW9tcWttZ3R0YTVpNWxwcGJ4M2YyZ2ExcmxlazN5N3JyenF0ajl4dCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/FqdGGgugkC4Xm/giphy.gif'
15
- alt = ''
16
- width = { 700 }
17
- height = { 475 }
18
- sizes = '100vw'
19
- style = { {
20
- width : '100%' ,
21
- height : 'auto' ,
22
- } }
23
- />
24
- < div className = 'demoCardText' >
25
- < div className = 'demoCardHeader' > { header } </ div >
26
- < div className = 'demoCardInfo' > { blurb } </ div >
12
+ < div className = "demoCard" >
13
+ < div style = { { padding : '56.25% 0 0 0' , position : 'relative' } } >
14
+ < iframe
15
+ src = { video }
16
+ style = { {
17
+ position : 'absolute' ,
18
+ top : 0 ,
19
+ left : 0 ,
20
+ width : '100%' ,
21
+ height : '100%' ,
22
+ } }
23
+ allow = "autoplay; fullscreen; picture-in-picture"
24
+ allowFullScreen
25
+ title = "Vimeo Video Player"
26
+ />
27
+ </ div >
28
+ < div className = "demoCardText" >
29
+ < div className = "demoCardHeader" > { header } </ div >
30
+ < div className = "demoCardInfo" > { blurb } </ div >
27
31
</ div >
28
32
</ div >
29
33
) ;
You can’t perform that action at this time.
0 commit comments