Modulo:Infobox/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
separo il richiamo del template dalla funzione vera e propria di costruzione del sinottico
Moroboshi (discussione | contributi)
sottotitolo/sovratitolo
Riga 57:
 
local function renderTitle(root, args)
local sopratitolo
if args.Sopratitolo then
sopratitolo = mw.html.create('div')
sopratitolo:tag('div')
.cssText(args.StileSopratitolo)
:wikitext(args.SopraTitolo or 'font-size:small;')
end
local sottotitolo
if args.Sottotitolo then
sottotitolo = mw.html.create('div')
sottotitolo:tag('div')
.cssText(args.StileSottotitolo)
:wikitext(args.Sottotitolo or 'font-size:small;')
end
if args.TitoloEst then
root
:tag('caption')
:addClass('sinottico_testata')
:csscssText("args.StileTitoloEst or 'font-weight", ":bold";')
:cssTextnode(args.StileTitoloEst or ''sopratitolo)
:wikitext(args.TitoloEst)
:node(sottotitolo)
elseif args.TitoloInt then
root
Riga 71 ⟶ 86:
:attr('colspan', '2')
:cssText(args.StileTitoloInt or '')
:node(sopratitolo)
:wikitext(args.TitoloInt)
:node(sottotitolo)
end
end