Editing Module:AbilitySection/doc

Jump to navigation Jump to search
Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
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 2: Line 2:


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.
Between the card and the details panel, an interaction-hint rail of small item icons is rendered via [[Module:AbilityHints]] (showing how the ability interacts with items — dispellable, reduced, blocked, etc.). When a rail is present, the card and rail are grouped in a <code>.ability-section-main</code> wrapper so the rail always wraps together with the card rather than onto the details' line; abilities with no interactions keep the flat single-card structure.


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 7:
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 (and its hint rail, if any).
If no content params are provided, no details panel is rendered at all — only the ability card.


== Entry point ==
== Entry point ==
Line 24: Line 22:
|-
|-
| <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 36:
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 48: Line 49:
| notes =
| notes =
* This is an example of a note.
* This is an example of a note.
| interactions =
* This is an example of an interaction.
| tips =
| tips =
* This is an example of a tip.
* This is an example of a tip.
Line 58: Line 61:
| notes =
| notes =
* This is an example of a note.
* This is an example of a note.
| interactions =
* This is an example of an interaction.
| tips =
| tips =
* This is an example of a tip.
* This is an example of a tip.
Line 65: Line 70:


* [[Template:AbilitySection]] — template that invokes this module
* [[Template:AbilitySection]] — template that invokes this module
* [[Module:AbilityHints]] — interaction-hint icons rendered beside the card
* [[Template:AbilitySection/styles.css]] — CSS for the layout
* [[Template:AbilitySection/styles.css]] — CSS for the layout
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

Pages included on this page:

This page is a member of a hidden category: