Module:Gallery: Difference between revisions

add optional perrow per request
(move to correct location :))
(add optional perrow per request)
Line 35:
.tag('tr')
.tag('th')
.attr('colspan', 10)
.css('text-align', 'center')
.css('font-weight', 'bold')
Line 61 ⟶ 60:
textWidth = cellWidth + 7
end
local cellcount = 0
 
if img ~= '' then
local imgTbl = mainCell.tag('table')
cellcount = cellcount + 1
imgTbl
Line 106 ⟶ 107:
.tag('tr')
.tag('td')
.attr('colspan', 10)
.css('text-align', 'right')
.css('font-size', '80%')
Line 112:
.wikitext(args.footer)
end
if args.perrow then
tbl.css('width', 8 + (cellWidth + 20 + 6)*tonumber(args.perrow) .. 'px')
end
 
return tostring(tbl)
end
Anonymous user