Module:StreetBrawlItems: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Common: use native collapsible toggle so its state class drives a flipping caret (with help from vergir-bot LLM) |
Common: div collapsible with inside custom-toggle label; caret driven by collapsed state, no native brackets (with help from vergir-bot LLM) |
||
| Line 122: | Line 122: | ||
if collapse then | if collapse then | ||
-- Common: a | -- Common: a div collapsible with the label inside as a custom toggle (no native | ||
-- | -- toggle -> no brackets). The caret flips off the container's mw-collapsed state. | ||
local id = "sbcommon-" .. hkey .. "-" .. tostring(tier or 0) | |||
local head = (label ~= "" and label) or "Common" | local head = (label ~= "" and label) or "Common" | ||
return ' | return '<div class="sb-common mw-collapsible mw-collapsed" id="mw-customcollapsible-' .. id .. '">' | ||
.. ' | .. '<div class="sb-common-head mw-customtoggle-' .. id .. '">' .. head .. '</div>' | ||
.. ' | .. '<div class="sb-common-body mw-collapsible-content">' .. table.concat(parts, " | ") .. '</div>' | ||
.. '</div>' | |||
end | end | ||