File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
docs/src/components/YouTubePreview Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function YouTubePreview ({url}: YouTubePreviewProps) {
3434 className = "youtube-preview-link"
3535 >
3636 < img
37- src = { `https://img.youtube.com/vi/${ videoId } /hqdefault .jpg` }
37+ src = { `https://img.youtube.com/vi/${ videoId } /maxresdefault .jpg` }
3838 alt = "Watch on YouTube"
3939 className = "youtube-preview-img"
4040 />
Original file line number Diff line number Diff line change 22 display : flex;
33 justify-content : center;
44 margin : 2rem 0 ;
5+ padding : 0 1rem ;
56}
67
78.youtube-preview-link {
89 position : relative;
910 display : inline-block;
11+ max-width : 100% ;
1012}
1113
1214.youtube-preview-img {
1315 width : 720px ;
14- height : 405px ;
16+ max-width : 100% ;
17+ height : auto;
1518 cursor : pointer;
1619 border-radius : 8px ;
1720 display : block;
2730 display : flex;
2831 align-items : center;
2932 justify-content : center;
33+ }
34+
35+ @media screen and (max-width : 768px ) {
36+ .youtube-preview-container {
37+ margin : 1rem 0 ;
38+ }
39+
40+ .youtube-preview-play svg {
41+ width : 48px ;
42+ height : 34px ;
43+ }
44+ }
45+
46+ @media screen and (max-width : 480px ) {
47+ .youtube-preview-play svg {
48+ width : 40px ;
49+ height : 28px ;
50+ }
3051}
You can’t perform that action at this time.
0 commit comments