Template:Property: Difference between revisions

From HorizonXI Wiki
(replaced hard coded font colors with color tempate which uses css classes. this caused the level 2 and level 3 chains to be darker because they had custom color values. Will evaluate how to deal with it.)
(added optional icon in front; removed crystal; made documentation clearer; made input parameter case insensitive; links to page with redirect instead of category page; warning as fallback for false input instead of bold text)
Line 1: Line 1:
<includeonly><onlyinclude>{{#switch:{{{1|}}}
<includeonly><onlyinclude>{{#switch:{{lc:{{{1|}}}}}
| Crystal = [[Dark Crystal|<span class="dark-elemental-text">Dark Crystal</span>]]
| transfixion = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Transfixion-Icon.gif]]|}}[[Transfixion|{{Color|light|Trans&shy;fixion}}]]
 
| compression = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Compression-Icon.gif]]|}}[[Compression|{{Color|dark|Com&shy;pres&shy;sion}}]]
| Transfixion = [[:Category:Transfixion|{{Color|light|Trans&shy;fixion}}]]
| liquefaction = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Liquefaction-Icon.gif]]|}}[[Liquefaction|{{Color|fire|Li&shy;que&shy;fac&shy;tion}}]]
| Compression = [[:Category:Compression|{{Color|dark|Com&shy;pres&shy;sion}}]]
| scission = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Scission-Icon.gif]]|}}[[Scission|{{Color|earth|Scis&shy;sion}}]]
| Liquefaction = [[:Category:Liquefaction|{{Color|fire|Li&shy;que&shy;fac&shy;tion}}]]
| reverberation = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Reverberation-Icon.gif]]|}}[[Reverberation|{{Color|water|Rever&shy;be&shy;ra&shy;tion}}]]
| Scission = [[:Category:Scission|{{Color|earth|Scis&shy;sion}}]]
| detonation = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Detonation-Icon.gif]]|}}[[Detonation|{{Color|wind|De&shy;to&shy;na&shy;tion}}]]
| Reverberation = [[:Category:Reverberation|{{Color|water|Rever&shy;be&shy;ra&shy;tion}}]]
| induration = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Induration-Icon.gif]]|}}[[Induration|{{Color|ice|In&shy;du&shy;ra&shy;tion}}]]
| Detonation = [[:Category:Detonation|{{Color|wind|De&shy;to&shy;na&shy;tion}}]]
| impaction = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Impaction-Icon.gif]]|}}[[Impaction|{{Color|lightning|Im&shy;pac&shy;tion}}]]
| Induration = [[:Category:Induration|{{Color|ice|In&shy;du&shy;ra&shy;tion}}]]
| gravitation = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Gravitation-Icon.gif]]|}}[[Gravitation|{{Color|dark|Gra&shy;vi&shy;}}{{Color|earth|ta&shy;tion}}]]
| Impaction = [[:Category:Impaction|{{Color|lightning|Im&shy;pac&shy;tion}}]]
| distortion = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Distortion-Icon.gif]]|}}[[Distortion|{{Color|water|Dis&shy;to}}{{Color|ice|r&shy;tion}}]]
| Gravitation = [[:Category:Gravitation|{{Color|dark|Gra&shy;vi&shy;}}{{Color|earth|ta&shy;tion}}]]
| fusion = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Fusion-Icon.gif]]|}}[[Fusion|{{Color|light|Fu&shy;s}}{{Color|fire|ion}}]]
| Distortion = [[:Category:Distortion|{{Color|water|Dis&shy;to}}{{Color|ice|r&shy;tion}}]]
| fragmentation = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Fragmentation-Icon.gif]]|}}[[Fragmentation|{{Color|lightning|Frag&shy;me}}{{Color|wind|n&shy;ta&shy;tion}}]]
| Fusion = [[:Category:Fusion|{{Color|light|Fu&shy;s}}{{Color|fire|ion}}]]
| light = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Light-Icon.gif]]|}}[[Light_(Skillchain)|{{Color|fire|Li}}{{Color|wind|g}}{{Color|lightning|h}}{{Color|light|t}}]]
| Fragmentation = [[:Category:Fragmentation|{{Color|lightning|Frag&shy;me}}{{Color|wind|n&shy;ta&shy;tion}}]]
| darkness = {{#ifeq:{{lc:{{{2|}}}}}|icon|[[File:Dark-Icon.gif]]|}}[[Darkness|{{Color|ice|Da}}{{Color|water|rk&shy;}}{{Color|earth|ne}}{{Color|dark|ss}}]]
| Light = [[:Category:Light_(Skillchain)|{{Color|fire|Li}}{{Color|wind|g}}{{Color|lightning|h}}{{Color|light|t}}]]
| Darkness = [[:Category:Darkness|{{Color|ice|Da}}{{Color|water|rk&shy;}}{{Color|earth|ne}}{{Color|dark|ss}}]]
<!-- old colors for level 2 and 3 deviated from level 1. also transfixion: #999999 and compression: #696969 -->
<!-- old colors for level 2 and 3 deviated from level 1. also transfixion: #999999 and compression: #696969 -->
<!--
<!--
Line 26: Line 24:
-->
-->
| null =  
| null =  
| #default = '''{{{1|Property}}}'''
| #default = <span style="color: red">-Skillchain Property not recognized-</span>
}}</onlyinclude></includeonly><noinclude>[[Category:Templates|{{PAGENAME}}]]
}}</onlyinclude></includeonly><noinclude>[[Category:Templates|{{PAGENAME}}]]
==Usage==
==Usage==
<pre>
<pre>
{{Property|text}}
{{Property|text|icon}}
</pre>
</pre>
*Displays {{Property|Transfixion}} if "Transfixion" is defined.
*Displays {{Property|Compression}} if "Compression" is defined.
*Displays {{Property|Liquefaction}} if "Liquefaction" is defined.
*Displays {{Property|Scission}} if "Scission" is defined.
*Displays {{Property|Reverberation}} if "Reverberation" is defined.
*Displays {{Property|Detonation}} if "Detonation" is defined.
*Displays {{Property|Induration}} if "Induration" is defined.
*Displays {{Property|Impaction}} if "Impaction" is defined.


*Displays {{Property|Gravitation}} if "Gravitation" is defined.
* '''Note:''' Use '''without''' the second parameter to display the text without the icon in front.  
*Displays {{Property|Distortion}} if "Distortion " is defined.
*Displays {{Property|Fusion}} if "Fusion" is defined.
*Displays {{Property|Fragmentation}} if "Fragmentation" is defined.


*Displays {{Property|Light}} if "Light" is defined.
*<nowiki>{{Property|Transfixion|icon}}</nowiki> results in  {{Property|Transfixion|icon}}.
*Displays {{Property|Darkness}} if "Darkness" is defined.
*<nowiki>{{Property|Compression|icon}}</nowiki> results in  {{Property|Compression|icon}}.
*Displays {{Property|null}} if "null" is defined.
*<nowiki>{{Property|Liquefaction|icon}}</nowiki> results in  {{Property|Liquefaction|icon}}.
*Displays {{Property|-}} if anything else is defined.
*<nowiki>{{Property|Scission|icon}}</nowiki> results in  {{Property|Scission|icon}}.
*<nowiki>{{Property|Reverberation|icon}}</nowiki> results in  {{Property|Reverberation|icon}}.
*<nowiki>{{Property|Detonation|icon}}</nowiki> results in  {{Property|Detonation|icon}}.
*<nowiki>{{Property|Induration|icon}}</nowiki> results in  {{Property|Induration|icon}}.
*<nowiki>{{Property|Impaction|icon}}</nowiki> results in  {{Property|Impaction|icon}}.
*<nowiki>{{Property|Gravitation|icon}}</nowiki> results in  {{Property|Gravitation|icon}}.
*<nowiki>{{Property|Distortion|icon}}</nowiki> results in  {{Property|Distortion|icon}}.
*<nowiki>{{Property|Fusion|icon}}</nowiki> results in  {{Property|Fusion|icon}}.
*<nowiki>{{Property|Fragmentation|icon}}</nowiki> results in  {{Property|Fragmentation|icon}}.
*<nowiki>{{Property|Light|icon}}</nowiki> results in  {{Property|Light|icon}}.
*<nowiki>{{Property|Darkness|icon}}</nowiki> results in  {{Property|Darkness|icon}}.
*<nowiki>{{Property|null}}</nowiki> results in  {{Property|null}}.
*<nowiki>{{Property|<anything else>}}</nowiki> results in  {{Property|<anything else>}}.
</noinclude>
</noinclude>

Revision as of 12:51, 22 November 2023

Usage

{{Property|text|icon}}
  • Note: Use without the second parameter to display the text without the icon in front.