Template:PI/doc: Difference between revisions

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>