Raft Wiki
m (Undo revision 16811 by Tolle44 (talk))
Tag: Undo
(New code.)
Line 4: Line 4:
 
The original code looks like this:</br>
 
The original code looks like this:</br>
 
<pre>
 
<pre>
  +
<nowiki><div class="mw-customtoggle-myDivision" style="display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none">Show/Hide Video</div>
<nowiki>{| class="mw-collapsible mw-collapsed" data-expandtext="Click to see video" data-collapsetext="Click to hide video"</nowiki>
 
  +
<nowiki>!</nowiki>
 
  +
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-myDivision">
<nowiki>|-</nowiki>
 
  +
<div class="mw-collapsible-content" style="margin-top:10px;padding:10px;border-radius:5px">[[File:{{{1}}}|640px]]</div>
<nowiki>|[[File:Mama Bear Cheese Strategy.mp4|640px]]</nowiki>
 
<nowiki>|}</nowiki>
+
</div></nowiki>
 
</pre>
 
</pre>
 
To make use of the template, the editor simply needs to write:</br>
 
To make use of the template, the editor simply needs to write:</br>

Revision as of 20:29, 26 January 2021

Summary

This template will insert an expandable text revealing a video.

The original code looks like this:

<div class="mw-customtoggle-myDivision" style="display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none">Show/Hide Video</div>

<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-myDivision">
<div class="mw-collapsible-content" style="margin-top:10px;padding:10px;border-radius:5px">[[File:{{{1}}}|640px]]</div>
</div>

To make use of the template, the editor simply needs to write:

{{Video|Mama Bear Cheese Strategy.mp4}}

The template will automatically put the video in the correct size, so the editor only needs to enter the name of the video including the file type (".mp4", ".webm", etc.).

Example 1

The code {{Video|Mama Bear Cheese Strategy.mp4}} will produce this expandable:

Show/Hide Video