No edit summary
No edit summary
Line 22: Line 22:
         end
         end


         output = output .. string.format('[[File:%s|thumb|%s]]\n', imageName, size)
         output = output .. string.format('[[File:%s|%s]]\n', imageName, size)


         index = index + 1
         index = index + 1

Revision as of 00:57, 23 November 2025

Documentation for this module may be created at Module:ImageSequence/doc

local p = {}

function p.render(frame)
    local args = frame:getParent().args
    local size = args["size"] or "200px"
    local output = ""
    local outer_div_style = string.format(' style="width:%s;"', size)
    output = output .. '<div class="image-sequence"' .. outer_div_style .. '>\n<div class="image-sequence-row">\n'

    local index = 1
    while true do
        local paramName
        if index == 1 then
            paramName = "image"
        else
            paramName = "image" .. index
        end

        local imageName = args[paramName]
        if not imageName then
            break
        end

        output = output .. string.format('[[File:%s|%s]]\n', imageName, size)

        index = index + 1
    end

    output = output .. '</div>\n</div>'

    return output
end

return p