Participe à l'animation du Modèle:Slideshow, permettant d'afficher plusieurs images successivement au même endroit.
La documentation ci-dessus est transcluse de Module:Animate/doc. (modifier | historique)
local p = {}
function p.animate( f )
local args = f
if f == mw.getCurrentFrame() then
args = f:getParent().args
end
local size = args.size or '128px'
local link = args.link or ''
if size ~= '' then
size = '|' .. size
end
if link ~= '' then
link = '|link=' .. link
end
local images = {}
for _,v in ipairs(args) do
if #v > 0 then
if v ~= '' then
table.insert(images, '<span>[[File:' .. v .. size .. link .. ']]</span>')
end
end
end
images[1] = images[1]:gsub( '^<span>', '<span class="animated-active">' )
return '<span class="animated">' .. table.concat( images ) .. '</span>'
end
return p