Editing Module:AbilitySection/docGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
Lua backend for [[Template:AbilitySection]]. Renders a two-column layout with the ability card on the left and an optional tabbed details panel on the right. | Lua backend for [[Template:AbilitySection]]. Renders a two-column layout with the ability card on the left and an optional tabbed details panel on the right. | ||
Only tabs with non-empty content are shown. If two or more tabs have content, a Show All tab is automatically appended that stacks all content in sequence with section headers between them. | Only tabs with non-empty content are shown. If two or more tabs have content, a Show All tab is automatically appended that stacks all content in sequence with section headers between them. | ||
| Line 9: | Line 6: | ||
The Notes tab is height-constrained with a scrollbar when content overflows (see [[Template:AbilitySection/styles.css]]). Other tabs are unconstrained. | The Notes tab is height-constrained with a scrollbar when content overflows (see [[Template:AbilitySection/styles.css]]). Other tabs are unconstrained. | ||
If no content params are provided, no details panel is rendered at all — only the ability card | If no content params are provided, no details panel is rendered at all — only the ability card. | ||
== Entry point == | == Entry point == | ||
=== <code>p.render(frame)</code> === | === <code>p.render(frame)</code> === | ||
Called via <code><nowiki>{{#invoke:AbilitySection|render}}</nowiki></code>. | Called via <code><nowiki>{{#invoke:Vergir/AbilitySection|render}}</nowiki></code>. | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 24: | Line 21: | ||
|- | |- | ||
| <code>notes</code> || No || Wikitext for the Notes tab. | | <code>notes</code> || No || Wikitext for the Notes tab. | ||
|- | |||
| <code>interactions</code> || No || Wikitext for the Interactions tab. | |||
|- | |- | ||
| <code>tips</code> || No || Wikitext for the Tips tab. | | <code>tips</code> || No || Wikitext for the Tips tab. | ||
| Line 36: | Line 35: | ||
local TABS = { | local TABS = { | ||
{ key = 'notes', label = 'Notes' }, | { key = 'notes', label = 'Notes' }, | ||
{ key = 'interactions', label = 'Interactions' }, | |||
{ key = 'tips', label = 'Tips' }, | { key = 'tips', label = 'Tips' }, | ||
} | } | ||
| Line 43: | Line 43: | ||
<pre> | <pre> | ||
{{AbilitySection | {{User:Vergir/AbilitySection | ||
| hero_name = Abrams | | hero_name = Abrams | ||
| ability_num = 1 | | ability_num = 1 | ||
| notes = | | notes = | ||
* This is an example of a note. | * This is an example of a note. | ||
| tips = | | interactions = | ||
* This is an example of an interaction. | |||
| tips = | |||
* This is an example of a tip. | * This is an example of a tip. | ||
}} | }} | ||
</pre> | </pre> | ||
{{AbilitySection | {{User:Vergir/AbilitySection | ||
| hero_name = Abrams | | hero_name = Abrams | ||
| ability_num = 1 | | ability_num = 1 | ||
| notes = | | notes = | ||
* This is an example of a note. | * This is an example of a note. | ||
| tips = | | interactions = | ||
* This is an example of an interaction. | |||
| tips = | |||
* This is an example of a tip. | * This is an example of a tip. | ||
}} | }} | ||
| Line 65: | Line 69: | ||
* [[Template:AbilitySection]] — template that invokes this module | * [[Template:AbilitySection]] — template that invokes this module | ||
* [[Template:AbilitySection/styles.css]] — CSS for the layout | * [[Template:AbilitySection/styles.css]] — CSS for the layout | ||