Module:ButtonBox
Appearance
Documentation for this module may be created at Module:ButtonBox/doc
local p = {}
function p.buttonbox(frame)
local args = frame:getParent().args
local out = {}
table.insert(out,'{| class="buttonbox"')
table.insert(out, '|-\n')
for i, row in ipairs(args) do
for j, button in ipairs(row) do
table.insert(out, '| <div class="buttonbox-entry">')
table.insert(out, '<a href="' .. button[1] .. '"><img src="' .. button[2] .. '" alt="" /></a>')
table.insert(out, '<div class="buttonbox-label">' .. button[3] .. '</div></div>')
end
end
table.insert(out, '|}')
return table.concat(out, '\n')
end
return p