Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
minor tweak; "_" for an unused variable
trying to simplify with border-spacing instead of gutter rows
Line 78:
end
return item
end
 
local function addTableRow(tbl)
-- If any other rows have already been added, then we add a 2px gutter row.
if tableRowAdded then
tbl
:tag('tr')
:css('height', '2px')
:tag('td')
:attr('colspan',2)
end
 
tableRowAdded = true
 
return tbl:tag('tr')
end
 
Line 113 ⟶ 98:
if not args.title then return end
 
local titleRow = addTableRow(tbl:tag('tr')
 
if args.titlegroup then
Line 171 ⟶ 156:
if not args.above then return end
 
tbl:tag('tr')
addTableRow(tbl)
:tag('td')
:addClass('navbox-abovebelow')
Line 185 ⟶ 170:
if not args.below then return end
 
tbl:tag('tdtr')
addTableRow(tbl)
:tag('td')
:addClass('navbox-abovebelow')
Line 200 ⟶ 185:
--
local function renderListRow(tbl, index, listnum)
local row = addTableRow(tbl:tag('tr')
 
if index == 1 and args.imageleft then
Line 359 ⟶ 344:
end
 
tbl:css('border-spacing', 0'.2em')
if border == 'subgroup' or border == 'none' then
tbl
Line 427 ⟶ 412:
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px.1em')
:node(tbl)
if args.title then