Module:Box: Difference between revisions

Want an adless experience? Log in or Create an account.
add class parameter
(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:
--  content (or [1]) (required)
--  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