Module:Tt/Draft: Difference between revisions

Jump to navigation Jump to search
Kuhlau (talk | contribs)
No edit summary
Kuhlau (talk | contribs)
No edit summary
Line 32: Line 32:
end
end
-- Build hover tooltip (desktop only)
-- Build toggle tooltip
-- Now uses a css box, not a title
local toggle = out:tag('span'):addClass('custom-tt-wrapper toggle-tooltip')
local hover = out:tag('span')
hover
:addClass('text-tooltip hover-tooltip')
:wikitext(text)
-- Optional hover text but plain text must be there for gadget
if not options or not options.nohover then
local content = tooltip:tag('span'):addClass('tt-content')
if header then
content:tag('span'):addClass('tt-header'):wikitext(header)
:done()
end
content:wikitext(tooltip)
content:done()
end
hover:allDone()
-- Build toggle tooltip (mobile only)
local toggle = out:tag('span'):addClass('custom-tt-wrapper mobile-only toggle-tooltip')
-- Optional toggleable text but plain text must be there for gadget
-- Optional toggleable text but plain text must be there for gadget