View source for Module:Icon
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- This module implements [[Template:Icon]].
require("Module:No globals")
local DATA_MODULE = 'Module:Icon/data'
local p = {}
function p._main(args, data)
data = data or mw.loadData(DATA_MODULE)
local code = args.class or args[1]
local iconData
if code then
code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case
iconData = data[code]
end
if not iconData then
iconData = data._DEFAULT
end
return string.format(
'[[File:%s%s%s|%s|class=noviewer]]',
000
1:0
Template used on this page:
Return to Module:Icon.