Difference between revisions of "Template:Datum"
Jump to navigation
Jump to search
(less horizontal padding) |
Sideriver81 (talk | contribs) (Change dark green color.) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
>{{{1}}}</div | >{{{1}}}</div | ||
><div style="display:inline-block; width: 50%" | ><div style="display:inline-block; width: 50%" | ||
− | >{{{2}}}</div | + | >{{#ifeq:{{{2|}}}|{{{3|}}}|<span style="color:#005900;">{{{2}}}</span>|{{{2}}} }}</div |
></div | ></div | ||
></includeonly><noinclude> | ></includeonly><noinclude> | ||
Utility template for making a line-item in a [[Template:Databox]]. | Utility template for making a line-item in a [[Template:Databox]]. | ||
− | == | + | |
− | + | First argument is the left-hand side label. Second argument is the right-hand side value. Third argument is the default value. If the value is equal to its default, it will be shown in dark green. | |
+ | == Example == | ||
{{Databox|content= | {{Databox|content= | ||
{{Datum|Rating|6}} | {{Datum|Rating|6}} | ||
+ | {{Datum|Rating|0|0}} | ||
}} | }} | ||
− | < | + | <nowiki> |
− | |||
{{Databox|content= | {{Databox|content= | ||
{{Datum|Rating|6}} | {{Datum|Rating|6}} | ||
+ | {{Datum|Rating|0|0}} | ||
}} | }} | ||
+ | </nowiki> | ||
+ | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 02:43, 4 January 2020
Utility template for making a line-item in a Template:Databox.
First argument is the left-hand side label. Second argument is the right-hand side value. Third argument is the default value. If the value is equal to its default, it will be shown in dark green.
Example
/Data/
Rating
6
Rating
0
X
{{Databox|content= {{Datum|Rating|6}} {{Datum|Rating|0|0}} }}