-
Notifications
You must be signed in to change notification settings - Fork 316
feat(docs): embed Youtube videos in the docs #3323
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
| @use "@pythnetwork/component-library/theme"; | ||
|
|
||
| .container { | ||
| position: relative; | ||
| width: 100%; | ||
| padding-bottom: 56.25%; /* 16:9 aspect ratio */ | ||
| margin: theme.spacing(6) 0; | ||
| border-radius: theme.border-radius("xl"); | ||
| overflow: hidden; | ||
| background-color: theme.color("background", "primary"); | ||
| box-shadow: 0 4px 24px rgb(0 0 0 / 12%); | ||
| } | ||
|
|
||
| .iframe { | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| border: none; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need a container here, stying iframe should be enough. You can remove all the iframe styles here and just copy paste the ones from .container and use https://github.com/pyth-network/pyth-crosschain/pull/3323/changes#r2640249221 instead of a padding-bottom trick
| width: 100%; | ||
| padding-bottom: 56.25%; /* 16:9 aspect ratio */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
width: 100%;
aspect-ratio: 16 / 9;
Summary
Embed Youtube videos in the relevant doc pages allowing users to watch the video on the same page. If they wish, they can redirect to YT.
Rationale
How has this been tested?