Template:Youtube: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
m
Text replacement - "<br>" to "<br/>"
(been wondering why videos weren't scaling correctly...turns out the code was quite broken. Updated to use Box instead of a table, and simplified the switch logic.)
m (Text replacement - "<br>" to "<br/>")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{Box|{{#switch:{{{3|}}}|right=right|center=center|#default=left}}
<includeonly>{{Box|{{#switch:{{{3|}}}|right=right|center=center|#default=left}}|width={{{2|560}}}px|style=margin-top: 0px;
| {{#widget:YouTube
| {{#widget:YouTube
   | {{#ifexpr:{{#len:{{{1}}}}}=11|id={{{1}}}|playlist={{{1}}}}}
   | {{#ifexpr:{{#len:{{{1}}}}}=11|id={{{1}}}|playlist={{{1}}}}}
Line 6: Line 6:
   | height = {{#expr:{{{2|560}}}*0.5625 round 0}}
   | height = {{#expr:{{{2|560}}}*0.5625 round 0}}
   }}{{#switch:{{{3|}}}
   }}{{#switch:{{{3|}}}
   | left | right | center | {{Void}} = {{#if:{{{4|}}}|<br>{{{4}}}}}
   | left | right | center | {{Void}} = {{#if:{{{4|}}}|<br/>{{{4}}}}}
   | #default = {{#if:{{{3|}}}|<br>{{{3}}}}}
   | #default = {{#if:{{{3|}}}|<br/>{{{3}}}}}
   }}
   }}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
Line 15: Line 15:


==Usage==
==Usage==
To use this template type:<br>
To use this template type:<br/>
{{Desc|Normal|Video Code|Video Size|Location|Caption|at{{=}}}}
{{Desc|Normal|Video Code|Video Size|Location|Caption|at{{=}}}}


Navigation menu