Editing Module:Navbox

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 116: Line 116:
  
 
     titleCell
 
     titleCell
        :tag('div')
+
        :tag('div')
            :attr('id', mw.uri.anchorEncode(args.title))
+
            :addClass(args.titleclass)
            :addClass(args.titleclass)
+
            :css('font-size', '114%')
            :css('font-size', '114%')
+
            :wikitext(addNewline(args.title))
            :wikitext(addNewline(args.title))
 
 
end
 
end
  
Line 361: Line 360:
 
     local res = mw.html.create()
 
     local res = mw.html.create()
 
     if border == 'none' then
 
     if border == 'none' then
         local nav = res:tag('div')
+
         res:node(tbl)
            :attr('role', 'navigation')
 
            :node(tbl)
 
        if args.title then
 
            nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))
 
        else
 
            nav:attr('aria-label', 'Navbox')
 
        end
 
 
     elseif border == 'subgroup' or border == 'child' then
 
     elseif border == 'subgroup' or border == 'child' then
 
         -- We assume that this navbox is being rendered in a list cell of a parent navbox, and is
 
         -- We assume that this navbox is being rendered in a list cell of a parent navbox, and is
Line 378: Line 370:
 
             :wikitext('<div>') -- XXX: hack due to lack of unclosed support in mw.html.
 
             :wikitext('<div>') -- XXX: hack due to lack of unclosed support in mw.html.
 
     else
 
     else
         local nav = res:tag('div')
+
         res
            :attr('role', 'navigation')
+
            :tag('table')
            :addClass('navbox')
+
                :addClass('navbox')
            :cssText(args.bodystyle)
+
                :css('border-spacing', 0)
            :cssText(args.style)
+
                :cssText(args.bodystyle)
            :css('padding', '3px')
+
                :cssText(args.style)
            :node(tbl)
+
                :tag('tr')
        if args.title then
+
                    :tag('td')
            nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))
+
                        :css('padding', '2px')
        else
+
                        :node(tbl)
            nav:attr('aria-label', 'Navbox')
 
        end
 
 
     end
 
     end
  

Please note that all contributions to Zero-K are considered to be released under the Creative Commons Attribution-ShareAlike (see Zero-K:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Template used on this page: