Difference between revisions of "Template:Transient icon"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(Created page with "<includeonly>{{#ifeq:{{{frame|n}}}|y| {{#ask:{{#if:{{{subobject|}}}| [[{{{subobject}}}]] | Has game context::Companion [[Has lowercase English name::{{lc:{{{1|}}}}}]]...")
 
(if no result, display {{{1|Unknown}}} by default instead of simply Unknown)
Line 33: Line 33:
| large = <span style="position:relative; display: inline-block; width:116px; height:116px; vertical-align: middle;"><span style="position:absolute; left: 8px; top: 8px;">[[File:Unknown icon.png|link={{{link|}}}]]</span><span style="position:absolute; width:116px; height:116px;">[[File:Icon frame rarity 0.png|116x116px|link={{{link|}}}]]</span><span style="position:absolute; top: 6px; left: 6px;">[[File:None element icon.png|29x29px|link={{{link|}}}]]</span><span style="position:absolute; top: 6px; left: 6px;">[[File:None weapon icon.png|29x29px|link={{{link|}}}]]</span></span>
| large = <span style="position:relative; display: inline-block; width:116px; height:116px; vertical-align: middle;"><span style="position:absolute; left: 8px; top: 8px;">[[File:Unknown icon.png|link={{{link|}}}]]</span><span style="position:absolute; width:116px; height:116px;">[[File:Icon frame rarity 0.png|116x116px|link={{{link|}}}]]</span><span style="position:absolute; top: 6px; left: 6px;">[[File:None element icon.png|29x29px|link={{{link|}}}]]</span><span style="position:absolute; top: 6px; left: 6px;">[[File:None weapon icon.png|29x29px|link={{{link|}}}]]</span></span>
| small
| small
|#default = <span style="position: relative; display: inline-block; width: 20px; height: 20px; vertical-align: middle;"><span style="position: absolute;">[[File:None element icon.png|20x20px|link={{{link|}}}]]</span><span style="position:absolute; top: 0px; left: 0px;">[[File:None weapon icon.png|20x20px|link={{{link|}}}]]</span></span>[[File:Unknown icon.png|20x20px|link={{{link|}}}]] {{#if: {{{link|}}} | [[{{{link}}}|Unknown]] | Unknown}}
|#default = <span style="position: relative; display: inline-block; width: 20px; height: 20px; vertical-align: middle;"><span style="position: absolute;">[[File:None element icon.png|20x20px|link={{{link|}}}]]</span><span style="position:absolute; top: 0px; left: 0px;">[[File:None weapon icon.png|20x20px|link={{{link|}}}]]</span></span>[[File:Unknown icon.png|20x20px|link={{{link|}}}]] {{#if: {{{link|}}} | [[{{{link}}}|{{{1|Unknown}}}]] | {{{1|Unknown}}} }}
}}<!-- end switch -->
}}<!-- end switch -->
}}<!-- end ask (with frame) -->
}}<!-- end ask (with frame) -->

Revision as of 03:30, 12 April 2017

Description

This template displays a link to a companion together with its icon. If multiple companions would fit the search criteria, only the one with the lowest rarity of the standard variant is displayed.

Usage

{{Companion icon
|<en companion name>
| rarity = 
| variant = 
| link = 
| subobject = 
}}

Parameters

en companion name
Required. Name of the companion
rarity
Filter result by the rarity of the companion.
variant
Filter result by the variant of the companion.
frame
Set to y to also display a frame with rarity, element and weapon type of the companion, n to only display the icon. Defaults to n.
size
Set to small, medium or large to change the size of the icon. When set to small, also displays the companion's English name. Defaults to small.
link
Page that the icon should link to. Defaults to the page of the companion.
subobject
Subobject of the companion. Can be used by other templates to directly display the correct companion. Do not use this parameter manually.

Examples

{{Companion icon|Moritaka}}

Unknown icon.png Unknown

{{Companion icon|Moritaka|size=large}}

Unknown icon.png

{{Companion icon|Moritaka|size=medium|frame=y}}

Unknown icon.pngIcon frame rarity 0.png14x14pxNone weapon icon.png

{{Companion icon|Moritaka|rarity=4}}

Unknown icon.png Unknown

{{Companion icon|Moritaka|variant=Valentine|frame=y}}

20x20pxNone weapon icon.pngUnknown icon.png Moritaka