Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
trying a simpler method, just a row border
try pure CSS solution
Line 9:
 
local args
local tableRowAdded = false
local border
local listnums = {}
Line 78 ⟶ 77:
end
return item
end
 
local function addTableRow(tbl)
local newRow = tbl:tag('tr')
-- If any other rows have already been added, then we add a 2px top border.
if tableRowAdded then
newRow:css('border-top', '2px solid #fdfdfd')
end
 
tableRowAdded = true
 
return newRow
end
 
Line 111 ⟶ 97:
if not args.title then return end
 
local titleRow = addTableRow(tbl:tag('tr')
 
if args.titlegroup then
Line 169 ⟶ 155:
if not args.above then return end
 
local newRow = tbl:tag('tr')
addTableRow(tbl)
:tag('td')
:addClass('navbox-abovebelow')
Line 183 ⟶ 169:
if not args.below then return end
 
tbl:tag('tr')
addTableRow(tbl)
:tag('td')
:addClass('navbox-abovebelow')
Line 198 ⟶ 184:
--
local function renderListRow(tbl, index, listnum)
local row = addTableRow(tbl:tag('tr')
 
if index == 1 and args.imageleft then