Ad placeholder

Template:Approval: Difference between revisions

Jump to navigation Jump to search
Updated documentation
No edit summary
(Updated documentation)
 
Line 3: Line 3:
{{#lvardef: min-w | {{#if: {{{size|}}} | {{{size|}}} | 26}} }}
{{#lvardef: min-w | {{#if: {{{size|}}} | {{{size|}}} | 26}} }}
{{#lvardef: max-h | {{#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>&nbsp;{{Color|{{#switch:{{#lvar:direction}} |+= #3b8f1f |-= #cc3f49}} | {{{2|+}}} }}</span></includeonly><noinclude>[[Category:Templates]]
}}<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>&nbsp;{{Color|{{#switch:{{#lvar:direction}} |+= #3b8f1f |-= #cc3f49}} | {{{2|+}}} }}</span></includeonly><noinclude>{{documentation|content=
Use this template for approval ratings.
Use this template to display approval changes. A custom size can be added, but generally you should stick with the default (26).


{{InfoBlob|<nowiki>{{Approval|Wyll|+1}}</nowiki>}} = {{Approval|Wyll|+1}}
== Examples ==
 
{{Template demo
{{InfoBlob|<nowiki>{{Approval|Halsin|+5}}</nowiki>}} = {{Approval|Halsin|+5}}
| <nowiki>{{Approval|Wyll|+1}}</nowiki>
 
| <nowiki>{{Approval|Halsin|+5|size=50}}</nowiki>
{{InfoBlob|<nowiki>{{Approval|Jaheira|+2}}</nowiki>}} = {{Approval|Jaheira|+2}}
| <nowiki>{{Approval|Jaheira|+}}</nowiki>
 
| <nowiki>{{Approval|Lae'zel|-1}}</nowiki>
{{InfoBlob|<nowiki>{{Approval|Lae'zel|-1}}</nowiki>}} = {{Approval|Lae'zel|-1}}
| <nowiki>{{Approval|Astarion|+1}} {{Approval|Gale|+1}} {{Approval|Karlach|+1}} {{Approval|Laezel|+1}}</nowiki>
 
}}
{{InfoBlob|<nowiki>{{Approval|Astarion|+1}} {{Approval|Gale|+1}} {{Approval|Karlach|+1}} {{Approval|Laezel|+1}} {{Approval|Shadowheart|+1}} {{Approval|Wyll|+1}} {{Approval|Halsin|+1}} {{Approval|Minthara|+1}} {{Approval|Minsc|+1}} {{Approval|Jaheira|+1}}</nowiki>}} = {{Approval|Astarion|+1}} {{Approval|Gale|+1}} {{Approval|Karlach|+1}} {{Approval|Laezel|+1}} {{Approval|Shadowheart|+1}} {{Approval|Wyll|+1}} {{Approval|Halsin|+1}} {{Approval|Minthara|+1}} {{Approval|Minsc|+1}} {{Approval|Jaheira|+1}}
 
If the number is not specified: {{Approval|Shadowheart}}
 
A custom size can also be added (default is 26):
<pre>
* {{Approval|Jaheira|+1|size=75}}
* {{Approval|Jaheira|size=25}}
</pre>
* {{Approval|Jaheira|+1|size=75}}
* {{Approval|Jaheira|size=25}}


== Template data ==
== Template data ==
Line 45: Line 34:
"Laezel"
"Laezel"
],
],
            "type": "string",
"required": true
"required": true
},
},
Line 50: Line 40:
"description": "Approval Adjustment",
"description": "Approval Adjustment",
"example": "+1",
"example": "+1",
            "type": "string",
"required": true
"required": true
},
},
"size": {
"size": {
"description": "Add a custom size for the icon.",
"description": "Add a custom size for the icon.",
            "type": "number",
"example": "26"
"example": "26"
}
}
}
}
}
}
</templatedata>
</templatedata>}}
[[Category:Templates]]
</noinclude>
</noinclude>

Navigation menu