Module:GalleryTable

local p = {} function p.test1(frame) local monsterdata = mw.loadData("Module:MonsterData")

rangeLower = tonumber(frame.args[1]) rangeUpper = tonumber(frame.args[2])

table = mw.html.create("table") :css("width", "100%") :css("text-align", "center")

row = table:tag("tr")

for x = rangeLower, rangeUpper do       id = tostring(x) if monsterdata[id] then name = monsterdata[id].name display = "No. " .. id

row :tag("td") :tag("div") :css("display", "inline-block") :css("position", "relative") :css("width", "60px") :css("height", "60px") :css("margin", "0 0 20px") :tag("span") :addClass("imtip suppress") :attr("data-imtip", display .. " " .. name) :wikitext("") :done :tag("div") :css("font-size", "10.8px") :css("line-height", "16.8px") :css("position", "absolute") :css("width", "100%") :css("text-align", "center") :css("bottom", "-28%") :css("height", "28%") :css("color", "white") :css("font-weight", "bold") :css("background-color", "black") :wikitext(display) :done :done :done

else row :tag("td") :wikitext("") :done end

if x % 10 == 0 then row :done row = table:tag("tr") end end

return tostring(table) end return p