Template:Number Format Plus Minus: Difference between revisions
From Lilith's Throne
Jump to navigationJump to search
Sightglass (Sọ̀rọ̀ | contribs) m Sightglass moved page Template:Plus Minus Color to Template:Number Format Plus Minus |
Allow for Addition of a Percentage Sign via a Parameter |
||
Line 1: | Line 1: | ||
<span style="color:#{{#ifexpr: {{{Value|}}} > 0 | 57DB7E | EA5D76}}">'''{{#ifexpr: {{{Value|}}} > 0 | + | }}{{{Value}}}'''</span><noinclude> | <span style="color:#{{#ifexpr: {{{Value|}}} > 0 | 57DB7E | EA5D76}}">'''{{#ifexpr: {{{Value|}}} > 0 | + | }}{{{Value}}}{{#ifexpr: {{{isPercentage|false}}}|%|}}'''</span><noinclude> | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 6: | Line 6: | ||
"type": "number", | "type": "number", | ||
"required": true | "required": true | ||
} | }, | ||
"isPercentage": { | |||
"type": "boolean", | |||
"required": false | |||
} | |||
}, | }, | ||
"description": "Displays bold colored text for a number as it might be seen in LT. Adds a plus sign and green color to positive numbers, and red color to negative numbers." | "description": "Displays bold colored text for a number as it might be seen in LT. Adds a plus sign and green color to positive numbers, and red color to negative numbers." |
Revision as of 21:31, 5 March 2024
<span style="color:#Expression error: Unexpected > operator.">Expression error: Unexpected > operator.{{{Value}}}Expression error: Unrecognised word "false".
Displays bold colored text for a number as it might be seen in LT. Adds a plus sign and green color to positive numbers, and red color to negative numbers.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Value | Value | no description | Number | required |
isPercentage | isPercentage | no description | Boolean | optional |