Content deleted Content added
didn't work, so revert for now |
updates requested by User:The Mol Man |
||
Line 8:
end
local args = getArgs(frame, {wrappers = 'Template:Babel'})
local
:addClass('userboxes')
:css( {
local table_styling = {▼
border = (bordercolor or '#99B3FF') .. ' solid ' .. (args.solid or 1)..'px'
} )
for _,v in ipairs(table_styling) do▼
if args.shadow and string.lower(args.shadow) == 'yes' then
end
local color = args.color or 'inherit'
local row1 =
local row2 =
local row3 =
local header = args.header or '[[Wikipedia:Babel]]'▼
local footer = args.footer or '[[:Category:Wikipedians by language|Search user languages]]'▼
:css('background-color',color)▼
:css('text-align','center')▼
:attr('colspan','10')▼
:css('background-color',color)▼
:css('text-align','center')▼
:attr('colspan','10')▼
▲ local body_cells = mw.html.create('td')
:css('vertical-align', 'middle !important')
local userboxes
-- Special message for when first argument is blank; otherwise treat it as normal
if args[1] and args[1]:find('%S') then
userboxes = frame:preprocess('{{User '..args[1]..'}}')
Line 71 ⟶ 44:
userboxes = args.noboxestext or "''You haven't set up any languages. Please see [[Template:Babel/doc]] for help.''"
end
body_cells:wikitext(userboxes)▼
-- "remove" args[1] so it isn't looked at in the loop
-- table.remove(args,1) doesn't produce desired result
args[1] = ''
-- Keep track of how many columns are in this table
-- ! indicates a new cell should be created
if v:find('%S') and v ~= '!' then
-- Recycling body_cells for <td>
elseif v and v == '!' then
col_span = col_span + 1
body_cells:done()
body_cells = row2:tag('td')
end
end
row1:tag('th')
row3:tag('td')
▲
if args['special-boxes'] then
end
body_cells:done()
▲ body_cells:wikitext(userboxes)
▲ :node(row2)
▲ :node(row3)
▲ return tostring(table_tag)
end
|