Module:NavboxMobile: Difference between revisions
EnWikiAdmin (talk | contribs) No edit summary |
EnWikiAdmin (talk | contribs) No edit summary |
||
Line 172: | Line 172: | ||
-- Function to add a new table row with optional gutter | -- Function to add a new table row with optional gutter | ||
local function addTableRow(tbl) | local function addTableRow(tbl) | ||
if tableRowAdded then | -- Check if the spacer rows are necessary based on the listclass or bodyclass | ||
tbl | local suppressSpacer = args.listclass and args.listclass:find("hlist") or | ||
args.bodyclass and args.bodyclass:find("hlist") | |||
-- Only add spacer rows if they are not explicitly suppressed | |||
if tableRowAdded and not suppressSpacer then | |||
tbl:tag('tr') | |||
:css('height', '2px') | |||
:tag('td') | |||
:attr('colspan', 2) | |||
end | end | ||
tableRowAdded = true | tableRowAdded = true | ||
return tbl:tag('tr') | return tbl:tag('tr') | ||
end | end | ||
-- Function to render the navigation bar | -- Function to render the navigation bar |