- This is an example of a note.
- This is an example of a note.
m remove traces of user-space period |
m fix example |
||
| 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. | ||
| Line 43: | Line 44: | ||
<pre> | <pre> | ||
{{ | {{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. | ||
| interactions | | interactions = | ||
* This is an example of an interaction. | * This is an example of an interaction. | ||
| tips | | tips = | ||
* This is an example of a tip. | * This is an example of a tip. | ||
}} | }} | ||
</pre> | </pre> | ||
{{ | {{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. | ||
| interactions | | interactions = | ||
* This is an example of an interaction. | * This is an example of an interaction. | ||
| tips | | tips = | ||
* This is an example of a tip. | * This is an example of a tip. | ||
}} | }} | ||
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.
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.
p.render(frame)Called via {{#invoke:AbilitySection|render}}.
| Argument | Required | Description |
|---|---|---|
hero_name |
Yes | Passed through to Template:Ability card v2. |
ability_num |
Yes | Passed through to Template:Ability card v2. |
notes |
No | Wikitext for the Notes tab. |
interactions |
No | Wikitext for the Interactions tab. |
tips |
No | Wikitext for the Tips tab. |
TABSDefines list of possible tabs. Order here determines display order in the tabber.
local TABS = {
{ key = 'notes', label = 'Notes' },
{ key = 'interactions', label = 'Interactions' },
{ key = 'tips', label = 'Tips' },
}
{{AbilitySection
| hero_name = Abrams
| ability_num = 1
| notes =
* This is an example of a note.
| interactions =
* This is an example of an interaction.
| tips =
* This is an example of a tip.
}}
Siphon Life