Module:Portal bar/sandbox: Difference between revisions

Content deleted Content added
this is failing now?
tstyles
Line 46:
local nav = mw.html.create( 'div' )
:addClass( 'portal-bar noprint metadata' )
:attr( 'role', 'navigation' )
:attr( 'aria-label' , 'Portals' )
:css( 'font-weight', 'bold' )
if yesno( args.border ) == false then
nav
:addClass('portal-bar-unbordered')
:css( 'padding', '0.3em 1.7em 0.1em' )
:css( 'font-size', '88%' )
:css( 'text-align', 'center' )
else
nav
:addClass( 'navboxportal-bar-bordered' )
:css( 'padding', '0.4em 2em' )
end
Line 131 ⟶ 127:
local list = mw.html.create( 'ul' )
:css( 'margin', '0.1em 0 0' )
for _, portal in ipairs( portals ) do
list
:tag( 'li' )
:css( 'display', 'inline-block' )
:css( 'white-space', 'nowrap' )
:tag( 'span' )
:css( 'margin', '0 0.5em' )
:wikitext( string.format(
'[[File:%s|24x21px|alt=]]', getImageName{ portal }
Line 151 ⟶ 143:
:node( list )
return tostringmw.getCurrentFrame( nav ):extensionTag{
name = 'templatestyles', args = { src = 'Module:Portal bar/styles.css' }
} .. tostring( nav )
end