Template:Youtube: Difference between revisions

From MiiWiki
Jump to navigationJump to search
m (Float doesn't support "center" value.)
(updates from wikirby)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{|style="margin:0.5em; margin-top:0 !important; padding:3px 0 3px 0 !important; margin-{{#switch:{{{3|}}}|left|right={{{3|}}}|#default=left}}:0 !important; background-color:#dfeafe; border:2px solid #E47575; width:100px; float:{{#switch:{{{3|}}}|left|right|none={{{3|}}}|#default=left}}; display:inline-table;"
<includeonly>{|style="margin:0.5em; margin-top:0 !important; padding:3px 0 3px 0 !important; margin-{{#switch:{{{3|}}}|left|right={{{3|}}}|#default=left}}:0 !important; background-color:#dfeafe; border:2px solid #E47575; float:{{#switch:{{{3|}}}|left|right|none={{{3|}}}|#default=left}}; display:inline-table;"
|<div>
|<div>
|{{#ev:youtube
|{{#ev:youtube
Line 5: Line 5:
  |{{{2|250}}}
  |{{{2|250}}}
  }}{{#switch:{{{3|}}}
  }}{{#switch:{{{3|}}}
   |left|right|none=<div>{{{4|}}}</div>
   |left|right|none=<div style="width:{{{2|250}}}px">{{{4|}}}</div>
   |#default=<div>{{{3|}}}</div>
   |#default=<div style="width:{{{2|250}}}px">{{{3|}}}</div>
  }}
  }}
|</div>
|</div>
|}</includeonly><noinclude>
|}</includeonly><noinclude>
{{doc}}
[[Category:Formatting templates|Y]]
[[Category:Formatting templates|Y]]
</noinclude>
</noinclude>

Latest revision as of 17:25, 26 March 2023


The original template is from WiKirby.

Purpose

This template is for conveniently displaying Youtube videos on an article.

Usage

To use this template type:
{{Youtube|Video Code|Video Size|Alignment|Caption}}

Where:

  • Video Code is the unique sequence of letters, numbers, and characters that point to the video.
  • Video Size is the desired size of the video. Defaults to 250 pixels.
  • Alignment is where to have the video floating (i.e. right, left or none). Defaults to left if blank.
  • Caption is an optional caption to describe the video.
    • If location is neither left, right, nor none, then the it is assumed to be a caption and the video's location is set to "left".