Module:Portal bar/sandbox: Difference between revisions

Content deleted Content added
allow turnoff of header
single related boolean
Line 51:
local header = nav:tag('span')
header:addClass(sandboxVersion('portal-bar-header'))
iflocal notisRelated = yesno(args.noheaderrelated) then
if not isRelated then
header:wikitext('[[Wikipedia:Contents/Portals|Portal]]')
if #portals > 1 then
Line 60 ⟶ 61:
local container = nav:tag('div')
container:addClass(sandboxVersion('portal-bar-content'))
local size = args.sizeisRelated and '33x30px' or '21x19px'
local related = isRelated and '-related' or ''
for _, portal in ipairs( portals ) do
container
:tag( 'div' )
:addClass(sandboxVersion('portal-bar-item'..related))
:tag( 'span' )
:addClass(sandboxVersion('portal-bar-logo'..related))
:wikitext( string.format(
'[[File:%s|%s]]', getImageName(portal,true), size
Line 72 ⟶ 74:
:done()
:tag('span')
:addClass(sandboxVersion('portal-bar-link'..related))
:wikitext( string.format('[[Portal:%s|%s]]', portal, portal))
end