Template:Affinity: Difference between revisions
LeTrashman (talk | contribs) No edit summary |
(Support SS affinity) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{#pos:ssabcd|{{lc:{{{1|}}}}}}}|[[File:Icon_mood_{{lc:{{{1|}}}}}.png|{{#if:{{{2|}}}|{{{2|}}}|20px}}|{{{valign|middle}}}|class=affinity-icon|frameless|link=Affinity|alt={{uc:{{{1|}}}}}|{{uc:{{{1|}}}}} grade affinity]]|<span title="Unknown affinity">?</span>}}</includeonly><noinclude>Call it like <code><nowiki>{{Affinity|a}}</nowiki></code> to show an affinity like {{Affinity|a}}. |
|||
<includeonly> |
|||
{{#switch: {{lc: {{{1|}}}}} |
|||
For unknown Values, it will be shown like {{Affinity|U}}. |
|||
| s = [[File:Icon_mood_s.png|{{#if: {{{2|}}} | {{{2|}}} | 20px}}|link=|S]] |
|||
| a = [[File:Icon_mood_a.png|{{#if: {{{2|}}} | {{{2|}}} | 20px}}|link=|A]] |
|||
<templatedata> |
|||
| b = [[File:Icon_mood_b.png|{{#if: {{{2|}}} | {{{2|}}} | 20px}}|link=|B]] |
|||
{ |
|||
| c = [[File:Icon_mood_c.png|{{#if: {{{2|}}} | {{{2|}}} | 20px}}|link=|C]] |
|||
"params": { |
|||
| d = [[File:Icon_mood_d.png|{{#if: {{{2|}}} | {{{2|}}} | 20px}}|link=|D]] |
|||
"1": { |
|||
| |
|||
"label": "Affinity", |
|||
⚫ | |||
"description": "The affinity value (ss,s,a,b,c,d; ss for best, d for worst)", |
|||
</includeonly> |
|||
"example": "a", |
|||
"type": "string", |
|||
"required": true, |
|||
"suggested": true |
|||
}, |
|||
"2": { |
|||
"label": "Size", |
|||
"description": "Defines the size of the icon", |
|||
"example": "40px", |
|||
"type": "string", |
|||
"default": "20px" |
|||
}, |
|||
"valign": { |
|||
"label": "Vertical alignment", |
|||
"description": "Defines the vertical alignment of the image", |
|||
"example": "top", |
|||
"type": "string", |
|||
"default": "middle" |
|||
} |
|||
}, |
|||
"description": "Creates a smiley symbol indicating the affinity of an attribute.", |
|||
"format": "inline" |
|||
⚫ | |||
</templatedata></noinclude> |
Latest revision as of 03:06, 25 August 2021
Call it like {{Affinity|a}}
to show an affinity like .
For unknown Values, it will be shown like ?.
Creates a smiley symbol indicating the affinity of an attribute.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Affinity | 1 | The affinity value (ss,s,a,b,c,d; ss for best, d for worst)
| String | required |
Size | 2 | Defines the size of the icon
| String | optional |
Vertical alignment | valign | Defines the vertical alignment of the image
| String | optional |