Modulo:Immagine multipla: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
fix nomi parametri, rimuovo bold dal titolo, converto subito totalwidth |
||
Riga 66:
end
-- Return a sorted array of the index of the parameter immagine1 .. immagine(n)
-- passed to the template. Index could be not consecutive but the gap between
-- different index must be five or less
local function getImageNumbers(pargs)
local imagenumbers = {}
Line 95 ⟶ 98:
local dir = pargs['direzione']
local align = pargs['allinea'] or args['allinea']
local capalign = pargs['
local totalwidth = pargs['
if totalwidth then
local imgstyle = pargs['stile_immagine'] or args['stile_immagine']▼
totalwidth = tonumber(totalwidth) or 0▼
end
local header = pargs['titolo'] or pargs['titolo']
local footer = pargs['
local perrow = nil
local thumbclass = {
Line 121 ⟶ 127:
-- create an array with the number of images per row
if dir == 'verticale' or dir == 'vertical' then
perrow = getPerRow('1', imagecount)
else
perrow = getPerRow(pargs['
end
Line 150 ⟶ 156:
-- if total_width has been specified, rescale the image widths
local heights = {}
if
▲ totalwidth = tonumber(totalwidth)
widthmax = 0
local k = 0
Line 214 ⟶ 219:
root:addClass('center')
end
if( pargs['
root:css('margin-top', pargs['
end
if( pargs['
root:css('margin-bottom', pargs['
end
if( bg ~= '' ) then
Line 235 ⟶ 240:
div:tag('div')
:css('clear', 'both')
:css('
:css('background-color', pargs['sfondo titolo'] or 'transparent')
:wikitext(header)
Line 276 ⟶ 280:
:addClass('thumbcaption')
:css('clear', 'left')
:css('text-align', pargs['
:css('background-color', pargs['sfondo
:wikitext(footer)
end
|