Jump to content

Module:Message box

From Marxist Wiki
Revision as of 01:44, 13 March 2025 by Thehighwayman (talk | contribs) (Created page with "local p = {} function p.main(frame) local box = mw.html.create() :tag('table') :css('margin', '0 10%') :addClass('mw-parser-output') :addClass('mbox') local row = box:tag('tr') local imageLeftCell = row:tag('td'):addClass('mbox-image'):css('padding', '2px 0 2px 0.5em') imageLeftCell:tag('div'):css('width', '52px'):wikitext(frame.args.image or '52px|link=|alt=') local textCell = row:tag('td'):addClass('mbox-text'):css('padding'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Message box/doc

local p = {}
function p.main(frame)
	local box = mw.html.create()
	:tag('table')
	:css('margin', '0 10%')
	:addClass('mw-parser-output')
	:addClass('mbox')
	local row = box:tag('tr')
	local imageLeftCell = row:tag('td'):addClass('mbox-image'):css('padding', '2px 0 2px 0.5em')
	imageLeftCell:tag('div'):css('width', '52px'):wikitext(frame.args.image or '[[File:Lenin open arms circle.png|52px|link=|alt=]]')
	local textCell = row:tag('td'):addClass('mbox-text'):css('padding', '0.25em 0.5em')
	:css('width', '100%')
	:tag('div'):wikitext(frame.args.text)
	return tostring(box)
end
return p