Template: Video/doc: Difference between revisions

From The Lost Media Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 1: Line 1:
== [[Template:Video|Video]] ==
== [[Template:Video|Video]] ==
== Examples ==
<pre>
<pre>
<div class="hide">
{{Video|perrow=4
 
  |service1=youtube
{{#vardefine: perrow|{{{perrow|1}}}}}
  |id1=https://www.youtube.com/watch?v=h9RC3BuswEE
 
   |description1=A promo featuring Joey from ''Yu-Gi-Oh''.
{{#vardefine:count|1}}
   |service2=youtube
 
   |id2=https://www.youtube.com/watch?v=M1P7bY20gms
{{#arraydefine:layout|1,2,3,4|,}}
  |description2=A more general promo featuring characters from ''Jackie Chan Adventures''.
 
  |service3=youtube
</div>
  |id3=https://www.youtube.com/watch?v=hUrAFQ-y-jU
<div class="row">
  |description3=The previous promo but slightly extended.
{{#arrayprint: layout
  |service4=youtube
   |,
  |id4=https://www.youtube.com/watch?v=Fu0SLgQg8eI
   |@
  |description4=A promo featuring Ash Ketchum from ''Pokemon''.
   |{{#ifexpr: {{#var:count}} <= @
    |{{VideoRow
        |service={{{service@|youtube}}}
        |id={{{id@|}}}
        |description={{{description@|}}}
        |perrow={{{perrow|}}}
      }}
    |
  }}<!--
 
-->{{#var:count|{{#expr: 0{{#var:count}} + 1 }}}}
}}
}}
</div>
</pre>
</pre>
{{Video|perrow=3
  |service1=youtube
  |id1=https://www.youtube.com/watch?v=h9RC3BuswEE
  |description1=A promo featuring Joey from ''Yu-Gi-Oh''.
  |service2=youtube
  |id2=https://www.youtube.com/watch?v=M1P7bY20gms
  |description2=A more general promo featuring characters from ''Jackie Chan Adventures''.
  |service3=youtube
  |id3=https://www.youtube.com/watch?v=hUrAFQ-y-jU
  |description3=The previous promo but slightly extended.
  |service4=youtube
  |id4=https://www.youtube.com/watch?v=Fu0SLgQg8eI
  |description4=A promo featuring Ash Ketchum from ''Pokemon''.
}}
== [[Template:VideoRow|VideoRow]] ==
== [[Template:VideoRow|VideoRow]] ==
<pre>
<pre>
Line 57: Line 60:
==== One bigger video centered ====
==== One bigger video centered ====
<pre>
<pre>
{{Video
{{Video|perrow=1
  |perrow=1
   |service1=
   |service1=
   |id1=
   |id1=
Line 66: Line 68:
==== Two bigger videos full row ====
==== Two bigger videos full row ====
<pre>
<pre>
{{Video
{{Video|perrow=2
  |perrow=2
 
   |service1=
   |service1=
   |id1=
   |id1=
   |description1=
   |description1=
   |service2=
   |service2=
   |id2=
   |id2=
Line 78: Line 81:
==== Two smaller videos centered ====
==== Two smaller videos centered ====
<pre>
<pre>
{{Video
{{Video|perrow=2
  |perrow=2
 
     |service1=
     |service1=
     |id1=
     |id1=
     |description1=
     |description1=
   |service2=
   |service2=
   |id2=
   |id2=
   |description2=
   |description2=
   |service3=
   |service3=
   |id3=
   |id3=
   |description3=
   |description3=
     |service4=
     |service4=
     |id4=
     |id4=
Line 96: Line 102:
==== Three smaller videos full row ====
==== Three smaller videos full row ====
<pre>
<pre>
{{Video
{{Video|perrow=3
  |perrow=3
 
   |service1=
   |service1=
   |id1=
   |id1=
   |description1=
   |description1=
   |service2=
   |service2=
   |id2=
   |id2=
   |description2=
   |description2=
   |service3=
   |service3=
   |id3=
   |id3=
Line 111: Line 119:
==== Four smaller videos full row ====
==== Four smaller videos full row ====
<pre>
<pre>
{{Video
{{Video|perrow=4
  |perrow=4
 
   |service1=
   |service1=
   |id1=
   |id1=
   |description1=
   |description1=
   |service2=
   |service2=
   |id2=
   |id2=
   |description2=
   |description2=
   |service3=
   |service3=
   |id3=value
   |id3=
   |description3=
   |description3=
   |service4=
   |service4=
   |id4=value
   |id4=
   |description4=
   |description4=
}}
}}
</pre>
</pre>
== Examples ==
{{Video
|perrow=4
  |service1=youtube
  |id1=https://www.youtube.com/watch?v=h9RC3BuswEE
  |description1=A promo featuring Joey from ''Yu-Gi-Oh''.
  |service2=youtube
  |id2=https://www.youtube.com/watch?v=M1P7bY20gms
  |description2=A more general promo featuring characters from ''Jackie Chan Adventures''.
  |service3=youtube
  |id3=https://www.youtube.com/watch?v=hUrAFQ-y-jU
  |description3=The previous promo but slightly extended.
  |service4=youtube
  |id4=https://www.youtube.com/watch?v=Fu0SLgQg8eI
  |description4=A promo featuring Ash Ketchum from ''Pokemon''.
}}

Revision as of 18:11, 19 December 2017

Video

Examples

{{Video|perrow=4
  |service1=youtube
  |id1=https://www.youtube.com/watch?v=h9RC3BuswEE
  |description1=A promo featuring Joey from ''Yu-Gi-Oh''.
  |service2=youtube
  |id2=https://www.youtube.com/watch?v=M1P7bY20gms
  |description2=A more general promo featuring characters from ''Jackie Chan Adventures''.
  |service3=youtube
  |id3=https://www.youtube.com/watch?v=hUrAFQ-y-jU
  |description3=The previous promo but slightly extended.
  |service4=youtube
  |id4=https://www.youtube.com/watch?v=Fu0SLgQg8eI
  |description4=A promo featuring Ash Ketchum from ''Pokemon''.
}}
A promo featuring Joey from Yu-Gi-Oh.

A more general promo featuring characters from Jackie Chan Adventures.

The previous promo but slightly extended.

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=4

  |service1=
  |id1=
  |description1=

  |service2=
  |id2=
  |description2=

  |service3=
  |id3=
  |description3=

  |service4=
  |id4=
  |description4=
}}