Template:PI/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
LVL (talk | contribs)
Created page with "This template displays a Boon scaling indicator next to a value. ==Usage== <pre>{{PI|value}}</pre> <pre>{{PI|value|font_size}}</pre> <pre>{{PI|value|compact=yes}}</pre> ==Parameters== {| class="wikitable" ! Parameter !! Description !! Default |- | 1 || The scaling value || (empty) |- | 2 || Font size || 14px |- | compact || Set to <code>yes</code> for icon-only mode with a tooltip on hover || (empty) |} ==Examples== <pre>123{{PI|12345}}m</pre> Outputs: 123{{PI|12345}}..."
 
LVL (talk | contribs)
Added TS template and templatedata
 
Line 1: Line 1:
{{TS}}
This template displays a Boon scaling indicator next to a value.
This template displays a Boon scaling indicator next to a value.


Line 5: Line 6:
<pre>{{PI|value|font_size}}</pre>
<pre>{{PI|value|font_size}}</pre>
<pre>{{PI|value|compact=yes}}</pre>
<pre>{{PI|value|compact=yes}}</pre>
==Parameters==
{| class="wikitable"
! Parameter !! Description !! Default
|-
| 1 || The scaling value || (empty)
|-
| 2 || Font size || 14px
|-
| compact || Set to <code>yes</code> for icon-only mode with a tooltip on hover || (empty)
|}


==Examples==
==Examples==
Line 26: Line 16:
<pre>{{PI|1.5|compact=yes}}</pre>
<pre>{{PI|1.5|compact=yes}}</pre>
Outputs: {{PI|1.5|compact=yes}}
Outputs: {{PI|1.5|compact=yes}}
<templatedata>
{
  "description": "Displays a Boon scaling indicator next to a value.",
  "params": {
    "1": {
      "label": "Scaling value",
      "description": "The Boon scaling value to display.",
      "type": "number",
      "required": true
    },
    "2": {
      "label": "Font size",
      "description": "Font size of the scaling text.",
      "type": "string",
      "default": "14px",
      "required": false
    },
    "compact": {
      "label": "Compact mode",
      "description": "Set to 'yes' to show only the icon with a tooltip on hover instead of the full indicator.",
      "type": "string",
      "required": false
    }
  },
  "format": "inline"
}
</templatedata>

Latest revision as of 20:38, 11 April 2026

CSS3 logo.svg
This template uses CSS found at PI/styles.css.

This template displays a Boon scaling indicator next to a value.

{{PI|value}}
{{PI|value|font_size}}
{{PI|value|compact=yes}}

Examples

[edit source]
123{{PI|12345}}m

Outputs: 123+12345m

123{{PI|12345|12px}}m

Outputs: 123+12345m

{{PI|1.5|compact=yes}}

Outputs:

Displays a Boon scaling indicator next to a value.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Scaling value1

The Boon scaling value to display.

Numberrequired
Font size2

Font size of the scaling text.

Default
14px
Stringoptional
Compact modecompact

Set to 'yes' to show only the icon with a tooltip on hover instead of the full indicator.

Stringoptional