Módulo:Skillbox
Ir para navegação
Ir para pesquisar
A documentação para este módulo pode ser criada em Módulo:Skillbox/doc
local p = {}
function p.build(frame)
local args = frame:getParent().args
local out = {}
table.insert(out, '<div id="skillbox-data" style="display:none"')
for i = 1, 15 do
local hab = args['hab' .. i]
local de = args['de' .. i]
local vid = args['vid' .. i]
if hab or de or vid then
if hab then
table.insert(out, string.format(' data-hab%d="%s"', i, mw.text.encode(hab)))
end
if de then
table.insert(out, string.format(' data-de%d="%s"', i, mw.text.encode(de)))
end
if vid then
table.insert(out, string.format(' data-vid%d="%s"', i, mw.text.encode(vid)))
end
end
end
table.insert(out, '></div>')
table.insert(out, frame:expandTemplate{title = '#widget:Skillbox'})
return table.concat(out, '\n')
end
return p