Content deleted Content added
single related boolean |
better implementation of nbsp |
||
(19 intermediate revisions by 4 users not shown) | |||
Line 1:
-- This module implements {{portal bar}}.
require('
-- determine whether we're being called from a sandbox
Line 49:
end
local
header:addClass(sandboxVersion('portal-bar-header'))▼
nav:addClass(sandboxVersion('portal-bar-related'))
else
▲ if not isRelated then
header:wikitext('[[Wikipedia:Contents/Portals|Portal]]')
if #portals > 1 then
Line 59 ⟶ 61:
header:wikitext(':')
end
local container = nav:tag('
container:addClass(sandboxVersion('portal-bar-content'))
if related then
local size = isRelated and '33x30px' or '21x19px'▼
end
for _, portal in ipairs( portals ) do
container
:tag( '
:addClass(sandboxVersion('portal-bar-item'
▲ :addClass(sandboxVersion('portal-bar-logo'..related))
▲ '[[File:%s|%s]]', getImageName(portal,true), size
▲ :tag('span')
▲ :addClass(sandboxVersion('portal-bar-link'..related))
▲ :wikitext( string.format('[[Portal:%s|%s]]', portal, portal))
end
|