Module:HeroData/nav/doc: Difference between revisions
pre-initial, just saving my work for later |
m typo |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
==get_hero_nav_cards== | ==get_hero_nav_cards== | ||
For [[Template:Hero Navbox]] on [[Heroes]], | For [[Template:Hero Navbox]] on [[Heroes]], individual hero pages like [[Abrams]], and the home page. | ||
===Examples=== | ===Examples=== | ||
< | First with debug_mode on, to help visualize what the output's source looks like. | ||
<pre> | |||
{{#invoke:HeroData/nav|get_hero_nav_cards | |||
|in_herolabs=true | |||
|text_size=11 | |||
|card_size=card_size|88 | |||
|sticker_size=sticker_size|30 | |||
|herolabs_text_size=herolabs_text_size|6 | |||
|debug_mode=true | |||
}}</pre> | |||
{{#invoke:HeroData/nav|get_hero_nav_cards | |||
|in_herolabs=true | |||
|text_size=11 | |||
|card_size=88 | |||
|sticker_size=30 | |||
|herolabs_text_size=6 | |||
|debug_mode=true | |||
}} | |||
=== | Now with debug_mode defaulted to false (off) to see actual visual output. | ||
< | |||
<pre> | |||
{{#invoke:HeroData/nav|get_hero_nav_cards | |||
|in_herolabs=true | |||
|text_size=11 | |||
|card_size=88 | |||
|sticker_size=30 | |||
|herolabs_text_size=6 | |||
}} | |||
</pre> | |||
{{#invoke:HeroData/nav|get_hero_nav_cards | |||
|in_herolabs=true | |||
|text_size=11 | |||
|card_size=88 | |||
|sticker_size=30 | |||
|herolabs_text_size=6 | |||
}} | |||
===Parameters=== | |||
* '''text_size''' - Font size of the hero name | |||
* '''card_size''' - Size of the hero card | |||
* '''sticker_size''' - Size of the Recommended or Hero lab stickers that appear in the top right corner | |||
* '''herolabs_text_size''' - Font size of the 'Hero Labs' text that appears for heroes in Hero Labs | |||
* '''debug_mode''' - (OPTIONAL) Defaults to false. With true, the output is raw wikitext source that isn't processed, allowing to see more clearly what is ran. | |||
'''debug_mode''' is the only optional parameter. All other parameters are required. [[Template:Hero card2]] utilizes this with some default values, see there for suggested values. |
Latest revision as of 20:35, 28 October 2024
Overview[edit source]
Generates hero navigation cards
Functions[edit source]
[edit source]
For Template:Hero Navbox on Heroes, individual hero pages like Abrams, and the home page.
Examples[edit source]
First with debug_mode on, to help visualize what the output's source looks like.
{{#invoke:HeroData/nav|get_hero_nav_cards |in_herolabs=true |text_size=11 |card_size=card_size|88 |sticker_size=sticker_size|30 |herolabs_text_size=herolabs_text_size|6 |debug_mode=true }}
{{Hero card2|name=Calico|link=Calico|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Fathom|link=Fathom|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Holliday|link=Holliday|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Magician|link=Magician|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Trapper|link=Trapper|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Viper|link=Viper|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}} {{Hero card2|name=Wrecker|link=Wrecker|recommended=false|text_size=11|herolabs=true|card_size=88|sticker_size=30|herolabs_text_size=6}}
Now with debug_mode defaulted to false (off) to see actual visual output.
{{#invoke:HeroData/nav|get_hero_nav_cards |in_herolabs=true |text_size=11 |card_size=88 |sticker_size=30 |herolabs_text_size=6 }}
Parameters[edit source]
- text_size - Font size of the hero name
- card_size - Size of the hero card
- sticker_size - Size of the Recommended or Hero lab stickers that appear in the top right corner
- herolabs_text_size - Font size of the 'Hero Labs' text that appears for heroes in Hero Labs
- debug_mode - (OPTIONAL) Defaults to false. With true, the output is raw wikitext source that isn't processed, allowing to see more clearly what is ran.
debug_mode is the only optional parameter. All other parameters are required. Template:Hero card2 utilizes this with some default values, see there for suggested values.