Difference between revisions of "LV:Viewer"

From LifeWiki
Jump to navigation Jump to search
(CSS fix)
(new meta tag for LifeViewer)
Line 4: Line 4:
# An optional parameter that specifies what should be displayed if the user has JavaScript disabled (defaults to the plaintext message "Please enable Javascript to view this LifeViewer.").
# An optional parameter that specifies what should be displayed if the user has JavaScript disabled (defaults to the plaintext message "Please enable Javascript to view this LifeViewer.").


An example is: <tt><nowiki>{{LV:Viewer|bo$2bo$3o}}</nowiki></tt>, which generates the following LifeViewer:</noinclude><html><div class="rle"><div class="codebox"><div style="display:none;"><code></html>{{#tag:nowiki|{{{1|x={{{x|3,y=3
An example is: <tt><nowiki>{{LV:Viewer|bo$2bo$3o}}</nowiki></tt>, which generates the following LifeViewer:</noinclude><seo metak="LifeViewer" metad="rle code" /><html><div class="rle"><div class="codebox"><div style="display:none;"><code></html>{{#tag:nowiki|{{{1|x={{{x|3,y=3
bo$2bo$3o}}}}}}}}<html></code></div></div><canvas width="200" height="300" style="margin-left:1px;"><noscript></html>{{{2|<div style="border-width:1px;border-color:#888888;border-style:solid;padding:8px;">Please enable Javascript to view this LifeViewer.</div>}}}<html></noscript></canvas></div></html>
bo$2bo$3o}}}}}}}}<html></code></div></div><canvas width="200" height="300" style="margin-left:1px;"><noscript></html>{{{2|<div style="border-width:1px;border-color:#888888;border-style:solid;padding:8px;">Please enable Javascript to view this LifeViewer.</div>}}}<html></noscript></canvas></div></html>

Revision as of 15:58, 14 July 2016

This is a template for including a LifeViewer in a wiki page, which lets a user manipulate a pattern right in the wiki page itself. This is the same viewer that is used on the ConwayLife.com forums, and it is briefly summarized here. The template takes either one or two unnamed parameters:

  1. The (usually RLE) code that generates the pattern.
  2. An optional parameter that specifies what should be displayed if the user has JavaScript disabled (defaults to the plaintext message "Please enable Javascript to view this LifeViewer.").

An example is: {{LV:Viewer|bo$2bo$3o}}, which generates the following LifeViewer:<seo metak="LifeViewer" metad="rle code" />

x=3,y=3 bo$2bo$3o