Module:Navbox/sandbox: Difference between revisions

Content deleted Content added
m border color
trying a simpler method, just a row border
Line 78:
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', '.15em2px solid #fdfdfd')
end
 
tableRowAdded = true
 
return newRow
end
 
Line 98 ⟶ 111:
if not args.title then return end
 
local titleRow = tbl:tagaddTableRow('tr'tbl)
 
if args.titlegroup then
Line 106 ⟶ 119:
:addClass('navbox-group')
:addClass(args.titlegroupclass)
:css('border-top', '.15em solid #fdfdfd')
:cssText(args.basestyle)
:cssText(args.groupstyle)
Line 113 ⟶ 125:
end
 
local titleCell = titleRow:tag('th'):attr('scope', 'col'):css('border-top', '.15em solid #fdfdfd')
 
if args.titlegroup then
Line 157 ⟶ 169:
if not args.above then return end
 
addTableRow(tbl)
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.aboveclass)
:css('border-top', '.15em solid #fdfdfd')
:cssText(args.basestyle)
:cssText(args.abovestyle)
Line 172 ⟶ 183:
if not args.below then return end
 
addTableRow(tbl)
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.belowclass)
:css('border-top', '.15em solid #fdfdfd')
:cssText(args.basestyle)
:cssText(args.belowstyle)
Line 188 ⟶ 198:
--
local function renderListRow(tbl, index, listnum)
local row = tbl:tagaddTableRow('tr'tbl)
 
if index == 1 and args.imageleft then
Line 195 ⟶ 205:
:addClass('navbox-image')
:addClass(args.imageclass)
:css('border-top', '.15em solid #fdfdfd')
:css('width', '0%')
:css('padding', '0px 2px 0px 0px')
Line 205 ⟶ 214:
 
if args['group' .. listnum] then
local groupCell = row:tag('th'):css('border-top', '.15em solid #fdfdfd')
 
groupCell
Line 223 ⟶ 232:
end
 
local listCell = row:tag('td'):css('border-top', '.15em solid #fdfdfd')
 
if args['group' .. listnum] then
Line 268 ⟶ 277:
:addClass('navbox-image')
:addClass(args.imageclass)
:css('border-top', '.15em solid #fdfdfd')
:css('width', '0%')
:css('padding', '0px 0px 0px 2px')
Line 417 ⟶ 425:
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '.1em .25em .25em3px')
:node(tbl)
if args.title then