Template:Weight: Difference between revisions
Jump to navigation
Jump to search
(add drop shadow) |
HiddenDragon (talk | contribs) (Added documentation/template demo templates) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{SmallIcon|Weight Icon.png|class=bg3wiki-lightmode-drop-shadow}} Weight: {{{kg}}} | <includeonly>{{SmallIcon|Weight Icon.png|class=bg3wiki-lightmode-drop-shadow}} Weight{{#if: {{{kg|}}} {{{lb|}}} | ||
| {{#if: {{{kg|}}} | |||
<!-- #8239 is non-breaking thin space. And yes, the kg to lb factor in BG3 is exactly 1/2. --> | |||
|<nowiki>:</nowiki> {{{kg}}} kg / {{#expr:{{{kg|}}}*2}} lb | |||
|<nowiki>:</nowiki> {{#expr:{{{lb}}}/2}} kg / {{{lb}}} lb | |||
}} | |||
}}</includeonly><noinclude>{{Documentation|content= | |||
Displays a weight with an icon depending on the input weight. | |||
== Examples == | |||
{{Template demo | |||
| style = table | |||
| <nowiki>{{Weight|kg=0.9}}</nowiki> | |||
| <nowiki>{{Weight|lb=1.8}}</nowiki> | |||
| <nowiki>{{Weight}}</nowiki> | |||
}} | |||
[[Category: | }} | ||
[[Category:Templates]] | |||
</noinclude> | </noinclude> |
Latest revision as of 23:23, 19 January 2025
Template documentation
Displays a weight with an icon depending on the input weight.
Examples
Markup | Renders as |
---|---|
{{Weight|kg=0.9}} | ![]() |
{{Weight|lb=1.8}} | ![]() |
{{Weight}} | ![]() |