Module:Item interaction: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "local p = {} function p.main(frame) local args = frame.args local itemName = args.item or '' local image = string.format('link=%s', itemName, itemName) local description = args.desc or '' return tostring(p.row(itemName, image, description)) end function p.row(name, image, description) return mw.html.create('tr') :css('text-align','center') :tag('td') :addClass('inventory-image') :wikitext(image) :done() :tag...") |
(No difference)
|
Latest revision as of 00:12, 17 October 2024
Documentation for this module may be created at Module:Item interaction/doc
local p = {}
function p.main(frame)
local args = frame.args
local itemName = args.item or ''
local image = string.format('[[File:%s.png|link=%s]]', itemName, itemName)
local description = args.desc or ''
return tostring(p.row(itemName, image, description))
end
function p.row(name, image, description)
return mw.html.create('tr')
:css('text-align','center')
:tag('td')
:addClass('inventory-image')
:wikitext(image)
:done()
:tag('td')
:css('text-align','left')
:addClass('item-col')
:wikitext(itemName)
:done()
:tag('td')
:wikitext(description)
:done()
end
return p