Module:HeroData/nav/doc: Difference between revisions
pre-initial, just saving my work for later |
m examples updated |
||
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=== | ||
< | Small | ||
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. |
Revision as of 20:28, 28 October 2024
Overview
Generates hero navigation cards
Functions
For Template:Hero Navbox on Heroes, individual hero pages like Abrams, and the home page.
Examples
Small 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
- 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.