Module:Portal: Difference between revisions

Content deleted Content added
add Book talk to list of banned namespaces
per tper
Line 43:
 
local trackingEnabled = true
 
local templatestyles = 'Module:Portal/styles.css'
 
-- Check whether to do tracking in this namespace
Line 132 ⟶ 134:
:addClass('noprint portal plainlist')
:addClass(args.left and 'tleft' or 'tright')
:css('margin', args.margin or (args.left == 'yes' and '0.5em 1em 0.5em 0') or '0.5em 0 0.5em 1em'nil)
:css('border', 'solid #aaa 1px')
:newline()
 
Line 199 ⟶ 200:
-- Start the list. This corresponds to the start of the wikitext table in the old [[Template:Portal]].
local listroot = root:tag('ul')
:css('display', 'table')
:css('box-sizing', 'border-box')
:css('padding', '0.1em')
:css('max-width', '175px')
:css('width', type(args.boxsize) == 'string' and (args.boxsize .. 'px') or nil)
:css('background', '#f9f9f9')
:css('font-size', '85%')
:css('line-height', '110%')
:css('font-style', 'italic')
:css('font-weight', 'bold')
 
-- Display the portals specified in the positional arguments.
Line 218 ⟶ 210:
:newline()
:tag('li')
:css('display', 'table-row')
:tag('span')
:css('display', 'table-cell')
:css('padding', '0.2em')
:css('vertical-align', 'middle')
:css('text-align', 'center')
:wikitext(string.format('[[File:%s|32x28px|class=noviewer]]', image))
:done()
:tag('span')
:css('display', 'table-cell')
:css('padding', '0.2em 0.2em 0.2em 0.3em')
:css('vertical-align', 'middle')
:wikitext(string.format('[[Portal:%s|%s%sportal]]', portal, portal, args['break'] and '<br />' or ' '))
end
Line 335 ⟶ 319:
end
end
return p[funcName](processPortalArgs(args)) -- passes two tables to func: an array of portal names, and a table of named arguments.
local results = ''
if funcName == '_portal' or funcName == '_displayAll' then
results = frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles} }
end
return results .. p[funcName](processPortalArgs(args)) -- passes two tables to func: an array of portal names, and a table of named arguments.
end
end