Module:Navigation

-- local p = {}

local title = mw.title.getCurrentTitle

function section(html, text, link) html:tag('div') :addClass('article-tabs__tab') :wikitext( .. text .. ) :done end

function p.main(frame) local args = frame:getParent.args local html = mw.html.create('div') :addClass('article-tabs') local text = title.text:gsub('^[^:]+:', '') local nogallery = false local nosprites = false for k, v in args do       if v == 'nogallery' then nogallery = true elseif v == 'nosprites' then nosprites = true end end section(html, 'Character', text) if not nogallery then section(html, 'Gallery', 'Gallery:' .. text) end if not nosprites then section(html, 'Sprites', 'Sprites:' .. text) end return tostring(html:done) end

return p