Template:PatternDownload: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
mNo edit summary
Out with escaped MediaWiki tables, in with plain HTML. First step to untangling this complicated mess.
Line 5: Line 5:
<tr>
<tr>
<td colspan="2">
<td colspan="2">
{{{!}} class="infobox_table collapsible collapsed" style="width:100%"
<table class="infobox_table collapsible collapsed" style="width:100%">
{{!}}-
<tr>
! colspan="2" class="infobox_subhead" {{!}} [[Life-like cellular automaton|Rules]]
<th colspan="2" class="infobox_subhead">[[Life-like cellular automaton|Rules]]</th></tr>
{{!}}-
<tr>
! All&nbsp;rules
<td> All&nbsp;rules </td>
{{!}} style="text-align:right;" {{!}} {{#ifeq: {{{rulemin|}}} | {{{rulemax|}}} | {{{rulemax|}}} only | {{#if:{{{rulemin|}}}|{{{rulemin}}}|unknown}}&nbsp;–&nbsp;{{#if:{{{rulemax|}}}|{{{rulemax}}}|unknown}}}}
<td> style="text-align:right;" {{!}} {{#ifeq: {{{rulemin|}}} | {{{rulemax|}}} | {{{rulemax|}}} only | {{#if:{{{rulemin|}}}|{{{rulemin}}}|unknown}}&nbsp;–&nbsp;{{#if:{{{rulemax|}}}|{{{rulemax}}}|unknown}}}}</td>
{{#if: {{{rulespecial|}}} | {{!}}-
{{#if: {{{rulespecial|}}} | <tr>
! Important&nbsp;rules
<td> Important&nbsp;rules </td>
{{!}} style="text-align:right;" valign="top" {{!}} {{{rulespecial|}}}  
<td style="text-align:right;" valign="top"> {{{rulespecial|}}} </td></tr>
{{!}}- | {{!}}- }}
<tr> | <tr> }}
! #&nbsp;of&nbsp;rules
<d> #&nbsp;of&nbsp;rules </td>
{{!}} style="text-align:right;" {{!}} {{#if: {{{rulemin|}}} | {{#if: {{{rulemax|}}} | 2<sup>{{#expr:{{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}}}}</sup> = {{#expr: 2^({{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}})}} | Unknown }} | Unknown }}
<td style="text-align:right;"> {{#if: {{{rulemin|}}} | {{#if: {{{rulemax|}}} | 2<sup>{{#expr:{{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}}}}</sup> = {{#expr: 2^({{#len:{{{rulemax|}}}}}-{{#len:{{{rulemin|}}}}})}} | Unknown }} | Unknown }} </td>
{{!}}}
</table>
</td></tr>
</td></tr>
}} {{#if: {{{synthesis|}}}{{{synthesisRLE|}}}{{{pentadecathlonid|}}} |
}} {{#if: {{{synthesis|}}}{{{synthesisRLE|}}}{{{pentadecathlonid|}}} |
Line 26: Line 26:
<tr>
<tr>
<td colspan="2">
<td colspan="2">
{{{!}} class="infobox_table collapsible collapsed" style="width:100%"
<table class="infobox_table collapsible collapsed" style="width:100%">
{{!}}-
<tr>
! colspan="2" class="infobox_subhead" {{!}} [[Glider synthesis]]
<th colspan="2" class="infobox_subhead"> [[Glider synthesis]] </th>
{{#ifeq: {{{synthesis|}}} | 0 | {{!}}-
{{#ifeq: {{{synthesis|}}} | 0 | <tr>
{{!}} colspan="2" style="text-align:center;" {{!}} Synthesis is [[:Category:Patterns that can not be constructed with gliders|not possible]]. | {{!}}-
<td colspan="2" style="text-align:center;"> Synthesis is [[:Category:Patterns that can not be constructed with gliders|not possible]].</td></td> |  
{{#if: {{{synthesis|}}} | {{!}}-
{{#if: {{{synthesis|}}} | <tr>
! Fewest&nbsp;[[glider]]s
<th> Fewest&nbsp;[[glider]]s </th>
{{!}} style="text-align:right;" {{!}} [[:Category:Patterns that can be constructed with {{{synthesis|}}} gliders|{{{synthesis|}}}]]
<td style="text-align:right;"> [[:Category:Patterns that can be constructed with {{{synthesis|}}} gliders|{{{synthesis|}}}]] </td></tr>
}}
}}
{{#if: {{{synthesisRLE|}}} | {{!}}-
{{#if: {{{synthesisRLE|}}} | <tr>
! [[RLE]]
<th> [[RLE]] </th>
{{!}} style="text-align:right;" {{!}} [http://www.conwaylife.com/patterns/{{{pname|name}}}_synth.rle {{{pname|name}}}_synth.rle]
<td> style="text-align:right;"> [http://www.conwaylife.com/patterns/{{{pname|name}}}_synth.rle {{{pname|name}}}_synth.rle] </td></tr>
|[[Category:Patterns without synthesis files]]}} }}
| [[Category:Patterns without synthesis files]]}} }}
{{#if: {{{apgcode|}}} | {{!}}-
{{#if: {{{apgcode|}}} | <tr>
! Auto-generated synthesis
<th> Auto-generated synthesis </th>
{{!}} style="text-align:right; word-break: break-all" {{!}} [https://glidersynth.neocities.org/?{{{apgcode|}}} {{{apgcode|}}}]<br />[https://catagolue.appspot.com/js/glidersynth.html?{{{apgcode|}}} {{{apgcode|}}}] (alt.)
<td style="text-align:right; word-break: break-all"> [https://glidersynth.neocities.org/?{{{apgcode|}}} {{{apgcode|}}}]<br />[https://catagolue.appspot.com/js/glidersynth.html?{{{apgcode|}}} {{{apgcode|}}}] (alt.)</td></tr>
}}
}}
{{#if: {{{pentadecathlonid|}}} |  
{{#if: {{{pentadecathlonid|}}} |  
{{!}}-
<tr>
! As source
<th As source </th>
{{!}} style="text-align:right;" {{!}} [http://pentadecathlon.com/objects/object-info.php?objid={{{pentadecathlonid|}}}&content=foundations {{{pentadecathlonid|}}}]
<td style="text-align:right;"> [http://pentadecathlon.com/objects/object-info.php?objid={{{pentadecathlonid|}}}&content=foundations {{{pentadecathlonid|}}}] </td></tr>
{{!}}-
<tr>
! As result
<th> As result </th>
{{!}} style="text-align:right;" {{!}} [http://pentadecathlon.com/objects/object-info.php?objid={{{pentadecathlonid|}}}&content=constructions {{{pentadecathlonid|}}}]
<td style="text-align:right;"> [http://pentadecathlon.com/objects/object-info.php?objid={{{pentadecathlonid|}}}&content=constructions {{{pentadecathlonid|}}}] </td></tr>
}}
}}
{{!}}}</td></tr> }} {{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{#ifexist:RLE:{{{pname}}}|true|}} |
</table></td></tr> }} {{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{#ifexist:RLE:{{{pname}}}|true|}} |
<tr>
<tr>
<td colspan="2" style="height:3px;"></td></tr>
<td colspan="2" style="height:3px;"></td></tr>
Line 58: Line 58:
<tr>
<tr>
<td colspan="2">
<td colspan="2">
{{{!}} class="infobox_table collapsible collapsed" style="width:100%"
<table class="infobox_table collapsible collapsed" style="width:100%">
{{!}}-
<tr>
! colspan="2" class="infobox_subhead" {{!}} Pattern files
<th colspan="2" class="infobox_subhead"> Pattern files </th></tr>
{{#if: {{{life105|}}} | <tr>
{{#if: {{{life105|}}} | <tr>
<th>[[Life 1.05]]</th>
<th>[[Life 1.05]]</th>
Line 84: Line 84:
<td style="text-align:right;"> [http://www.conwaylife.com/patterns/{{{pname|name}}}.zip {{{pname|name}}}.zip]</td></tr>
<td style="text-align:right;"> [http://www.conwaylife.com/patterns/{{{pname|name}}}.zip {{{pname|name}}}.zip]</td></tr>
}}
}}
{{!}}}
</table>
}}{{#if: {{{synthesis|}}} | {{#ifeq: {{{synthesis|}}} | 0 | [[Category:Patterns that can not be constructed with gliders]] | [[Category:Patterns that can be constructed with {{{synthesis|}}} gliders]]}} }}
}}{{#if: {{{synthesis|}}} | {{#ifeq: {{{synthesis|}}} | 0 | [[Category:Patterns that can not be constructed with gliders]] | [[Category:Patterns that can be constructed with {{{synthesis|}}} gliders]]}} }}
</includeonly>
</includeonly>
<noinclude>This template displays the "Rules", "Glider synthesis" and "Pattern files" boxes that appear on the right hand side of pattern pages. It should not be used on its own, but only within other pattern infobox templates such as [[Template:Pattern]] and [[Template:Oscillator]]. All of its parameters are passed in from the corresponding parameters of the template that calls it.
<noinclude>This template displays the "Rules", "Glider synthesis" and "Pattern files" boxes that appear on the right hand side of pattern pages. It should not be used on its own, but only within other pattern infobox templates such as [[Template:Pattern]] and [[Template:Oscillator]]. All of its parameters are passed in from the corresponding parameters of the template that calls it.
[[Category:Infobox templates]]</noinclude>
[[Category:Infobox templates]]</noinclude>

Revision as of 16:29, 15 January 2018

This template displays the "Rules", "Glider synthesis" and "Pattern files" boxes that appear on the right hand side of pattern pages. It should not be used on its own, but only within other pattern infobox templates such as Template:Pattern and Template:Oscillator. All of its parameters are passed in from the corresponding parameters of the template that calls it.