local p =
function p.hidden(frame) local id = mw.getCurrentFrame:getParent.args['id'] or "" local mode = mw.getCurrentFrame:getParent.args['mode'] or "right" local expandSymbol = mw.getCurrentFrame:getParent.args['expand-symbol'] or "⊞" local collapseSymbol = mw.getCurrentFrame:getParent.args['collapse-symbol'] or "⊟" local expandText = mw.getCurrentFrame:getParent.args['expand-text'] or "" local collapseText = mw.getCurrentFrame:getParent.args['collapse-text'] or "" local initialStateExpanded = mw.getCurrentFrame:getParent.args['expanded'] or "false" if mw.getCurrentFrame:getParent.args['expand-symbol']
"none" then collapseSymbol = collapseText else collapseSymbol = collapseSymbol .. collapseText end -- default is content collapsed local contentState = " mw-collapsed" -- class to collapse content at start local collapseSymbolState = " mw-collapsed" local expandSymbolState = "" if initialStateExpanded
"yes" then contentState = "" collapseSymbolState = "" expandSymbolState = " mw-collapsed" end -- collapsible element containing the EXPAND SYMBOL and/or text --local expandSymbolString = '
' .. '
' .. '
' .. expandSymbol .. '
' .. '
' .. '
' -- don't toggle on the content .. '\n' .. clade.main(frame) -- important to start wikitext tables on new line .. '
' .. '
' .. '
' .. 'local tableStyle = frame.args.style or "" if tableStyle
return p.templateStyle(frame, "Clade hidden/styles.css") .. cladeStringend
function p.toggle(frame) if 1
local toggleString = '
' .. toggleSymbol .. '
'
return toggleStringend
--
return p