Module:message box
- l`rby@
- Asturianu
- Az@rbaycanca
- baaNlaa
- Min Nan Yu / Ban-lam-gi
- Belaruskaia
- B'lgarski
- Eesti
- frsy
- Gaidhlig
- gujraatii
- hangugeo
- hindii
- Hornjoserbsce
- Bahasa Indonesia
- Italiano
- `bryt
- Jawa
- Latina
- Magyar
- Makedonski
- bhaasaamn
- Bahasa Melayu
- nepaalii
- Ri Ben Yu
- odd'iaa
- Portugues
- siNhl
- Simple English
- sndhy
- Slovenscina
- khwrdy
- Srpski / srpski
- Tagalog
- tmilll
- aithy
- rdw
- Tieng Viet
- Zhong Wen
Appearance
From Wiktionary, the free dictionary
- This module lacks a documentation subpage. Please create it.
- Useful links: subpage list * links * transclusions * testcases * sandbox
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
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