Module:Gallery: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(convert some spaces to tabs, backend now uses tabs for indentation)
(add captionstyle as requested on the talk page)
Line 47: Line 47:
local imgHeight = tonumber(args.height) or 180
local imgHeight = tonumber(args.height) or 180
local lines = tonumber(args.lines) or 2
local lines = tonumber(args.lines) or 2
local captionstyle = args.captionstyle
for i = 1, imageCount do
for i = 1, imageCount do
Line 76: Line 77:
.css('padding', '0px')
.css('padding', '0px')
.css('text-align', 'center')
.css('text-align', 'center')
.cssText(captionstyle)
.wikitext(mw.ustring.format('[[%s|center|border|%dx%dpx|alt=%s|%s]]', img, imgWidth, imgHeight, alt, caption))
.wikitext(mw.ustring.format('[[%s|center|border|%dx%dpx|alt=%s|%s]]', img, imgWidth, imgHeight, alt, caption))
.done()
.done()