Module:message box

Hello, you have come here looking for the meaning of the word Module:message box. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:message box, but we will also tell you about its etymology, its characteristics and you will know how to say Module:message box in singular and plural. Everything you need to know about the word Module:message box you have here. The definition of the word Module:message box will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:message box, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.


local html_create = mw.html.create
local tostring = tostring

local export = {}

local function make_box(tag, rows, image, header, text)
	tag = tag:addClass("noprint")
		:tag("table")
			:tag("tr")
				:tag("td")
	if rows > 1 then
		tag:attr("rowspan", rows)
	end
	tag = tag:wikitext(image)
		:done()
	if header then
		tag = tag:node(header)
			:done()
			:tag("tr")
	end
	return tostring(tag:tag("td")
		:wikitext(text)
		:allDone()) ..
		require("Module:TemplateStyles")("Module:message box/styles.css")
end

function export.maintenance(color, image, title, text)
	local div = html_create("div")
		:addClass("maintenance-box")
		:addClass("maintenance-box-" .. color)
	local header = html_create("th")
		:css("text-align", "left")
		:wikitext(title)
	return make_box(div, 2, image, header, text)
end

function export.request(image, text)
	local div = html_create("div")
		:addClass("request-box")
	return make_box(div, 1, image, nil, text)
end

return export