Difference between revisions of "Template:Good"
(Created page with "<includeonly><!-- --><span style="color:forestgreen; <!-- -->{{#switch: {{{2}}} | #default = font-weight:bold | n = font-weight:normal | normal = font-weight:normal | b = font...") |
|||
Line 8: | Line 8: | ||
| bold = font-weight:bold | | bold = font-weight:bold | ||
}}"><!-- | }}"><!-- | ||
− | -->{{#if:{{{noFormat}}}|{{{1}}}|{{#replace:{{#ifeq:{{#pos:{{{1}}}|x}}|0|×{{#explode:{{{1}}}|x|1|1}}|{{{1}}}}}|-|−}}<!-- | + | -->{{#if:{{{noFormat}}}|{{{1}}}|{{#replace:{{#ifeq:{{#pos:{{{1}}}|x}}|0|×{{#explode:{{{1}}}|x|1|1}}|{{{1}}}}}|-|−}}}}<!-- |
--></span><nowiki /></includeonly><noinclude>{{documentation}}</noinclude> | --></span><nowiki /></includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 10:34, 8 November 2022
Because the effects of stats, effects, and other changes can be somewhat obscure, beneficial and detrimental effects on this wiki are displayed as green and red respectively. When dealing with number additions and subtractions, Template:+, Template:++, Template:--, and Template:--- are useful, however, they add a symbol before the text which isn't always appropriate. This template, along side Template:Bad, add the option to format text similarly without the symbol.
For ease of use, it also formats any "-" and "x" into "−" and "×" respectively. This can be suppressed by the noFormat argument.
Example
{{Good|Good thing}}
produces: Good thing as a result.
{{Good|x5}}
produces: x5 as a result.
{{Good|-5}}
produces: -5 as a result.
{{Good|x5|noFormat=1}}
produces: x5 as a result.
{{Good|-5|noFormat=1}}
produces: -5 as a result.
{{Good|5x5}}
produces: 5x5 as a result.
{{Good|5x5|noFormat=1}}
produces: 5x5 as a result.
{{Good|5-5}}
produces: 5-5 as a result.
{{Good|5-5|noFormat=1}}
produces: 5-5 as a result.
See Also
The above documentation is transcluded from Template:Good/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |