Anonymous

Module:Equipment/Recommended: Difference between revisions

From Melvor Idle
m
padding icon instead
m (bit more padding)
m (padding icon instead)
Line 39: Line 39:
local function make_row(slot, data)
local function make_row(slot, data)
local tr = mw.html.create('tr')
local tr = mw.html.create('tr')
tr:tag('td'):wikitext(string.format('[[File:%s.png|%s|link=%s|36px]]', slot.icon, slot.txt, slot.link))
tr:tag('td'):attr('style', 'padding-bottom: 4px;'):wikitext(string.format('[[File:%s.png|%s|link=%s|36px]]', slot.icon, slot.txt, slot.link))
for _, v in ipairs(data) do
for _, v in ipairs(data) do
local itemicon = icons.Icon({v, img=v, type='item'})
local itemicon = icons.Icon({v, img=v, type='item'})
tr:tag('td'):attr('style', 'padding-left: 12px; padding-bottom: 4px;'):wikitext(itemicon)
tr:tag('td'):attr('style', 'padding-left: 12px;'):wikitext(itemicon)
end
end
892

edits