Template:EmbedViewer: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
mNo edit summary
Documentation
Line 2: Line 2:
| right = <div class="thumb tnone" style="float: right; {{{style|margin-left: 1em; margin-bottom: 1em;}}}"><div class="thumbinner"><div class="image">{{LV:Viewer|{{{rle|{{RLE:{{{pname}}}}}}}} {{{viewerconfig|}}}}}</div><div class="thumbcaption">{{{caption|}}} (click to open [[LifeViewer]])</div></div></div>
| right = <div class="thumb tnone" style="float: right; {{{style|margin-left: 1em; margin-bottom: 1em;}}}"><div class="thumbinner"><div class="image">{{LV:Viewer|{{{rle|{{RLE:{{{pname}}}}}}}} {{{viewerconfig|}}}}}</div><div class="thumbcaption">{{{caption|}}} (click to open [[LifeViewer]])</div></div></div>
| left = <div class="thumb tnone" style="float: left; {{{style|margin-right: 1em; margin-bottom: 1em;}}}"><div class="thumbinner"><div class="image">{{LV:Viewer|{{{rle|{{RLE:{{{pname}}}}}}}} {{{viewerconfig|}}}}}</div><div class="thumbcaption">{{{caption|}}} (click to open [[LifeViewer]])</div></div></div>
| left = <div class="thumb tnone" style="float: left; {{{style|margin-right: 1em; margin-bottom: 1em;}}}"><div class="thumbinner"><div class="image">{{LV:Viewer|{{{rle|{{RLE:{{{pname}}}}}}}} {{{viewerconfig|}}}}}</div><div class="thumbcaption">{{{caption|}}} (click to open [[LifeViewer]])</div></div></div>
| center = <table style="margin-left: auto; margin-right: auto; width: fit-content"><tr><td align="center">{{LV:Viewer|{{{rle|{{RLE:{{{pname}}}}}}}} {{{viewerconfig|}}}}}</td></tr><tr><td align="center">{{{caption|}}} (click to open [[LifeViewer]])</td></tr></table>
| center = <table style="margin-left: auto; margin-right: auto; width: fit-content; {{style|}}}"><tr><td align="center">{{LV:Viewer|{{{rle|{{RLE:{{{pname}}}}}}}} {{{viewerconfig|}}}}}</td></tr><tr><td align="center">{{{caption|}}} (click to open [[LifeViewer]])</td></tr></table>
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{EmbedViewer
{{EmbedViewer
Line 11: Line 11:
This template can be used to embed a floating [[Help:LifeViewer|LifeViewer]] applet in an article, using an [[RLE]] code snippet from the <tt>RLE:</tt> namespace. It takes the following parameters:
This template can be used to embed a floating [[Help:LifeViewer|LifeViewer]] applet in an article, using an [[RLE]] code snippet from the <tt>RLE:</tt> namespace. It takes the following parameters:


* position: floating position (default: right).
Pattern: '''one''' of:
* style: additional CSS styling.
 
* pname: name of the code snippet in the <tt>RLE:</tt> namespace. '''Mandatory'''.
* rle: RLE snippet.
* pname: name of the RLE snippet in the <tt>RLE:</tt> namespace (without the <tt>RLE:</tt> prefix).
 
Other:
 
* position: position.
** Possible values are <tt>left</tt> (floating left), <tt>right</tt> (floating right) and <tt>center</tt>. Default: <tt>right</tt>.
* style: additional CSS styling. Default:
** <tt>position = right</tt>: <tt>margin-left: 1em; margin-bottom: 1em</tt>
** <tt>position = left</tt>: <tt>margin-right: 1em; margin-bottom: 1em</tt>
** <tt>position = centert</tt>: (none)
* viewerconfig: additional LifeViewer configuration to use.
* viewerconfig: additional LifeViewer configuration to use.
* caption: the caption to use.
* caption: the caption to use.

Revision as of 19:53, 13 August 2017

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:

Pattern: one of:

  • rle: RLE snippet.
  • pname: name of the RLE snippet in the RLE: namespace (without the RLE: prefix).

Other:

  • position: position.
    • Possible values are left (floating left), right (floating right) and center. Default: right.
  • style: additional CSS styling. Default:
    • position = right: margin-left: 1em; margin-bottom: 1em
    • position = left: margin-right: 1em; margin-bottom: 1em
    • position = centert: (none)
  • 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]]
}}