Template:Approval: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(Updated documentation) |
||
(13 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{trim| | <includeonly>{{trim| | ||
{{# | {{#lvardef: direction | {{#sub:{{{2|+}}}|0|1}} }} | ||
{{# | {{#lvardef: min-w | {{#if: {{{size|}}} | {{{size|}}} | 26}} }} | ||
{{#lvardef: max-h | {{#if: {{{size|}}} | {{{size|}}} | 26}} }} | |||
{{# | }}<span style="display: inline-flex; align-items: center;"><span style="display: inline-flex; align-items: center; justify-content: center; min-width: {{#lvar:min-w}}px; height: {{#lvar:max-h}}px;">{{icon | {{{1}}} Approval.png | link = {{{1}}} | caption = {{{1}}} {{#switch:{{#lvar:direction}} |+= approves|-= disapproves}} | h = {{#lvar:max-h}}}}</span> {{Color|{{#switch:{{#lvar:direction}} |+= #3b8f1f |-= #cc3f49}} | {{{2|+}}} }}</span></includeonly><noinclude>{{documentation|content= | ||
Use this template to display approval changes. A custom size can be added, but generally you should stick with the default (26). | |||
}}<span style="display: inline-flex; align-items: center;"><span style="display: inline-flex; align-items: center; justify-content: center; min-width: {{# | |||
Use this template | |||
{{ | == Examples == | ||
{{Template demo | |||
| <nowiki>{{Approval|Wyll|+1}}</nowiki> | |||
| <nowiki>{{Approval|Halsin|+5|size=50}}</nowiki> | |||
| <nowiki>{{Approval|Jaheira|+}}</nowiki> | |||
| <nowiki>{{Approval|Lae'zel|-1}}</nowiki> | |||
| <nowiki>{{Approval|Astarion|+1}} {{Approval|Gale|+1}} {{Approval|Karlach|+1}} {{Approval|Laezel|+1}}</nowiki> | |||
}} | |||
== Template data == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"description": "NPC for whom the approval is for", | |||
"example": "Wyll", | |||
"suggestedvalues": [ | |||
"Astarion", | |||
"Jaheira", | |||
"Minsc", | |||
"Minthara", | |||
"Gale", | |||
"Halsin", | |||
"Wyll", | |||
"Shadowheart", | |||
"Karlach", | |||
"Laezel" | |||
], | |||
"type": "string", | |||
"required": true | |||
}, | |||
"2": { | |||
"description": "Approval Adjustment", | |||
"example": "+1", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"size": { | |||
"description": "Add a custom size for the icon.", | |||
"type": "number", | |||
"example": "26" | |||
} | |||
} | |||
} | |||
</templatedata>}} | |||
[[Category:Templates]] | |||
</noinclude> |
Latest revision as of 05:31, 20 July 2024
Template documentation
Use this template to display approval changes. A custom size can be added, but generally you should stick with the default (26).
Examples
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | NPC for whom the approval is for
| String | required |
2 | 2 | Approval Adjustment
| String | required |
size | size | Add a custom size for the icon.
| Number | optional |