Difference between revisions of "Template:EmbedViewer"

From LifeWiki
Jump to navigation Jump to search
(Rollback)
Line 1: Line 1:
<includeonly><div class="thumb tnone" style="{{#if:{{{nofloat|}}}|margin-left: auto; margin-right: auto; |float: {{{position|right}}}; margin-left: 1em; margin-bottom: 1em;}} {{{style|}}}"><div class="thumbinner"><div class="image">{{LV:Viewer|{{RLE:{{{pname}}}}} {{{viewerconfig|}}}}}</div><div class="thumbcaption">{{{caption|}}} (click to open [[LifeViewer]]).</div></div></div></includeonly><noinclude>
<includeonly><div class="thumb tnone" style="float: {{{position|right}}}; margin-left: 1em; margin-bottom: 1em; {{{style|}}}"><div class="thumbinner"><div class="image">{{LV:Viewer|{{RLE:{{{pname}}}}} {{{viewerconfig|}}}}}</div><div class="thumbcaption">{{{caption|}}} (click to open [[LifeViewer]]).</div></div></div></includeonly><noinclude>
{{EmbedViewer
{{EmbedViewer
|pname        = richsp16
|pname        = richsp16
Line 8: Line 8:


* position: floating position (default: right).
* position: floating position (default: right).
* nofloat: if true, do not float.
* style: additional CSS styling.
* style: additional CSS styling.
* pname: name of the code snippet in the <tt>RLE:</tt> namespace. '''Mandatory'''.
* pname: name of the code snippet in the <tt>RLE:</tt> namespace. '''Mandatory'''.

Revision as of 21:48, 23 November 2016

x = 13, y = 10, rule = B3/S23 4bo3bo$2b2obobob2o$bo3bobo3bo$o3b2ob2o3bo$obo7bobo$bo9bo2$4b2ob2o$3bob obobo$4bo3bo! #C [[ THEME 6 GRID GRIDMAJOR 0 THUMBLAUNCH AUTOSTART GPS 4 THUMBSIZE 2 ]]
Rich's p16 (click to open LifeViewer).

This template can be used to embed a floating LifeViewer applet in an article, using an RLE code snippet from the RLE: namespace. It takes the following parameters:

  • position: floating position (default: right).
  • style: additional CSS styling.
  • pname: name of the code snippet in the RLE: namespace. Mandatory.
  • viewerconfig: additional LifeViewer configuration to use.
  • caption: the caption to use.

Example: the viewer at the right was created using the following call:

{{EmbedViewer
|pname        = richsp16
|viewerconfig = #C [[ THEME 6 GRID GRIDMAJOR 0 THUMBLAUNCH AUTOSTART GPS 4 THUMBSIZE 2 ]]
|caption      = [[Rich's p16]]
}}