Modulo:Infobox/sandbox2: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
r |
meglio semplificare |
||
(2 versioni intermedie di uno stesso utente non sono mostrate) | |||
Riga 62:
local function renderTitle()
local subtitle = mw.html.create('')
if args.SottoTitolo then▼
subtitle
:tag('span')▼
:addClass('sinottico_sottotitolo')▼
:cssText(args.StileSottoTitolo or '')▼
:wikitext(args.SottoTitolo)▼
end▼
if args.TitoloEst then
root
Line 69 ⟶ 78:
:cssText(args.StileTitoloEst or '')
:wikitext(args.TitoloEst)
:node(subtitle)
elseif args.TitoloInt then
root
Line 77 ⟶ 87:
:cssText(args.StileTitoloInt or '')
:wikitext(args.TitoloInt)
:node(subtitle)
end
end
▲ if args.SottoTitolo then
▲ :tag('tr')
▲ :addClass('sinottico_sottotitolo')
▲ :cssText(args.StileSottoTitolo or '')
▲ :wikitext(args.SottoTitolo)
▲ end
local function renderImage()
Line 101 ⟶ 99:
:css('text-align', 'center')
:cssText(args.StileImmagine or '')
:wikitext(
▲ :tag('span')
root:tag('tr'):node(cell_immagine)
end
Line 115 ⟶ 105:
local function renderRows()
local rownums = getArgNums('Valore', 'GruppoOpzionale', 'Gruppo
for k, num in ipairs(rownums) do
local skip = false
Line 178 ⟶ 168:
:attr('summary', args.Summary or 'Tabella sinottica che riassume i principali dati del soggetto')
renderTitle()
renderImage()
end
|