-- this module implements local p =
function p.main(frame) local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame)
local width = args.width or '150'
local items = local itemnums = for k, v in pairs(args) do if k ~= nil and tonumber(k) and math.fmod(k,2)
' .. args[k] .. '
') if args[tonumber(k)+1] then itemdiv :tag('div') :addClass('gallerytext') :css('text-align', args['captionalign']) :wikitext('
' .. args[tonumber(k)+1] .. '
') end items[i] = tostring(item) .. ' ' end end -- remove blanks table.sort(itemnums) local sorteditems = for k = 1, #itemnums do sorteditems[k] = items[itemnums[k]] endlocal root = mw.html.create('ul') :addClass('gallery mw-gallery-nolines gallery-items') :addClass(args.class) :cssText(args.style) :wikitext(table.concat(sorteditems)) return frame:extensionTag .. frame:extensionTag .. tostring(root)end
return p