Modulo:Navbox/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m per test |
continuo a rivedere il css |
||
Riga 102:
self:_addTnavbar(thNode)
end
self:_addTitle(thNode)
-- eventuale riga per l'above
if self.args.above then
Line 152 ⟶ 154:
}
}
node:tag('div'):addClass('
end
-- Imposta il titolo del navbox dal parametro "title".
--
-- @param {table} node
function Navbox:_addTitle(node)
node:tag('span'):addClass('navbox-title'):wikitext(self.args.title)
end
Line 162 ⟶ 171:
self.tableNode
:tag('tr')
:tag('
:attr('colspan', self.args.image and '3' or '2')
:addClass('navbox-abovebelow')
Line 174 ⟶ 183:
-- @param {number} rowspan
function Navbox:_addImage(trNode, rowspan)
trNode
:tag('td')
:attr('rowspan', rowspan)
:
:cssText(self.args.imagestyle)
:wikitext(self.args.image)
Line 190 ⟶ 194:
function Navbox:_addLists()
local rowIds, altStyle, altBackground
-- crea una riga per ogni groupN/listN
rowIds = getIds(self.args, true)
Line 204 ⟶ 202:
trNode:tag('th')
:attr('colspan', self.args['list' .. id] and '1' or '2')
:
:cssText(self.args.groupstyle)
:cssText(self.args['group' .. id .. 'style'])
Line 212 ⟶ 210:
if self.args['list' .. id] then
local list = trimSep(self.args['list' .. id])
▲ end
trNode:tag('td')
:attr('colspan', self.args['group' .. id] and '1' or '2')
▲ :css('text-align', self.args['group' .. id] and 'left' or 'center')
:cssText(self.args.liststyle)
:cssText(altStyle)
|