Template: Video: Difference between revisions
From The Lost Media Wiki
(Created page with "<pre> <div class="row">{{#vardefine: perrow|{{{perrow|1}}}}}{{#vardefine:count|1}} {{#arraymap: 1,2,3,4 |, |@ |{{#ifexpr: {{#var:count}} <= @ | <div class="col-xs-1...") |
No edit summary |
||
Line 1: | Line 1: | ||
== Video == | |||
<pre> | <pre> | ||
<div class=" | <div class="hide"> | ||
{{# | |||
{{#vardefine: perrow|{{{perrow|1}}}}} | |||
{{#vardefine:count|1}} | |||
{{#arraydefine:layout|1,2,3,4|,}} | |||
</div> | |||
<div class="row"> | |||
{{#arrayprint: layout | |||
|, | |, | ||
|@ | |@ | ||
|{{#ifexpr: {{#var:count}} <= @ | |{{#ifexpr: {{#var:count}} <= @ | ||
|{{VideoRow | |||
|service={{{service@|youtube}}} | |||
|id={{{id@|}}} | |||
|description={{{description@|}}} | |||
|perrow={{{perrow|}}} | |||
}} | |||
| | | | ||
<div class="col-xs-12 {{#switch: {{{perrow|1}}} | }}<!-- | ||
|1=col-lg- | |||
-->{{#var:count|{{#expr: 0{{#var:count}} + 1 }}}} | |||
}} | |||
</div> | |||
</pre> | |||
== VideoRow == | |||
<pre> | |||
<div class="col-xs-12 {{#switch:{{{perrow|1}}} | |||
|1=col-lg-6 col-lg-offset-3 | |||
|2=col-lg-6 | |2=col-lg-6 | ||
|3=col-lg-4 | |3=col-lg-4 | ||
|4=col-lg-3 | |4=col-lg-3 | ||
|#default= | |||
}}"> | }}"> | ||
{{ | {{#if: {{{service|}}} | ||
|{{#if: {{{id|}}} | |||
| | |||
{{#evt: | |||
|service ={{{service|}}} | |||
|id ={{{id|}}} | |||
|description ={{{description|}}} | |||
|container =frame | |||
|alignment =center | |||
}} | |||
| | | | ||
| | | | ||
}} | }} | ||
</div> | </div> | ||
}} | |||
</pre> | |||
== Usage == | |||
==== One bigger video centered ==== | |||
<pre> | |||
{{Video | |||
|perrow=1 | |||
|service1= | |||
|id1= | |||
|description1= | |||
}} | |||
</pre> | |||
==== Two bigger videos full row ==== | |||
<pre> | |||
{{Video | |||
|perrow=2 | |||
|service1= | |||
|id1= | |||
|description1= | |||
|service2= | |||
|id2= | |||
|description2= | |||
}} | |||
</pre> | |||
==== Two smaller videos centered ==== | |||
<pre> | |||
{{Video | |||
|perrow=2 | |||
|service1= | |||
|id1= | |||
|description1= | |||
|service2= | |||
|id2= | |||
|description2= | |||
|service3= | |||
|id3= | |||
|description3= | |||
|service4= | |||
|id4= | |||
|description4= | |||
}} | |||
</pre> | |||
==== Three smaller videos full row ==== | |||
<pre> | |||
{{Video | |||
|perrow=3 | |||
|service1= | |||
|id1= | |||
|description1= | |||
|service2= | |||
|id2= | |||
|description2= | |||
|service3= | |||
|id3= | |||
|description3= | |||
}} | |||
</pre> | |||
==== Four smaller videos full row ==== | |||
<pre> | |||
{{Video | |||
|perrow=3 | |||
|service1= | |||
|id1= | |||
|description1= | |||
|service2= | |||
|id2= | |||
|description2= | |||
|service3= | |||
|id3=value | |||
|description3= | |||
|service4= | |||
|id4=value | |||
|description4= | |||
}} | |||
</pre> | </pre> |
Revision as of 17:09, 19 December 2017
Video
<div class="hide"> {{#vardefine: perrow|{{{perrow|1}}}}} {{#vardefine:count|1}} {{#arraydefine:layout|1,2,3,4|,}} </div> <div class="row"> {{#arrayprint: layout |, |@ |{{#ifexpr: {{#var:count}} <= @ |{{VideoRow |service={{{service@|youtube}}} |id={{{id@|}}} |description={{{description@|}}} |perrow={{{perrow|}}} }} | }}<!-- -->{{#var:count|{{#expr: 0{{#var:count}} + 1 }}}} }} </div>
VideoRow
<div class="col-xs-12 {{#switch:{{{perrow|1}}} |1=col-lg-6 col-lg-offset-3 |2=col-lg-6 |3=col-lg-4 |4=col-lg-3 |#default= }}"> {{#if: {{{service|}}} |{{#if: {{{id|}}} | {{#evt: |service ={{{service|}}} |id ={{{id|}}} |description ={{{description|}}} |container =frame |alignment =center }} | | }} </div> }}
Usage
One bigger video centered
{{Video |perrow=1 |service1= |id1= |description1= }}
Two bigger videos full row
{{Video |perrow=2 |service1= |id1= |description1= |service2= |id2= |description2= }}
Two smaller videos centered
{{Video |perrow=2 |service1= |id1= |description1= |service2= |id2= |description2= |service3= |id3= |description3= |service4= |id4= |description4= }}
Three smaller videos full row
{{Video |perrow=3 |service1= |id1= |description1= |service2= |id2= |description2= |service3= |id3= |description3= }}
Four smaller videos full row
{{Video |perrow=3 |service1= |id1= |description1= |service2= |id2= |description2= |service3= |id3=value |description3= |service4= |id4=value |description4= }}