561
edits
Auburnsummer (talk | contribs) No edit summary Tag: Reverted |
Auburnsummer (talk | contribs) No edit summary Tag: Reverted |
||
Line 12: | Line 12: | ||
local col = tonumber(frame.args['col']) - 1 | local col = tonumber(frame.args['col']) - 1 | ||
local image = frame.args['image'] | local image = frame.args['image'] | ||
local imagePath = frame:callParserFunction{ name = 'filepath', args = image } | |||
local link = frame.args['link'] | |||
local cellWidth = sheetWidth / noOfColumns | local cellWidth = sheetWidth / noOfColumns | ||
local cellHeight = sheetHeight / noOfRows | local cellHeight = sheetHeight / noOfRows | ||
Line 39: | Line 41: | ||
left = tostring((offsetX - cellWidth * col) * ratio) .. 'px' | left = tostring((offsetX - cellWidth * col) * ratio) .. 'px' | ||
}) | }) | ||
: | :tag('a') | ||
:attr({ | |||
href = link | |||
}) | |||
:tag('img') | |||
:attr({ | |||
class = imageClass, | |||
src = imagePath | |||
}) | |||
:done() | :done() | ||
return tostring(span) | return tostring(span) |