Content deleted Content added
self rv 1 edit, cc-by-sa requires this noise |
revert to old version for testing |
||
Line 5:
local p = {}
local buildNavbox = require( 'Module:Navbox' )._navbox
local getImageName = require( 'Module:Portal' ).image
local yesno = require( 'Module:Yesno' )
Line 11 ⟶ 12:
function p._main( portals, args )
if #portals < 1 then return '' end -- Don't display a blank navbox if no portals were specified.
local nav = mw.html.create( 'div' )▼
:addClass( 'noprint metadata' )▼
:css( 'text-align', 'center' )▼
:css( 'font-size', '88%' )▼
:css( 'font-weight', 'bold' )▼
:css( 'padding', '0.1em 1.7em' )▼
else▼
:css( 'margin-top', '1em' )▼
end▼
local list = mw.html.create( 'ul' )
for _, portal in ipairs( portals ) do
list
Line 41 ⟶ 22:
:wikitext( string.format( '[[File:%s|24x21px]]', getImageName{ portal } ) )
:done()
:tag( 'span' )
:wikitext( string.format( '[[Portal:%s|%s portal]]', portal, portal ) )▼
▲ :css( 'font-weight', 'bold' )
▲ :wikitext( string.format( '[[Portal:%s|%s portal]]', portal, portal ) )
▲ end
if yesno( args.border ) == false then -- Don't display a border if args.border is "no", "n", "false", 0 or false.
▲ :addClass( 'noprint metadata' )
▲ :css( 'text-align', 'center' )
▲ :css( 'font-size', '88%' )
:node( list )▼
)
▲ else
return buildNavbox{
navbar = 'off',
bodyclass = 'noprint',
list1 = tostring( list )
}
end
▲ :node( list )
▲ return tostring( nav )
end
|