|
Module:Icône inventaire
Aller à la navigation
Aller à la recherche
Utilisé pour {{Icône inventaire}}
Dépendance : Module:Reverselink
[lire] [modifier] [historique] [purger]La documentation ci-dessus est tirée de Module:Icône inventaire/doc.
local p = {}
p.icon = function( f )
local args = f
if f == mw.getCurrentFrame() then
args = f:getParent().args
end
local Reverselink = require( 'Module:Reverselink' )
local file = Reverselink.xlink_sprites("Invicon", args[1] )
if file == 'absent' then
return '[[File:Grid Unknown.png|32x32px|link=Catégorie:Pages avec des sprites manquants|class=pixel-image]][[Catégorie:Pages avec des sprites manquants]]'
else
local link = args.link
local title = args.title
if file:match( '%.gif$' ) or file:match( '%.png$' ) then
file = 'Invicon ' .. file
else
file = 'Invicon ' .. file .. '.png'
end
return '[[File:' .. file .. '|32x32px|link=' .. ( link or '' ) .. '|' .. ( title or '' ) .. '|class=pixel-image]]'
end
end
return p