Modulo:Tassobox/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
Nessun oggetto della modifica
Moroboshi (discussione | contributi)
fix colore
Riga 45:
:tag('th'):wikitext('Colore'):done()
for name, values in pairs(cfg.ere_geologiche) do
local start = values['start'] or "-?"
local next_era = values['next_era'] or "-?"
local color
if values['color'] then
color = mw.html.create('span')
:cssText("display:inline-block;border:solid grey 1px;width:1em;height:1em")
:css('background:', values['color'])
:wikitext(' ')
else
color = mw.html.create('span'):done()
Line 57 ⟶ 58:
root:tag('tr')
:tag('td'):wikitext(name):done()
:tag('td'):css('text-align', 'right'):wikitext(start):done()
:tag('td'):wikitext(next_era):done()
:tag('td'):css('text-aliggn', 'center'):node(color)
end
return tostring(root) .. tostring(temp)
 
return tostring(root)
end