Module:NavboxMobile: Difference between revisions

No edit summary
Tag: Manual revert
No edit summary
Line 324: Line 324:
             :cssText(args.groupstyle)
             :cssText(args.groupstyle)
             :cssText(args['group' .. listnum .. 'style'])
             :cssText(args['group' .. listnum .. 'style'])
            :addClass('navboxMobile-group-level' .. (border == 'subgroup' and '3' or '2'))
             :wikitext(processItem(args['group' .. listnum]))
             :wikitext(processItem(args['group' .. listnum]))
     end
     end
Line 341: Line 342:
     -- Handle nested lists (childX_groupY, childX_listY)
     -- Handle nested lists (childX_groupY, childX_listY)
     if args['list' .. listnum] == 'child' then
     if args['list' .. listnum] == 'child' then
        -- Render nested table for child lists within 'navboxMobile-subgroup'
         local nestedTbl = mw.html.create('table')
         local nestedTbl = mw.html.create('table')
        nestedTbl
             :addClass('navboxMobile-subgroup')
             :addClass('navboxMobile-subgroup')
             :css('width', '100%')
             :css('width', '100%')
             :css('border-spacing', '0')
             :css('border-spacing', '0')
             :css('padding', args.nestedPadding or '0.5em') -- Add consistent padding
             :css('padding', '0.5em') -- Adjust as needed for spacing


         for i = 1, 10 do -- Assume up to 10 nested groups/lists
         for i = 1, 10 do -- Assume up to 10 nested groups/lists
Line 355: Line 356:


             local nestedRow = addTableRow(nestedTbl)
             local nestedRow = addTableRow(nestedTbl)
 
 
             -- Add the nested group (if it exists)
             -- Add the nested group (if it exists)
             if nestedGroup then
             if nestedGroup then
Line 372: Line 373:
                 nestedListCell
                 nestedListCell
                     :attr('colspan', 2)
                     :attr('colspan', 2)
                     :addClass('navboxMobile-list-content')
                     :addClass('navboxMobile-list-content hlist')
                    :addClass('hlist') -- Ensure horizontal list styling
                     :cssText(args['child' .. listnum .. '_list' .. i .. 'style'])
                     :cssText(args['child' .. listnum .. '_list' .. i .. 'style'])
                     :wikitext(processItem(nestedList))
                     :wikitext(processItem(nestedList))