Modulo:Elezioni/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
mNessun oggetto della modifica
Riga 3:
local getArgs = require('Module:Arguments').getArgs
local colore = require('Module:Partiti').colore
local lcella = 60
local tcella = '<th width="'..lcella..'px">Voti</th><th width="'..lcella..'px">%</th>'
 
local function vrg(a,b,c)
Riga 20 ⟶ 22:
s1 = '<td>' .. s1
if (tonumber(a)<b) then
s1 = s1 .. '<div style="width:70px'..lcella..'px;background:#eee;border-bottom:1px solid #999;height:3px"><div style="width:'..math.floor(0.5+70lcella*tonumber(a)/b)..'px;background:#007cc3;height:3px"></div></div>'
end
s1 = s1 ..'</td>'
Riga 86 ⟶ 88:
ss = '<table class="wikitable" style="text-align:right;margin:10px auto"><caption>'..titolo..'</caption><tr><th rowspan=2>Candidato</th><th rowspan=2 colspan=2>Partito</th><th colspan=2>'
if (ball>0) then ss= ss..'Primo turno</th><th colspan=2>Ballottaggio' else ss = ss..'Risultati' end
ss = ss..'</trth></tr><thtr>Voti</th'..tcella..((ball><th>%0) and tcella or '')..'</thtr>'
if (ball>0) then ss= ss..'<th>Voti</th><th>%</th>' end
ss = ss..'</tr>'
 
num = 1
Riga 168:
ss = '<table class="wikitable" style="text-align:right;margin:10px auto"><caption>'..titolo..'</caption><tr><th rowspan=2>Candidato</th><th rowspan=2 colspan=2>Partito</th><th colspan=2>'
if (ball>0) then ss= ss..'Primo turno</th><th colspan=2>Ballottaggio' else ss = ss..'Risultati' end
ss = ss..'</th></tr><tr><th>Voti</th><th'..tcella..((ball>%0) and tcella or '')..'</thtr>'
if (ball>0) then ss= ss..'<th>Voti</th><th>%</th>' end
ss = ss..'</tr>'
 
num = 1
Riga 243 ⟶ 241:
ss = '<table cellpadding=0 cellspacing=0 style="border-collapse:collapse;margin:10px auto"><caption><b>'..titolo..'</b><tr style="vertical-align:top"><td>'
ss = ss..'<table class="wikitable" style="text-align:right"><tr><th rowspan=2 colspan=2>Partito</th><th colspan=2>'
if (ball>0) then ss= ss..'Primo turno</th><th colspan=2>Ballottaggio</th>' else ss = ss..'Risultati</th>' end
ss = ss..'</th><th width="'..lcella..'px" rowspan=2>Seggi</th></tr>'
ss = ss..'<tr></th>Voti</thtr><thtr>'..tcella..((ball>%0) and tcella or '')..'</thtr>'
if (ball>0) then ss= ss..'<th>Voti</th><th>%</th>' end
ss = ss..'</tr>'
 
num = 1
while (args['part'..num]) do