Template:Difference: Difference between revisions

From Archaelund Wiki
No edit summary
No edit summary
Tag: Manual revert
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{{#ifexpr:{{{1|}}}>0|<span style="color:Lime;">{{{1}}}</span>|{{#ifexpr:{{{1|}}}<0|<span style="color:Red;">{{{1}}}</span>|{{{1}}}}}}}</includeonly></onlyinclude>
<onlyinclude><includeonly>{{#ifexpr:{{{1|}}}>0|<span style="color:Lime;">+{{{1}}}</span>|{{#ifexpr:{{{1|}}}<0|<span style="color:#d44;">&minus;{{#expr:-{{{1}}}}}</span>|{{{1}}}}}}}</includeonly></onlyinclude>
{{Documentation}}
{{Documentation}}
[[Category:General Templates]]
[[Category:General Templates]]

Latest revision as of 18:54, 6 February 2024

Description

This template formats any input number as a bonus/malus. Positive numbers are highlighted in green and receive a preceding plus sign, while negative numbers are highlighted in red. Zeros are ouputted in standard color without any sign.

Usage

{{Difference|<number>}}

Note that this template only supports numbers. Any non-numeric input will result in an error message.


View/Edit documentation page