Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web] Fix YouTube and text overflow on mobile #1

Merged
merged 1 commit into from
Mar 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions web/src/components/youtube.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,33 @@
export let src: string;
</script>

<iframe
class="mx-auto"
width="640"
height="360"
{src}
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
/>
<div class="container mx-auto">
<iframe
class="mx-auto responsive-iframe"
{src}
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
/>
</div>

<style lang="css">
.container {
max-width: 640px;
max-height: 360px;
position: relative;
overflow: hidden;
width: 100%;
padding-top: 56.25%;
}
.responsive-iframe {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
}
</style>
2 changes: 1 addition & 1 deletion web/src/routes/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

<div class="t-40" />

<h1>Introducing...</h1>
<h1 class="text-5xl sm:text-6xl">Introducing...</h1>
<div class="t-5" />
<h2>You are a Failure!</h2>
<div class="t-10" />
Expand Down