Content deleted Content added
revert to old version for testing |
readding navbox class |
||
Line 5:
local p = {}
local getImageName = require( 'Module:Portal' ).image
local yesno = require( 'Module:Yesno' )
Line 12 ⟶ 11:
function p._main( portals, args )
if #portals < 1 then return '' end -- Don't display a blank navbox if no portals were specified.
:attr( 'role', 'navigation' )
:attr( 'aria-label' , 'Portals' )
if yesno( args.border ) == false then
nav
else▼
nav
:addClass( 'navbox' )
end▼
local list = mw.html.create( 'ul' )
for _, portal in ipairs( portals ) do
list
Line 22 ⟶ 37:
:wikitext( string.format( '[[File:%s|24x21px]]', getImageName{ portal } ) )
:done()
▲ :css( 'font-weight', 'bold' )
▲ :wikitext( string.format( '[[Portal:%s|%s portal]]', portal, portal ) )
▲ end
return tostring(▼
▲ mw.html.create( 'div' )
▲ :addClass( 'noprint metadata' )
▲ :css( 'width', '100%' )
▲ :css( 'padding', '1px' )
▲ :css( 'font-size', '88%' )
:node( list )▼
▲ else
end
nav
end
|