Difference between revisions of "Module:Display"

Jump to navigation Jump to search
115 bytes added ,  08:44, 17 October 2021
no edit summary
Line 2: Line 2:
local p = {}
local p = {}


function gridIconList(data)
function gridIconList(data, cols)
result = ''
result = ''
if data ~= nil and data ~= '' then
if data ~= nil and data ~= '' then
Line 8: Line 8:
result = mw.html.create('div')
result = mw.html.create('div')
result:addClass('Icon-Text-Grid')
result:addClass('Icon-Text-Grid')
if cols ~= nil and cols ~= '' then
result:addClass('Icon-Grid-Cols-' .. cols)
end
innerResult = ''
innerResult = ''
for k, v in ipairs(data) do
for k, v in ipairs(data) do
Line 24: Line 27:


function p.gridIconList(frame)
function p.gridIconList(frame)
return gridIconList(frame.args[1])
return gridIconList(frame.args[1], frame.args['cols'])
end
end


return p
return p

Navigation menu