Template:Tb-legend: Difference between revisions

From Electrical Installation Guide
m (1 revision imported: Import all new templates etc (exported from PPR))
(add one extra option (tb-square) - required - tested and copied from DEV-FR)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{bg1|}}} | {{#vardefine:space | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}}
<includeonly>{{#if: {{{bg1|}}} | {{#vardefine:space | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}}{{#vardefine:tbsquare | &nbsp;&nbsp;&nbsp;&nbsp;{{tb-square}}&nbsp;&nbsp;}}
{{tb-start}}
{{tb-start}}
{{{!}} class="wikitable"
{{{!}} class="wikitable"
Line 7: Line 7:
  | HC2 = {{!}} {{tb-HC2}} {{!}} {{#var:space}} {{!}}{{!}} {{{tx1}}}
  | HC2 = {{!}} {{tb-HC2}} {{!}} {{#var:space}} {{!}}{{!}} {{{tx1}}}
  | white = {{!}} class="legend-white" {{!}} {{#var: space}} {{!}}{{!}} {{{tx1}}}
  | white = {{!}} class="legend-white" {{!}} {{#var: space}} {{!}}{{!}} {{{tx1}}}
| tb-square = {{!}} {{#var: tbsquare}} {{!}}{{!}} {{{tx1}}}
}}{{#if: {{{bg2|}}}|<nowiki/>
}}{{#if: {{{bg2|}}}|<nowiki/>
{{!}}-
{{!}}-
Line 13: Line 14:
  | HC2 = {{!}} {{tb-HC2}} {{!}} {{#var:space}} {{!}}{{!}} {{{tx2}}}
  | HC2 = {{!}} {{tb-HC2}} {{!}} {{#var:space}} {{!}}{{!}} {{{tx2}}}
  | white = {{!}} class="legend-white" {{!}} {{#var:space}} {{!}}{{!}} {{{tx2}}}
  | white = {{!}} class="legend-white" {{!}} {{#var:space}} {{!}}{{!}} {{{tx2}}}
| tb-square = {{!}} {{#var: tbsquare}} {{!}}{{!}} {{{tx2}}}
}}}}{{#if: {{{bg3|}}}|<nowiki/>
}}}}{{#if: {{{bg3|}}}|<nowiki/>
{{!}}-
{{!}}-
Line 19: Line 21:
  | HC2 = {{!}} {{tb-HC2}} {{!}} {{#var:space}} {{!}}{{!}} {{{tx3}}}
  | HC2 = {{!}} {{tb-HC2}} {{!}} {{#var:space}} {{!}}{{!}} {{{tx3}}}
  | white = {{!}} class="legend-white" {{!}} {{#var: space}} {{!}}{{!}} {{{tx3}}}
  | white = {{!}} class="legend-white" {{!}} {{#var: space}} {{!}}{{!}} {{{tx3}}}
| tb-square = {{!}} {{#var: tbsquare}} {{!}}{{!}} {{{tx3}}}
}}}}
}}}}
{{!}}}
{{!}}}
Line 32: Line 35:
"label": "Background color 1",
"label": "Background color 1",
"description": "Background color of this legend entry",
"description": "Background color of this legend entry",
"example": "HC1, HC2 or white",
"example": "HC1, HC2, white or tb-square",
"type": "string",
"type": "string",
"suggested": true
"suggested": true

Latest revision as of 15:49, 12 January 2020


This template is used to add a legend to a table, to explain the meaning of specific background colors added in some cells in this table

Template parameters

ParameterDescriptionTypeStatus
Background color 1bg1

Background color of this legend entry

Example
HC1, HC2, white or tb-square
Stringsuggested
Legend entry text 1tx1

Text of this legend entry

Example
The cells with these background color mean xxxxx
Unbalanced wikitextsuggested
Background color 2bg2

Background color of this legend entry

Example
HC1, HC2, white or tb-square
Stringsuggested
Legend entry text 2tx2

Text of this legend entry

Example
The cells with these background color mean xxxxx
Unbalanced wikitextsuggested
Background color 3bg3

Background color of this legend entry

Example
HC1, HC2, white or tb-square
Stringsuggested
Legend entry text 3tx3

Text of this legend entry

Example
The cells with these background color mean xxxxx
Unbalanced wikitextsuggested