Module:NavboxMobile: Difference between revisions
EnWikiAdmin (talk | contribs) No edit summary |
EnWikiAdmin (talk | contribs) No edit summary |
||
Line 194: | Line 194: | ||
-- Function to render the navigation bar | -- Function to render the navigation bar | ||
local function renderNavBar( | local function renderNavBar(cell) | ||
local spacerSide = nil | local spacerSide = nil | ||
Line 204: | Line 204: | ||
if args.state == 'plain' then spacerSide = 'right' end | if args.state == 'plain' then spacerSide = 'right' end | ||
cell:wikitext(navbar{ | |||
args.name, | args.name, | ||
mini = 1, | mini = 1, | ||
Line 212: | Line 212: | ||
if spacerSide then | if spacerSide then | ||
cell | |||
:tag('span') | :tag('span') | ||
:css('float', spacerSide) | :css('float', spacerSide) | ||
Line 235: | Line 235: | ||
:cssText(args.basestyle) | :cssText(args.basestyle) | ||
:cssText(args.titlestyle) | :cssText(args.titlestyle) | ||
-- Add the title content | -- Add the title content | ||
Line 443: | Line 440: | ||
-- listnums are now processed separately | -- listnums are now processed separately | ||
renderBelowRow(tbl) | renderBelowRow(tbl) | ||
-- Add the Navbar at the bottom | |||
if has_navbar() then | |||
local navbarRow = tbl:tag('tr') | |||
local navbarCell = navbarRow:tag('td') | |||
:attr('colspan', 2) -- Span the full width of the table | |||
:css('text-align', 'right') -- Align the Navbar to the right | |||
:cssText(args.navbarstyle) | |||
-- Call the renderNavBar function for the cell | |||
renderNavBar(navbarCell) | |||
end | |||
return tbl | return tbl |