Template:Youtube: Difference between revisions
Jump to navigation
Jump to search
Create youtube template |
m Add padding and margins |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{|style="color: | <includeonly> | ||
| | {|style="color: var(--color-base); background-color:var(--background-color-interactive, #fff); border-color: var(--border-color-base, #a2a9b1); border: solid; margin: auto; float: {{{alignment|right}}}; padding: 1em; margin: 1em;" | ||
|- {{#if: {{{caption | |{{#ev: youtube|id={{{video-id}}}| width={{{width|300}}}}} | ||
|- {{#if: {{{caption}}} | | style="display: none;" }} | |||
|{{{caption|}}} | |{{{caption|}}} | ||
|} | |} | ||
[[Category:Uses Youtube Template]] | |||
</includeonly> | |||
<noinclude> | <noinclude> | ||
<br/> | <br/> | ||
{{Youtube|video-id=3W45IAbdMyc|caption=A video of a set of red and blue rectangles}} | |||
<templatedata> | <templatedata> | ||
{ | { | ||
| Line 39: | Line 43: | ||
"label": "Caption", | "label": "Caption", | ||
"description": "The caption displayed below the video.", | "description": "The caption displayed below the video.", | ||
"type": "content", | "type": "content", | ||
"suggested": true | "suggested": true | ||
}, | |||
"width": { | |||
"aliases": [ | |||
"w" | |||
], | |||
"label": "Width", | |||
"description": "The width of the video on the page in pixels.", | |||
"type": "number", | |||
"default": "300" | |||
} | } | ||
} | } | ||
Latest revision as of 18:43, 22 October 2025
| A video of a set of red and blue rectangles |
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Video ID | video-id v | The id of the youtube video (normally the thing after the ?v=
| String | required |
| Alignment | alignment a | The side of the page the template sits on.
| String | optional |
| Caption | caption c | The caption displayed below the video. | Content | suggested |
| Width | width w | The width of the video on the page in pixels.
| Number | optional |