Template:YouTube: Difference between revisions
From VRChat Wiki
Created page with "<span class="youtube" data-style="max-width: 100%; aspect-ratio: 16 / 9; width: {{{2 |}}}; height: {{{3 | auto}}}; {{{4}}}" data-video-id="{{{1|PWLPw4RE9Ig}}}"/> <noinclude> == Documentation == Embeds a YouTube video. <nowiki>{{Youtube|id|width|height|styles}</nowiki> === Example Usage === {{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}</nowiki> <hr> {{YouTube|PWLPw4RE9Ig|200px}} <nowiki>{{YouTube|PWLPw4RE9Ig|200px}}</nowiki> <hr> {{YouTube|PWLPw4RE9Ig|300px|300..." |
m fix: layout shift |
||
| Line 1: | Line 1: | ||
< | <div | ||
class="youtube" | |||
style="max-width: 100%; aspect-ratio: 16 / 9; background-color: black; width: {{{2|560px}}}; height: {{{3|auto}}}; {{{4|}}}" | |||
data-video-id="{{{1|PWLPw4RE9Ig}}}" | |||
></div> | |||
<noinclude> | <noinclude> | ||
== Documentation == | == Documentation == | ||
Embeds a YouTube video. | Embeds a YouTube video. | ||
<nowiki>{{Youtube|id|width|height|styles} | <nowiki>{{Youtube|id|width|height|styles}}/nowiki> | ||
=== Example Usage === | === Example Usage === | ||
{{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}</nowiki> | {{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}</nowiki> | ||
Revision as of 12:40, 1 March 2025
Documentation
Embeds a YouTube video.
{{Youtube|id|width|height|styles}}/nowiki> === Example Usage === {{YouTube|PWLPw4RE9Ig}} <nowiki>{{YouTube|PWLPw4RE9Ig}}
{{YouTube|PWLPw4RE9Ig|200px}}
{{YouTube|PWLPw4RE9Ig|300px|300px}}
{{YouTube|PWLPw4RE9Ig|100%}}
Template parameters
| Name | Variable | Description |
|---|---|---|
| id | 1 |
ID of the video |
| width | 2 |
Width in CSS units (e.g. 200px, 100%) |
| height | 3 |
Height in CSS units (e.g. 200px, 100%) |
| style | 4 |
Custom CSS styles |