More languages
More actions
Tags: Replaced Rollback |
(Removing hard-coded css styles) |
||
Line 4: | Line 4: | ||
:tag('table') | :tag('table') | ||
:css('margin', '0 10%') | :css('margin', '0 10%') | ||
:addClass('mbox') | :addClass('mbox') | ||
local row = box:tag('tr') | local row = box:tag('tr') | ||
Line 14: | Line 11: | ||
:css('width', '100%') | :css('width', '100%') | ||
:tag('div'):wikitext(frame.args.text) | :tag('div'):wikitext(frame.args.text) | ||
return tostring(box) | return frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Message box/styles.css'} } .. tostring(box) | ||
end | end | ||
return p | return p |
Revision as of 22:32, 22 August 2024
local p = {}
function p.main(frame)
local box = mw.html.create()
:tag('table')
:css('margin', '0 10%')
: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 frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Message box/styles.css'} } .. tostring(box)
end
return p