htmlcss

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

-- <nowiki>
local p = {}

local data = mw.loadData("Module:Status/data");
local title = mw.title.getCurrentTitle();

function p.status(frame)
    local s = frame:getParent().args[1] or "";
    local a = string.sub(s, 1, 1)
    local b = string.sub(s, 2) or ""
    local temp = mw.ustring.upper(a) .. b
    local status = nil
    local key = ""
    if data[temp] and temp then
        key = temp
        status = data[temp]
    else
        key = "Unknown"
        status = data["Unknown"]
    end
    local html = status.html
    local cat = status.cat
    if cat and title.namespace == 0 then
        html = "[[:Category:" .. cat .. "|" .. html .. "]][[Category:" .. cat .. "]]"
    end
    return html
end

return p