Template:Affinity: Difference between revisions

Support SS affinity
(Added some documentation and examples)
(Support SS affinity)
 
(4 intermediate revisions by 2 users not shown)
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}}.
 
For unknown Values, it will be shown like {{Affinity|U}}.
 
<templatedata>
Line 6 ⟶ 8:
"1": {
"label": "Affinity",
"description": "The affinity value (ss,s,a,b,c,d; sss for best, d for worst)",
"example": "a",
"type": "string",
Line 13 ⟶ 15:
},
"2": {
"label": "Additional properties for the imageSize",
"description": "Defines additional properties for the image. Can be used to set the stylesize of the imageicon",
"example": "class=\"right-float\"40px",
"type": "unbalanced-wikitextstring",
"default": "20px"
},
"valign": {
"label": "Vertical alignment",
"description": "Defines the vertical alignment of the image",
"example": "top",
"type": "string",
"default": "middle"
}
},