Template:HOCMatrix: Difference between revisions
Jump to navigation
Jump to search
Initial setup |
Added chipcolor parameter |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span class="hoc-matrix">{{#arraydefine:rows|{{{data|}}}|;}}{{#loop:rowIdx|0|{{#arraysize:rows}}| | <includeonly><span class="hoc-matrix chipcolor-{{lc:{{{chipcolor|}}}}}">{{#arraydefine:rows|{{{data|{{{1|}}}}}}|;}}{{#loop:rowIdx|0|{{#arraysize:rows}}| | ||
{{#arraydefine:dataRow{{#var:rowIdx}}|{{#arrayindex:rows|{{#var:rowIdx}}}}}} | {{#arraydefine:dataRow{{#var:rowIdx}}|{{#arrayindex:rows|{{#var:rowIdx}}}}}} | ||
<span class="hoc-matrix-row">{{#arrayprint:dataRow{{#var:rowIdx}}||@@@@|<span class="hoc-matrix-element hoc-matrix-element-type-@@@@> </span>}}</span>}}</span></includeonly><noinclude>{{Documentation}}</noinclude> | <span class="hoc-matrix-row">{{#arrayprint:dataRow{{#var:rowIdx}}||@@@@|<span class="hoc-matrix-element hoc-matrix-element-type-@@@@> </span>}}</span>}}</span></includeonly><noinclude>{{Documentation}}</noinclude> |
Latest revision as of 12:03, 6 January 2020
A template for creating a small HOC Matrix symbol.
Parameters[edit]
Parameter name | Required? | Default value | Description |
---|---|---|---|
chipcolor |
Yes | (n/a) | The color scheme the tiles should be rendered in. |
data (or anonymous) |
Yes | (n/a) | The data for the matrix to set. Each row shall be separated by a ; and each column by a , . The data is set by the following three digits:
|
Usage[edit]
See the template's testcases:
Usual parameters with parameter name | |
---|---|
Wiki code | {{HOCMatrix|chipcolor=blue |data= 0,1,1,0,0,2; 0,1,1,0,2,2; 0,1,1,1,1,2; 2,1,1,1,1,0; 2,2,0,1,1,0; 2,0,0,1,1,0}} |
Main version | |
Sandbox version | Template:HOCMatrix/sandbox |
Usual parameters without parameter name | |
---|---|
Wiki code | {{HOCMatrix|chipcolor=orange| 0,1,1,0,0,2; 0,1,1,0,2,2; 0,1,1,1,1,2; 2,1,1,1,1,0; 2,2,0,1,1,0; 2,0,0,1,1,0}} |
Main version | |
Sandbox version | Template:HOCMatrix/sandbox |
See also[edit]
The above documentation is transcluded from Template:HOCMatrix/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |