Module:Tt/Draft: Difference between revisions

Kuhlau (talk | contribs)
No edit summary
Kuhlau (talk | contribs)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 14: Line 14:
end
end
     return p._main(args, frame)
     return p._main(args, nil, frame)
end
end


Line 28: Line 28:
local link = tostring(args.link)
local link = tostring(args.link)
args.link = nil
args.link = nil
local base = tostring(p._main(args, {notoggle = true})) -- tt on label for hover as otherwise the <a> default title takes priority
local base = tostring(p._main(args, {notoggle = true}, frame)) -- tt on label for hover as otherwise the <a> default title takes priority
local linkTo = '[[' .. lib.ternary(link == '1', text, link) .. '|' .. base .. ']]'
local linkTo = '[[' .. lib.ternary(link == '1', text, link) .. '|' .. base .. ']]'
return p._main({ linkTo, args[2], header = args.header, class = args.class }, {nohover = true}) -- external tt for collapsible for the separated clickable
return p._main({ linkTo, args[2], header = args.header, class = args.class }, {nohover = true}, frame) -- external tt for collapsible for the separated clickable
end
end
Line 58: Line 58:
local collapsibleContent = toggle
local collapsibleContent = toggle
:tag('span')
:tag('span')
:addClass('mw-collapsible-content custom-tt')
:addClass('mw-collapsible-content custom-tt mobileonly')
:css{ display = 'none' }
if header then
if header then
collapsibleContent
collapsibleContent