Module:AbilityData/hero: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m testing example without tabber |
m collapsible thats at least not bugging for write_hero_abilities |
||
| Line 137: | Line 137: | ||
'{{'..notes_source_page..'}}' | '{{'..notes_source_page..'}}' | ||
) | ) | ||
ret = ret .. | local html = mw.html.create() | ||
-- Outer div that is the clickable area | |||
local outerDiv = html:tag('div') | |||
:addClass('mw-collapsible mw-collapsed') -- Makes it collapsible and starts in collapsed state | |||
:css('width', '100%') -- Adjust width if needed | |||
:css('cursor', 'pointer') -- Makes the cursor a pointer for a clickable effect | |||
:attr('style', 'display:block;') -- Ensures the div behaves like a block-level element | |||
-- Text A and the dropdown arrow image with size 35px | |||
outerDiv:wikitext('Clickable div that expands ' .. '[[File:Dropdown Arrow.png|link=|35px]]') | |||
-- Inner div that will be revealed when clicked | |||
local innerDiv = outerDiv:tag('div') | |||
:addClass('mw-collapsible-content') | |||
:wikitext(tab_content) | |||
local tab_wrapper = tostring(outerDiv) | |||
ret = ret .. tab_wrapper .. '\n' | |||
end | end | ||
return frame:preprocess(ret) | return frame:preprocess(ret) | ||
end | end | ||
return p | return p | ||