Module:Gallery: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(move to correct location :))
(add optional perrow per request)
Line 35: Line 35:
.tag('tr')
.tag('tr')
.tag('th')
.tag('th')
.attr('colspan', 10)
.css('text-align', 'center')
.css('text-align', 'center')
.css('font-weight', 'bold')
.css('font-weight', 'bold')
Line 61: Line 60:
textWidth = cellWidth + 7
textWidth = cellWidth + 7
end
end
local cellcount = 0

if img ~= '' then
if img ~= '' then
local imgTbl = mainCell.tag('table')
local imgTbl = mainCell.tag('table')
cellcount = cellcount + 1
imgTbl
imgTbl
Line 106: Line 107:
.tag('tr')
.tag('tr')
.tag('td')
.tag('td')
.attr('colspan', 10)
.css('text-align', 'right')
.css('text-align', 'right')
.css('font-size', '80%')
.css('font-size', '80%')
Line 112: Line 112:
.wikitext(args.footer)
.wikitext(args.footer)
end
end
if args.perrow then
tbl.css('width', 8 + (cellWidth + 20 + 6)*tonumber(args.perrow) .. 'px')
end

return tostring(tbl)
return tostring(tbl)
end
end