4,977
edits
m
no edit summary
Llamageddon (talk | contribs) mNo edit summary |
Llamageddon (talk | contribs) mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
{{#lvardef: size | {{{6 |}}} }} | {{#lvardef: size | {{{6 |}}} }} | ||
{{#lvardef: cols | {{#switch: {{#lvar:rrty}} | {{#lvardef: cols | {{#switch: {{#lvar:rrty}} | ||
| common = #48484899 | | c | common = #48484899 | ||
| uncommon | | uncommon | u = #01BD3999 | ||
| u = #01BD3999 | | rare | r = #01BFFF99 | ||
| rare | | veryrare | v = #D1017B99 | ||
| r = #01BFFF99 | | legendary | l = #B7861D99 | ||
| veryrare | | story | s = #FF590199 | ||
| v = #D1017B99 | |||
| legendary | |||
| l = #B7861D99 | |||
| story | |||
| s = #FF590199 | |||
| #48484899 }} }} | | #48484899 }} }} | ||
{{#lvardef: scol | {{#switch: {{#lvar:rrty}} | {{#lvardef: scol | {{#switch: {{#lvar:rrty}} | ||
| | | common | c = common | ||
| uncommon | u = uncommon | |||
| rare | r = rare | |||
| veryrare | very rare | v = veryrare | |||
| legendary | l = legendary | |||
| | | story | s = story | ||
| uncommon = uncommon | |||
| rare = rare | |||
| veryrare = veryrare | |||
| legendary = legendary | |||
| story = story | |||
| common }} }} | | common }} }} | ||
{{#lvardef: sufx | {{#switch: {{#lvar:file}} | {{#lvardef: sufx | {{#switch: {{#lvar:file}} | ||
Line 40: | Line 30: | ||
| Item Icon.png }} }} | | Item Icon.png }} }} | ||
{{#lvardef: pixl | {{#switch: {{#lvar:size}} | {{#lvardef: pixl | {{#switch: {{#lvar:size}} | ||
| large = 380px | | large = 380px | medium = 144px | small = 40px | inline = 25px | ||
| medium = 144px | |||
| small = 40px | |||
| inline = 25px | |||
| 25px }} }} | | 25px }} }} | ||
{{#lvardef: spna | | {{#lvardef: spna | <span | ||
<span | |||
style="display: inline-block; | style="display: inline-block; | ||
vertical-align: middle; | vertical-align: middle; | ||
height: {{#lvar:pixl}}; | height: {{#lvar:pixl}}; | ||
width: {{#lvar:pixl}}; | width: {{#lvar:pixl}}; | ||
overflow: hidden; | overflow: hidden; | ||
border: 1px solid {{#lvar:cols}} | border: 1px solid {{#lvar:cols}}" | ||
" | class="bg3wiki-rarity-gradient-{{#lvar:scol}} | ||
}} | "> | ||
{{#lvar:spna}} {{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}} {{#lvar:sufx}}|{{#lvar:pixl}}]]</span> | [[File:{{#lvar:item}} {{#lvar:sufx}}|{{#lvar:pixl}}|{{#Ifeq: {{#lvar:link}} | item | link={{#lvar:item}} | link={{#lvar:link}}}}]]</span> <span>{{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] | {{#Ifeq: {{#lvar:text}} | notext | | [[{{#lvar:link}}|{{#lvar:text}}]]}}}}</span>}}</includeonly><noinclude>__NOTOC__ | }}{{#lvar:spna}}{{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}} {{#lvar:sufx}} | {{#lvar:pixl}}]]</span>| [[File:{{#lvar:item}} {{#lvar:sufx}} | {{#lvar:pixl}} |{{#Ifeq: {{#lvar:link}} | item | link={{#lvar:item}} | link={{#lvar:link}}}}]]</span> <span>{{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] |{{#Ifeq: {{#lvar:text}} | notext | | [[{{#lvar:link}} | {{#lvar:text}}]]}}}}</span>}}}}</includeonly><noinclude>__NOTOC__ | ||
This is a template for colouring icon borders depending on the value of a 'rarity' variable. The icon size is set to the standard {{C|25px}} maximum height for inline use by default. {{C|_Item_Icon.png}} is set as the default image type. | This is a template for colouring icon borders depending on the value of a 'rarity' variable. The icon size is set to the standard {{C|25px}} maximum height for inline use by default. {{C|_Item_Icon.png}} is set as the default image type. | ||
Line 63: | Line 48: | ||
== Examples == | == Examples == | ||
*Only first parameter defined. | |||
{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace}}</nowiki>}} | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace}}</nowiki>}} | ||
Test{{User:Llamageddon/RrtyItem|Mace}} | |||
*Using shortcuts for rarity and image type, and {{InfoBlob|item}} keyword in 4th to copy item name as text link. | |||
{{C|<nowiki>{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}</nowiki>}} | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}</nowiki>}} | ||
Test2 {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | |||
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | |||
*Unrecognised value in 3rd. Link and link text in 4th and 5th. | |||
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}}</nowiki>}} | |||
{{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}} | {{User:Llamageddon/RrtyItem|Mace|v|x|List of Weapons#Very Rare|A very rare mace.}} | ||
{{ | *Using a tooltip (large "faded") image. Shortcuts in 2nd and 3rd, custom link in 4th, keyword {{InfoBlob|notext}} in 5th, and {{InfoBlob|small}} in 6th. | ||
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}}</nowiki>}} | |||
{{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}} | {{User:Llamageddon/RrtyItem|Longsword|u|tt|List of Weapons#Uncommon|notext|small}} | ||
*Blank image type. | |||
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}</nowiki>}} | |||
{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}} | {{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}} | ||
*Larger than native icon resolution defined. | |||
:{{C|<nowiki>{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}}</nowiki>}} | |||
{{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}} | {{User:Llamageddon/RrtyItem|Warhammer|legendary||||medium}} | ||
*Missing page/icon links and unrecognised or invalid values. | |||
Missing | :{{C|<nowiki>{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}} | {{User:Llamageddon/RrtyItem|Missing Link|Link Missing|Missing Link|Link Missing|Missing Link|Link Missing}} | ||
Line 148: | Line 132: | ||
=== Testing === | === Testing === | ||
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} Test | ||
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}}Testytest | ||
{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ||
*{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | *{{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ||
* {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ** {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ||
* {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ** {{User:Llamageddon/RrtyItem|Armour of Uninhibited Kushigo|s|tt|item}} | ||
</noinclude> | </noinclude> |