Modulo:Discendenza/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica |
use require('strict') instead of require('Module:No globals') |
||
(5 versioni intermedie di un altro utente non mostrate) | |||
Riga 1:
require('
local getArgs = require('Module:Arguments').getArgs
local errorCategory = '[[Categoria:Errori di compilazione del template Discendenza]]'
Riga 219:
local xx, xp
local stileDiv = { ['width'] = largo..'px', ['padding'] = '3px', ['background'] = '#FFF', ['border'] = '1px solid #C8CCD1' }
local stileTabella = { ['border-collapse'] = 'separate', ['text-align'] = 'center', ['font-size'] = '95%', ['line-height'] = '105%', ['margin'] = '0px auto !important', }
local xy = massimoXY(pid, {0, 0})
local lg = math.floor(100/(xy[1]+2))
Riga 246:
if (n==1) then
for m=1,(xy[1]+2) do
end
else
:css('border-right','1px solid #000')
:cssIf(n1 == xp,'border-top','1px solid #000')
:attrIf(xx-posx[1]>0,'colspan',xx+1-posx[1])
n1 = xp
posx[1] = xx + 1
end
if (xx-posx[2]>0) then
:attrIf(xx-posx[2]>1,'colspan',xx-posx[2])
end
:attr('colspan','2')
:wikitextIf(pers[v].nota=='-', pers[v].testo, string.format('%s<br/><span style="font-size:90%%"><i>%s</i></span>',pers[v].testo,pers[v].nota))
)
posx[2] = xx + 2
if (n<xy[2]) then
if (#pers[v].figli > 0) then
:css('border-right','1px solid #000')
:attrIf(xx-posx[3]>0,'colspan',xx+1-posx[3])
posx[3] = xx + 1
end
end
Line 289 ⟶ 285:
bDiv:node(bTabella)
if (allinea == 'destra' and not (dida=='')) then
:css({['font-size'] = '87%', ['font-style'] = 'normal', ['border-top'] = '1px solid #c8ccd1', ['margin'] = '8px 2px 3px'})
:wikitext(dida)
)
end
return tostring(bDiv)
Line 309 ⟶ 305:
local bTabella = mw.html.create('table')
:attr({['cellpadding']='0',['cellspacing']='0',['border']='0'})
:css({['border-collapse']='separate',['text-align']='left',['margin']='10px 0 10px 16px'})
local function mostraY2(pid, a)
Line 324 ⟶ 320:
)
end
riga1
:node(mw.html.create('td') :css('width','6px'))
:css({['border-left']='1px solid #666',['border-bottom']='1px solid #666',['width']='10px',['line-height']='3px',['height']='12px'}))
:
riga1:node(mw.html.create('td')▼
:
:wikitextIf(pers[pid].nota=='', pers[pid].testo, pers[pid].testo..' - '..pers[pid].nota))▼
▲ :wikitextIf(pers[pid].nota=='', pers[pid].testo, pers[pid].testo..' - '..pers[pid].nota))
riga2
:node(mw.html.create('td'))
Line 340 ⟶ 336:
bTabella:node(riga1):node(riga2)
else
▲ :attr('colspan',2*a-1)
:
:css('padding','0px 0px 2px 2px')
:wikitextIf(pers[pid].nota=='',pers[pid].testo,pers[pid].testo..' - '..pers[pid].nota )
▲ bTabella:node(riga1)
)
end
if (pers[pid].sp > 0) then
|