Content deleted Content added
allow turnoff of header |
better implementation of nbsp |
||
(20 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
if related then
header:addClass(sandboxVersion('portal-bar-header'))▼
else
header:wikitext('[[Wikipedia:Contents/Portals|Portal]]')
if #portals > 1 then
Line 58 ⟶ 61:
header:wikitext(':')
end
local container = nav:tag('
container:addClass(sandboxVersion('portal-bar-content'))
if related then
local size = args.size or '21x19px'▼
end
for _, portal in ipairs( portals ) do
container
:tag( '
:addClass(sandboxVersion('portal-bar-item'))
▲ :addClass(sandboxVersion('portal-bar-logo'))
▲ '[[File:%s|%s]]', getImageName(portal,true), size
▲ :tag('span')
▲ :addClass(sandboxVersion('portal-bar-link'))
▲ :wikitext( string.format('[[Portal:%s|%s]]', portal, portal))
end
|