Template:Skillchain: Difference between revisions
From HorizonXI Wiki
(replaced mediawiki table syntax with html for tooltip use) |
m (fixed scrollbar bug by using a wrapper table instead div) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
if no namespace (e.g. templates, category pages, ...) then categorize unless last argument is nc or no category | if no namespace (e.g. templates, category pages, ...) then categorize unless last argument is nc or no category | ||
-->{{#if:{{NAMESPACE}}||{{#switch:{{lc:{{{3|{{{2|}}}}}}}}|nc|no category=|#default={{#switch:{{lc:{{{1}}}}}|light = [[Category:Light (Skillchain)]]|[[Category:{{ucfirst:{{{1}}}}}]]}}}}}}<!-- | -->{{#if:{{NAMESPACE}}||{{#switch:{{lc:{{{3|{{{2|}}}}}}}}|nc|no category=|#default={{#switch:{{lc:{{{1}}}}}|light = [[Category:Light (Skillchain)]]|[[Category:{{ucfirst:{{{1}}}}}]]}}}}}}<!-- | ||
using a wrapper table because a div causes mediawiki to force unnecessary scrollbars | |||
--> | --> | ||
< | <table style="width: {{#if:{{{width|}}}|{{{width}}}|fit-content}}; overflow: hidden;"><tr><td> | ||
<!-- | <!-- | ||
Line 29: | Line 31: | ||
Level 3 Skillchain Box. Hide box if skillchain doesn't take part in Level 3 | Level 3 Skillchain Box. Hide box if skillchain doesn't take part in Level 3 | ||
--><div style="margin: 4px;"></div> | --><div style="margin: 4px;"></div> | ||
<table | <table style="width: 100%; padding: 4px; border: solid 1px #CC7700; background:#FFEEDD; {{#switch:{{lc:{{{1}}}}} | ||
| light | darkness | fusion | fragmentation | gravitation | distortion = | | light | darkness | fusion | fragmentation | gravitation | distortion = | ||
| #default = display: none; | | #default = display: none; | ||
Line 84: | Line 86: | ||
Level 2 Skillchain Box. Hide box if skillchain doesn't take part in Level 2 | Level 2 Skillchain Box. Hide box if skillchain doesn't take part in Level 2 | ||
--> | --> | ||
<table | <table style="width: 100%; padding: 4px; border: solid 1px #CC7700; background:#FFEEDD; {{#switch:{{lc:{{{1}}}}} | ||
| liquefaction | impaction | distortion | fusion | induration | reverberation | gravitation | fragmentation | detonation | compression | transfixion | scission = | | liquefaction | impaction | distortion | fusion | induration | reverberation | gravitation | fragmentation | detonation | compression | transfixion | scission = | ||
| #default = display:none; | | #default = display:none; | ||
Line 153: | Line 155: | ||
Level 1 Skillchain Box. Hide box if skillchain doesn't take part in Level 1 | Level 1 Skillchain Box. Hide box if skillchain doesn't take part in Level 1 | ||
--> | --> | ||
<table | <table style="width: 100%; padding: 4px; border: solid 1px #CC7700; background:#FFEEDD; {{#switch:{{lc:{{{1}}}}} | ||
| impaction | liquefaction | scission | reverberation | detonation | compression | transfixion | induration = | | impaction | liquefaction | scission | reverberation | detonation | compression | transfixion | induration = | ||
| #default = display:none; | | #default = display:none; | ||
Line 269: | Line 271: | ||
--> | --> | ||
</ | </td></tr></table></onlyinclude></includeonly> | ||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
==Usage== | ==Usage== | ||
Line 306: | Line 308: | ||
| {{Skillchain|Fragmentation|A}} | | {{Skillchain|Fragmentation|A}} | ||
|} | |} | ||
===Usage as Tooltips=== | |||
The template was rewritten in html instead of mediawiki table syntax to allow usage in [[:Template:Tooltip]] like this: | |||
<pre>{{Tooltip|text={{Property|Fragmentation}}|tooltip={{Skillchain|Fragmentation}}}}</pre> | |||
{{Tooltip|text={{Property|Fragmentation}}|tooltip={{Skillchain|Fragmentation}}}} |
Latest revision as of 22:44, 25 November 2023
Usage
{{Skillchain|<skillchain property>|<skillchain priority>}}
- Displays a table of all skillchains that can be produced by opening or closing with the given skillchain property and categorizes the page into the skillchain property's category. The skillchain priority value is optional.
- width: optional value to specify a specific width for the table.
Examples
Code | Result |
---|---|
{{Skillchain|Impaction}} |
|
{{Skillchain|Gravitation}} |
|
{{Skillchain|Light}} |
|
{{Skillchain|Light|width="100%"}} |
|
{{Skillchain|Transfixion|A}} |
|
{{Skillchain|Distortion|A}} |
|
{{Skillchain|Fusion|A}} |
|
{{Skillchain|Fragmentation|A}} |
Usage as Tooltips
The template was rewritten in html instead of mediawiki table syntax to allow usage in Template:Tooltip like this:
{{Tooltip|text={{Property|Fragmentation}}|tooltip={{Skillchain|Fragmentation}}}}Fragmentation