17,230
edits
(output content so subclasses can do what they want with it. I'll need to add content support to the base Box functions later.) |
(add class parameter) |
||
Line 1: | Line 1: | ||
-- This is the base module for creating boxes with common styling. | -- This is the base module for creating boxes with common styling. | ||
-- invoker args: | -- invoker args: | ||
-- | -- class | ||
-- align ('left', 'right', 'center') | -- align ('left', 'right', 'center') | ||
-- width (e.g. '250px') | -- width (e.g. '250px') | ||
Line 31: | Line 31: | ||
local box = mw.html.create( 'div' ) | local box = mw.html.create( 'div' ) | ||
:addClass( dark and 'darkbox' or 'box' ) | :addClass( dark and 'darkbox' or 'box' ) | ||
:addClass( args.class ) | |||
-- box styles | -- box styles |