Module:CraftSearch

local p = {} function p.getdata local craftdata = mw.loadData("Module:CraftData") local craftName = mw.loadData("Module:LocaleData/DCName") local crafts = mw.html.create("div") :attr("id", "craftData") :css("display", "flex") :css("flex-wrap", "wrap") for _, data in pairs(craftdata) do       crafts:tag("div") :css("display", "inline") :css("margin", "3px") :css("order", data.dcid) :attr("data-dcid", data.dcid) :attr("data-star", data.star) :attr("data-race", data.race) :attr("data-attr", data.attr) :attr("data-mode", data.mode) :attr("data-charge", data.charge) :attr("data-skill", data.skill) :attr("data-dw", data.dw) :tag("div") :css('display', 'inline-block') :css('position', 'relative') :css('width', '60px') :css('height', '60px') :css('margin', '0 0 8.4px') :wikitext("") :tag("span") :addClass("monsterLv") :css('font-size', '10.8px') :css('line-height', '16.8px') :css('white-space', 'nowrap') :wikitext("No. " .. data.dcid) :done :done :done end return tostring(crafts) end

return p