Module:Lumatone mapping navigation
Jump to navigation
Jump to search
Documentation transcluded from /doc
Note: Do not invoke this module directly; use the corresponding template instead: Template:Lumatone mapping navigation.
Documentation transcluded from /doc
Note: Do not invoke this module directly; use the corresponding template instead: Template:Lumatone mapping navigation.
This module automatically generates a navigation bar for Lumatone mapping pages.
local p = {}
function p.main(frame)
local root_page_name = frame:preprocess("{{ROOTPAGENAME}}")
local a = root_page_name:match("[Ll]umatone%s*[Mm]apping%s*[Ff]or%s*(%d+)%s*[Ee][Dd][2Oo]")
local x = tonumber(a) or tonumber(frame.args["edo"])
local out_str = "<br /><div style=\"text-align: center;\">\n'''←''' "
.. "[[Lumatone mapping for " .. (x - 3) .. "edo|" .. (x - 3) .. "edo]] • "
.. "[[Lumatone mapping for " .. (x - 2) .. "edo|" .. (x - 2) .. "edo]] • "
.. "[[Lumatone mapping for " .. (x - 1) .. "edo|" .. (x - 1) .. "edo]] •"
.. " '''Lumatone mapping for " .. x .. "edo''' • "
.. "[[Lumatone mapping for " .. (x + 1) .. "edo|" .. (x + 1) .. "edo]] • "
.. "[[Lumatone mapping for " .. (x + 2) .. "edo|" .. (x + 2) .. "edo]] • "
.. "[[Lumatone mapping for " .. (x + 3) .. "edo|" .. (x + 3) .. "edo]] '''→'''\n"
.. "</div>"
if (string.lower(root_page_name) ~= "lumatone mapping navigation") then
out_str = out_str .. " [[Category:Lumatone mappings]] [[Category:" .. x .. "edo]]"
end
return out_str
end
return p