Module:Stygies

-- -- Render Main Page Box with fancy technology because why not! -- author: Rail  -- local p = {}

function p.render( frame ) local params = frame:getParent.args local div = mw.html.create( 'div' ):addClass( 'mp-box' )

if params.class then div:addClass( params.class ) end

if params.boxbkgnd or params.boxcolor or params.boxborder then local style = {}

if params.boxbkgnd then table.insert( style, 'background-color:' .. params.boxbkgnd .. ';' ) end if params.boxcolor then table.insert( style, 'color:' .. params.boxcolor .. ';' ) end if params.boxborder then table.insert( style, 'border-bottom:' .. params.boxborder .. ';' ) end

div:attr( 'style', table.concat( style ) ) end

div:wikitext( params[1] ) return tostring( div ) end

return p