Skip to content

Commit

Permalink
Merge pull request #45 from teofum/fix-yt-embed
Browse files Browse the repository at this point in the history
fixed the homepage yt embed on mobile
  • Loading branch information
deccer authored Dec 16, 2024
2 parents fffc76a + 82ec73c commit 2afd1b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.env.development.local
.env.test.local
.env.production.local
.idea/

npm-debug.log*
yarn-debug.log*
Expand Down
8 changes: 7 additions & 1 deletion src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
overflow: hidden;
}

@media screen and (max-width: 996px) {
.ytEmbed {
max-width: 100%;
aspect-ratio: 16/9;
height: auto;
}

@media screen and (min-width: 720px) and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function HomepageHeader() {
{siteConfig.title}
</Heading>
<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>
<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>
<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>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg test"
Expand Down

0 comments on commit 2afd1b0

Please sign in to comment.