Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Message box: Difference between revisions

From ProleWiki, the proletarian encyclopedia
mNo edit summary
(Adding mw-parser-output class to element so that TemplateStyles can affect it)
 
(10 intermediate revisions by 2 users not shown)
Line 4: Line 4:
:tag('table')
:tag('table')
:css('margin', '0 10%')
:css('margin', '0 10%')
:css('border', '1px solid #a2a9b1')
:addClass('mw-parser-output')
:css('background-color', '#fbfbfb')
:css('border-left', '10px solid #b50014')
:addClass('mbox')
:addClass('mbox')
local row = box:tag('tr')
local row = box:tag('tr')
local imageLeftCell = row:tag('td'):addClass('mbox-image')
local imageLeftCell = row:tag('td'):addClass('mbox-image'):css('padding', '2px 0 2px 0.5em')
imageLeftCell:tag('div'):css('width', '52px')
imageLeftCell:tag('div'):css('width', '52px'):wikitext(frame.args.image or '[[File:Lenin open arms circle.png|52px|link=|alt=]]')
imageLeftCell:wikitext('[[File:Lenin open arms circle.png|52px|link=|alt=]]')
local textCell = row:tag('td'):addClass('mbox-text'):css('padding', '0.25em 0.5em')
local textCell = row:tag('td'):addClass('mbox-text')
:wikitext(frame.args.text)
:css('width', '100%')
:css('width', '100%')
:tag('div'):wikitext(frame.args.text)
return tostring(box)
return tostring(box)
end
end
return p
return p

Latest revision as of 13:02, 26 August 2024

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