Módulo:PetOutfitsVisualizer
Ir para navegação
Ir para pesquisar
A documentação para este módulo pode ser criada em Módulo:PetOutfitsVisualizer/doc
local p = {}
function p.render(frame)
local outfitsStr = frame.args.outfits or ""
local html = '<div class="pet-outfit-gallery" style="display:flex; flex-wrap:wrap; gap:5px;">'
for outfitPair in outfitsStr:gmatch("[^;]+") do
local file, caption = outfitPair:match("^%s*(.-)%s*,%s*(.-)%s*$")
if file then
html = html .. string.format(
'<div style="text-align:center;"><img src="/wiki/Special:FilePath/%s" style="height:72px;"><br>%s</div>',
file, caption or file
)
end
end
html = html .. '</div>'
return html
end