Module:OOOInfoBox: Difference between revisions
No edit summary |
No edit summary |
||
| Line 115: | Line 115: | ||
local box = mw.html.create('table'):addClass('ooo-infobox') | local box = mw.html.create('table'):addClass('ooo-infobox') | ||
-- default is right via CSS; only add class when overriding | |||
local align = trim(args.align) | local align = trim(args.align) | ||
if align == 'left' then box:addClass('ooo-infobox--left') | if align == 'left' then | ||
elseif align == ' | box:addClass('ooo-infobox--left') | ||
elseif align == 'none' then | |||
box:addClass('ooo-infobox--none') | |||
elseif align == 'center' then | |||
box:addClass('ooo-infobox--center') | |||
end | |||
-- keep optional extra classes | |||
local extra_class = trim(args.class) | local extra_class = trim(args.class) | ||
if extra_class and extra_class ~= '' then | if extra_class and extra_class ~= '' then | ||