Template:PI/doc: Difference between revisionsGive feedback
Jump to navigation
Jump to search
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}}..." |
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> | ||
==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
This template uses CSS found at PI/styles.css.
This template displays a Boon scaling indicator next to a value.
Usage
[edit source]{{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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Scaling value | 1 | The Boon scaling value to display. | Number | required |
| Font size | 2 | Font size of the scaling text.
| String | optional |
| Compact mode | compact | Set to 'yes' to show only the icon with a tooltip on hover instead of the full indicator. | String | optional |