Skip to content

Commit 2afd1b0

Browse files
authored
Merge pull request #45 from teofum/fix-yt-embed
fixed the homepage yt embed on mobile
2 parents fffc76a + 82ec73c commit 2afd1b0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.env.development.local
1515
.env.test.local
1616
.env.production.local
17+
.idea/
1718

1819
npm-debug.log*
1920
yarn-debug.log*

src/pages/index.module.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
overflow: hidden;
1111
}
1212

13-
@media screen and (max-width: 996px) {
13+
.ytEmbed {
14+
max-width: 100%;
15+
aspect-ratio: 16/9;
16+
height: auto;
17+
}
18+
19+
@media screen and (min-width: 720px) and (max-width: 996px) {
1420
.heroBanner {
1521
padding: 2rem;
1622
}

src/pages/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function HomepageHeader() {
1616
{siteConfig.title}
1717
</Heading>
1818
<p className="hero__subtitle">Articles, guides, tips and tricks from and for frogs and forgis of the Graphics Programming discord.<br />This is what we do</p>
19-
<iframe width="960" height="520" src="https://www.youtube.com/embed/E07I1VRYlcg?si=PUsHfqq3YKLIp2kS" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
19+
<iframe className={styles.ytEmbed} width="960" height="520" src="https://www.youtube.com/embed/E07I1VRYlcg?si=PUsHfqq3YKLIp2kS" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
2020
<div className={styles.buttons}>
2121
<Link
2222
className="button button--secondary button--lg test"

0 commit comments

Comments
 (0)