Module:Animate

local table = require('Module:Table') local string = require('Module:String') local getArgs = require('Module:Arguments').getArgs

local p = {}

- -- Template: Animate -- -- Creates a cycling animation. - function p.animate(frame) local args = getArgs(frame) local files = args[1] or '' local size = args[2] or '' local link = args['link'] or args[3] or '' local class = args['class'] or '' if size ~= '' then size = '|' .. size end

if link ~= '' then link = '|link=' .. link end if class ~= '' then class = '|class=' .. class end local images = {} for image in string.gsplit(files, '%s*;%s*') do		if image == '' then table.insert(images, string.wrapTag(' ', 'span')) else table.insert(images, string.wrapTag(string.makeLink{ "File:", image, size, link, class }, 'span')) end end images[1] = images[1]:gsub('^ ', ' ') return string.wrapHtml(images, ' ', {class="animated"}) end

function p._infoboxAI(args) return string.wrapTag(p.animate(args), 'center') end

return p