User:Llamageddon/RrtyItem: Difference between revisions
Llamageddon (talk | contribs) mNo edit summary |
Llamageddon (talk | contribs) mNo edit summary |
||
Line 4: | Line 4: | ||
{{#lvardef: file | {{{3 |}}} }} | {{#lvardef: file | {{{3 |}}} }} | ||
{{#lvardef: link | {{{4 |}}} }} | {{#lvardef: link | {{{4 |}}} }} | ||
{{#lvardef: text | {{{5 | {{{4}}} }}} }} | {{#lvardef: text | {{{5 | {{{4 |}}} }}} }} | ||
{{#lvardef: size | {{ | {{#lvardef: size | {{{6 |}}} }} | ||
{{#lvardef: cols | {{#switch: {{#lvar:rrty}} | {{#lvardef: cols | {{#switch: {{#lvar:rrty}} | ||
| common = #1B1A1999 | | common = #1B1A1999 | ||
Line 27: | Line 27: | ||
| unfaded = Item Image.png | | unfaded = Item Image.png | ||
| Item Icon.png }} }} | | Item Icon.png }} }} | ||
{{#lvardef: size | 40px }} | {{#lvardef: pixl | {{#switch: {{#lvar:size}} | ||
{{#lvardef: spna | <span style="display: inline-block; box-shadow: rgba(0, 0, 0, 0.14) 3px 3px 6px 0px inset, rgba(0, 0, 0, 0.14) -3px -3px 6px 1px inset; background: #1B1A19 | | large = 380px | ||
}}{{#lvar:spna}}{{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}} {{#lvar:sufx}}|{{#lvar: | | medium = 144px | ||
| small = 40px | |||
| inline = 25px | |||
| 25px }} }} | |||
{{#lvardef: spna | <span style="display: inline-block; box-shadow: rgba(0, 0, 0, 0.14) 3px 3px 6px 0px inset, rgba(0, 0, 0, 0.14) -3px -3px 6px 1px inset; background: #1B1A19; vertical-align: middle; height: {{#lvar:pixl}}; width: {{#lvar:pixl}}; overflow: hidden; border-radius: 5px; border: 2px solid {{#lvar:cols}};">}} | |||
}}{{#lvar:spna}}{{#Ifeq: {{#lvar:link}} | | [[File:{{#lvar:item}} {{#lvar:sufx}}|{{#lvar:pixl}}]] | [[File:{{#lvar:item}} {{#lvar:sufx}}|{{#lvar:pixl}}| link={{#lvar:link}}]]</span> {{#Ifeq: {{#lvar:link}} | item | [[{{#lvar:item}}]] | [[{{#lvar:link}}|{{#lvar:text}}]]}} }}</includeonly><noinclude>__NOTOC__ | |||
This is a proof of concept 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. | This is a proof of concept 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. | ||
Line 52: | Line 57: | ||
{{C|<nowiki>{{User:Llamageddon/RrtyItem|Longsword|uncommon| | {{C|<nowiki>{{User:Llamageddon/RrtyItem|Longsword|uncommon|tt|List_of_Weapons#Uncommon|Weapons|medium}}</nowiki>}} Using a tooltip (large "faded") image. | ||
{{User:Llamageddon/RrtyItem|Longsword|uncommon|tt|List_of_Weapons#Uncommon| | {{User:Llamageddon/RrtyItem|Longsword|uncommon|tt|List_of_Weapons#Uncommon|Weapons|medium}} | ||
Line 72: | Line 77: | ||
{{C|<nowiki>{{User:Llamageddon/RrtyItem|Stuffed Bear A|story|tooltip}}</nowiki>}} | {{C|<nowiki>{{User:Llamageddon/RrtyItem|Stuffed Bear A|story|tooltip|||small}}</nowiki>}} | ||
{{User:Llamageddon/RrtyItem|Stuffed Bear A|story|tooltip}} | {{User:Llamageddon/RrtyItem|Stuffed Bear A|story|tooltip|||small}} | ||
Revision as of 08:03, 7 September 2023
This is a proof of concept template for colouring icon borders depending on the value of a 'rarity' variable. The icon size is set to the standard 25px
maximum height for inline use.
The rarity is defined by the second paramater: common, uncommon, rare, veryrare, legendary, or story. If left blank, it will default to dark grey (common) for the border.
Examples
{{User:Llamageddon/RrtyItem}}
Only first parameter defined.
{{User:Llamageddon/RrtyItem|Mace|x|x|Mace|A normal Mace.}}
Unrecognised values in 2nd & 3rd.
{{User:Llamageddon/RrtyItem|Mace|x|x|List_of_Weapons#Common|A common mace.}}
Link text changed.
{{User:Llamageddon/RrtyItem|Longsword|uncommon|tt|List_of_Weapons#Uncommon|Weapons|medium}}
Using a tooltip (large "faded") image.
{{User:Llamageddon/RrtyItem|Longbow|rare||Longbows}}
{{User:Llamageddon/RrtyItem|Club|veryrare|tt|item}}
Using tt and item keywords in 3rd & 4th parameters.
{{User:Llamageddon/RrtyItem|Warhammer|legendary}}
{{User:Llamageddon/RrtyItem|Stuffed Bear A|story|tooltip|||small}}
{{User:Llamageddon/RrtyItem}}
Missing page/icon links.