Difference between revisions of "Template:Stilllife"

From LifeWiki
Jump to navigation Jump to search
(Maintainability cleanups, cmp. Template:Agar.)
(Periodic objects with more than 1000 cells put in that category)
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!--  
<!--


Display "request pattern file" box if no pattern files exist and "nofile" was not passed to suppress this
Begin infobox


--> <includeonly>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | | {{requestpatternfile}} }}</includeonly><!--
-->{{InfoboxStart
|typename      = Still Life
|defaultconfig = stilllife
|viewerconfig  = {{{viewerconfig|}}}
|name          = {{{name|}}}
|zip          = {{{zip|}}}
|mc            = {{{mc|}}}
|life105      = {{{life105|}}}
|life106      = {{{life106|}}}
|plaintext    = {{{plaintext|}}}
|rle          = {{{rle|}}}
|nofile        = {{{nofile|}}}
|pname        = {{{pname|}}}
|animated      = {{{animated|}}}
}}<!--


Begin infobox
Display pattern type and family


--> <table class="infobox">
--><tr>
<tr><td colspan="2" class="infobox_head"> {{{name|Still Life Name}}} </td></tr>
<tr>
<td colspan="2" class="infobox_img"><table class="img_border" cellpadding="0"><tr><td>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | {{#ifexist:RLE:{{{pname}}}|{{LV:Viewer|{{RLE:{{{pname}}}}}
{{LifeViewer config/stilllife}}
{{#tag:nowiki|{{{viewerconfig|}}}}}|[[Image:{{{pname|}}}.png|{{{name}}} image]]}}|[[Image:{{{pname|}}}.png|{{{name}}} image]]}}|[[Image:UnknownPattern.png|{{{name}}} image]]}}</td></tr></table></td></tr>{{#if: {{{animated|}}} | <tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.gif|View animated image]] </td></tr> }}
<tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.png|View static image]]</td></tr>
<!-- {{#if: {{{rle|}}} | <tr><td colspan="2" class="infobox_link"> [http://www.conwaylife.com?p={{{pname|name}}} Manipulate via Java] </td></tr> }} -->
<tr>
<th> Pattern type </th>
<th> Pattern type </th>
<td> {{#ifeq: {{{type|}}} | pseudo | [[still life#Pseudo still lifes|Pseudo still life]] | {{#ifeq: {{{type|}}} | constellation | [[Constellation]] | {{#ifeq: {{{type|}}} | eater | [[Eater]] | [[still life#Strict still lifes|Strict still life]] }} }} }} {{#if: {{{type2|}}} | <br /> {{#ifeq: {{{type2|}}} | pseudo | [[still life#Pseudo still lifes|Pseudo still life]] | {{#ifeq: {{{type2|}}} | constellation | [[Constellation]] | {{#ifeq: {{{type2|}}} | eater | [[Eater]] | {{{type2}}} }} }} }} }}</td></tr>
<td> {{#switch: {{{type|}}}
    | pseudo       = [[Still life#Pseudo still lifes|Pseudo still life]]  
    | constellation = [[Constellation]]  
    | eater         = [[Eater]]  
    |                 [[Still life#Strict still lifes|Strict still life]]  
}} {{#if: {{{type2|}}} | <br />{{#switch: {{{type2|}}}  
    | pseudo       = [[Still life#Pseudo still lifes|Pseudo still life]]
    | constellation = [[Constellation]]  
    | eater         = [[Eater]]  
    |                 {{{type2}}}
}} }}</td></tr>
{{#if: {{{family|}}} |  
{{#if: {{{family|}}} |  
<tr>
<tr>
<th> Family </th>
<th> Family </th>
<td> {{{family|}}} </td></tr>
<td> {{{family|}}} </td></tr>
}}
}}<!--
<tr>
 
<th> Number of [[cell]]s </th>
Display population and bounding box
<td> {{{c|Unknown}}} </td></tr>
 
<tr>
-->{{PatternPopulationAndBoundingBox
<th> [[Bounding box]] </th>
|c        = {{{c|}}}
<td> {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }} </td></tr>
|bx      = {{{bx|}}}
<tr>
|by      = {{{by|}}}
<th valign="top"> Discovered by </th>
|fc      = {{{fc|}}}
<td> {{#if: {{{discoverer|}}} | [[{{{discoverer|}}}]] | Unknown }}{{#if: {{{discoverer2|}}} | <br />[[{{{discoverer2|}}}]] | }}{{#if: {{{discoverer3|}}} | <br />[[{{{discoverer3|}}}]] | }}{{#if: {{{discoverer4|}}} | <br />[[{{{discoverer4|}}}]] | }}{{#if: {{{discoverer5|}}} | <br />[[{{{discoverer5|}}}]] | }} </td></tr>
|periodic = true
<tr>
}}<!--
<th> Year of discovery </th>
 
<td> {{{discoveryear|Unknown}}} </td></tr><!--
Display an infobox divider
 
-->{{InfoboxDivider}}<!--
 
Display discoverers and year of discovery
 
-->{{PatternDiscovery
|discoverer   = {{{discoverer|}}}
|discoverer2 = {{{discoverer2|}}}
|discoverer3 = {{{discoverer3|}}}
|discoverer4 = {{{discoverer4|}}}
|discoverer5  = {{{discoverer5|}}}
|discoveryear = {{{discoveryear|}}}
}}<!--


Display "Rules", "Glider synthesis", "Pattern files" sections
Display "Rules", "Glider synthesis", "Pattern files" sections
Line 41: Line 70:
|synthesis    = {{{synthesis|}}}
|synthesis    = {{{synthesis|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|apgcode      = {{{apgcode|}}}
|life105      = {{{life105|}}}
|life105      = {{{life105|}}}
|life106      = {{{life106|}}}
|life106      = {{{life106|}}}
Line 51: Line 81:
|rulemax      = {{{rulemax|}}}
|rulemax      = {{{rulemax|}}}
|rulemin      = {{{rulemin|}}}  
|rulemin      = {{{rulemin|}}}  
|isorulemax  = {{{isorulemax|}}}
|isorulemin  = {{{isorulemin|}}}
}}<!--
}}<!--


Line 74: Line 106:


--><includeonly>
--><includeonly>
[[Category:Patterns]]
{{#ifeq:{{NAMESPACE}}|User||
{{#ifeq: {{{type|}}} | pseudo | [[Category:Still lifes]][[Category:Pseudo still lifes]] {{#if: {{{c|}}} | [[Category:Pseudo still lifes with {{{c}}} cells]] }} | {{#ifeq: {{{type|}}} | constellation | [[Category:Still lifes]] {{#if: {{{c|}}} | [[Category:Constellations with {{{c}}} cells]] }} | {{#ifeq: {{{type|}}} | eater | [[Category:Still lifes]][[Category:Eaters]] {{#if: {{{c|}}} | [[Category:Eaters with {{{c}}} cells]] }} | [[Category:Still lifes]][[Category:Strict still lifes]]{{#if: {{{c|}}} | [[Category:Strict still lifes with {{{c}}} cells]] }} }} }} }}{{#ifeq: {{{type2|}}} | pseudo | [[Category:Still lifes]][[Category:Pseudo still lifes]] {{#if: {{{c|}}} | [[Category:Pseudo still lifes with {{{c}}} cells]] }} | {{#ifeq: {{{type2|}}} | constellation | [[Category:Still lifes]] {{#if: {{{c|}}} | [[Category:Constellations with {{{c}}} cells]] }} | {{#ifeq: {{{type2|}}} | eater | [[Category:Still lifes]][[Category:Eaters]] {{#if: {{{c|}}} | [[Category:Eaters with {{{c}}} cells]] }} }} }} }}{{#if: {{{c|}}} | [[Category:Patterns with {{{c}}} cells]] }}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoverer2|}}} | [[Category:Patterns found by {{{discoverer2|}}}]] }}{{#if: {{{discoverer3|}}} | [[Category:Patterns found by {{{discoverer3|}}}]] }}{{#if: {{{discoverer4|}}} | [[Category:Patterns found by {{{discoverer4|}}}]] }}{{#if: {{{discoverer5|}}} | [[Category:Patterns found by {{{discoverer5|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }}{{#if: {{{family|}}} | [[Category:{{{family|}}} variants]] }}{{#ifexist:RLE:{{{pname}}}|{{#if:{{{viewerconfig|}}}||[[Category:Patterns with RLE snippets but no LifeViewer configuration]]}}}}{{#if: {{{apgcode|}}} | | {{#ifeq: {{{type|}}} | constellation | | {{#ifeq: {{{type|}}} | pseudo | | {{#ifeq: {{{type2|}}} | constellation | | {{#ifeq: {{{type2|}}} | pseudo | | [[Category:Still lifes with no apgcode infobox parameter]] }} }} }} }} }}{{#if: {{{pentadecathlonid|}}} | | {{#ifeq: {{{type|}}} | constellation | | {{#ifeq: {{{type|}}} | pseudo | | {{#ifeq: {{{type2|}}} | constellation | | {{#ifeq: {{{type2|}}} | pseudo | | [[Category:Still lifes with no Pentadecathlon ID]] }} }} }} }} }}
{{#ifeq: {{{type|}}} | pseudo | [[Category:Still lifes]][[Category:Pseudo still lifes]] {{#if: {{{c|}}} | [[Category:Pseudo still lifes with {{{c}}} cells]] }} | {{#ifeq: {{{type|}}} | constellation | [[Category:Constellations]] {{#if: {{{c|}}} | [[Category:Constellations with {{{c}}} cells]] }} | {{#ifeq: {{{type|}}} | eater | [[Category:Still lifes]][[Category:Eaters]] {{#if: {{{c|}}} | [[Category:Eaters with {{{c}}} cells]] }} | [[Category:Still lifes]][[Category:Strict still lifes]]{{#if: {{{c|}}} | [[Category:Strict still lifes with {{{c}}} cells]][[Category:Periodic objects with minimum population {{{c}}}]] }} }} }} }}{{#ifeq: {{{type2|}}} | pseudo | [[Category:Still lifes]][[Category:Pseudo still lifes]] {{#if: {{{c|}}} | [[Category:Pseudo still lifes with {{{c}}} cells]] }} | {{#ifeq: {{{type2|}}} | constellation | [[Category:Still lifes]] {{#if: {{{c|}}} | [[Category:Constellations with {{{c}}} cells]] }} | {{#ifeq: {{{type2|}}} | eater | [[Category:Still lifes]][[Category:Eaters]] {{#if: {{{c|}}} | [[Category:Eaters with {{{c}}} cells]] }} }} }} }}{{#if: {{{family|}}} | [[Category:{{{family|}}} variants]] }}{{#if: {{{apgcode|}}} | | {{#ifeq: {{{type|}}} | constellation | | {{#ifeq: {{{type|}}} | pseudo | | {{#ifeq: {{{type2|}}} | constellation | | {{#ifeq: {{{type2|}}} | pseudo | | [[Category:Still lifes with no apgcode infobox parameter]] }} }} }} }} }}{{#if: {{{pentadecathlonid|}}} | | {{#ifeq: {{{type|}}} | constellation | | {{#ifeq: {{{type|}}} | pseudo | | {{#ifeq: {{{type2|}}} | constellation | | {{#ifeq: {{{type2|}}} | pseudo | | [[Category:Still lifes with no Pentadecathlon ID]] }} }} }} }} }}
}}
</includeonly>
</includeonly>

Revision as of 17:18, 27 April 2019

Still Life Name
image
Pattern type Strict still life
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for still lifes. An example can be seen to the right. For general information about how to use pattern templates, see LifeWiki:Style guide/Pattern layout. To see a live example of this template in action, see block.

Special parameters

The following parameters are optional.


Pattern templates