Jump to content

Template:YouTubeVideo: Difference between revisions

From Deep Politics Wiki
WikiSpooks>Peter
fix margins
 
WikiBot (talk | contribs)
m Plain formatting, no semantic markup
 
Line 1: Line 1:
<noinclude>[[category:Box Templates]]'''This template is for placing a YouTube video and caption in a right-floating box.'''<br/>
<includeonly><div class="thumb tright" style="width:{{#if:{{{width|}}}|{{{width}}}px|340px}};">
The caption text will wrap within the box border and the borders will expand to accommodate whatever width & height are specified for the video
<div class="thumbinner" style="padding:0.4em;">
 
[https://www.youtube.com/watch?v={{{code}}} Watch on YouTube]{{#if:{{{caption|}}}|<div class="thumbcaption">{{{caption}}}</div>}}
'''Usage:'''<br/>
</div></div></includeonly><noinclude>
<nowiki>{{</nowiki>{{t|{{PAGENAME}}}}<br/>
A captioned link to the video. No widget extension.
|{{t|code}}= Mandatory. YouTube video code<br/>
[[Category:Box templates]]
|{{t|align}}= Optional. {left,right} - defaults to "right"<br/>
</noinclude>
|{{t|caption}}= Optional. video caption - standard wikitext including links<br/>
|{{t|width}}= Optional. video width - whole number only - ie no 'px' (default 360)<br/>
|{{t|height}}= Optional. video height - whole number only - ie no 'px' (default 300)<br/>
<nowiki>}}</nowiki>
</noinclude><includeonly>{| class="wikitable" width="20%" style="float:{{#ifeq:{{{align}}}|left|left|right}}; margin: 1.0em 1.0em 1.0em 1.0em;"
|-
|{{#widget:YouTube|{{#if:{{{width|}}}|width={{{width|}}}px}}|{{#if:{{{height|}}}|height={{{height|}}}px}}|id={{{code|}}}}}
|-
|style="text-align:center; padding: 0.5em;" |{{{caption|}}}
|}</includeonly>

Latest revision as of 22:35, 24 September 2026

A captioned link to the video. No widget extension.