Modulo:Grafico epidemia: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m caratteri di troppo, vengono strippati dall'HTML
width via classe css
Riga 251:
barargs[1] = args[1]
local function _numwidth_widthclass(n)
if n == 'n' then
return 0''
elseif n == 't' then
return 2.45'ge-width-245'
elseif n == 'm' then
return 3.5'ge-width-35'
elseif n == 'w' then
return 4.55'ge-width-455'
elseif n == d then
return 3.5'ge-width-35'
end
return 3.5'ge-width-35'
end
widthcl1 = 'ge-width-35'
width1 = 3.5
widthcl2 = 'ge-width-35'
width2 = 3.5
if args.numwidth and args.numwidth ~= '' then
width1widthcl1 = _numwidth_widthclass( mw.ustring.sub(args.numwidth,1,1) )
width2widthcl2 = _numwidth_widthclass( mw.ustring.sub(args.numwidth,2,2) )
width3widthcl3 = _numwidth_widthclass( mw.ustring.sub(args.numwidth,3,3) )
width4widthcl4 = _numwidth_widthclass( mw.ustring.sub(args.numwidth,4,4) )
end
barargs[2] =
'<span class="grafico-epidemia-num-left" style="width:' .. width1widthcl1 .. 'em;">' .. (args[7] or '') .. '</span>&nbsp;' ..
'<span class="grafico-epidemia-num-right" style="width:' .. width2widthcl2 .. 'em;">' .. (args[8] or '') .. '</span>\n'
if mw.ustring.len(args.numwidth) == 4 then
Riga 287:
barargs.note2 =
'<span styleclass="width:' .. width3widthcl3 .. 'em;" style="padding:0 ' .. padding .. ' 0 0; text-align:right; display:inline-block">'
.. (args[9] or '') ..
'</span>' ..
'<span styleclass="width:' .. width4widthcl4 .. 'em;" style="text-align:left; display:inline-block">' ..
(args[10] or '') ..
'</span>'