diff --git a/clusterio_0.0.2/data.lua b/clusterio_0.0.2/data.lua index a1ae8af6..6a3fb83a 100644 --- a/clusterio_0.0.2/data.lua +++ b/clusterio_0.0.2/data.lua @@ -128,9 +128,10 @@ for k,v in pairs(data.raw.fluid) do { { type = "recipe", - name = v.name, + name = ("get-"..v.name), icon = v.icon, category = CRAFING_FLUID_CATEGORY_NAME, + --localised_name = {v.name}, energy_required = 1, subgroup = "barrel", order = "b[fill-crude-oil-barrel]", diff --git a/static/index.html b/static/index.html index ae504e47..c734eedf 100644 --- a/static/index.html +++ b/static/index.html @@ -14,10 +14,10 @@ -
+ -
+
@@ -33,6 +33,7 @@
+
\ No newline at end of file diff --git a/static/main.js b/static/main.js index 21f4256c..ed6b580e 100644 --- a/static/main.js +++ b/static/main.js @@ -3,7 +3,7 @@ contents = { "iron-plate":100, "copper-plate":7312, } - +// nice functions function djb2(str){ var hash = 5381; for (var i = 0; i < str.length; i++) { @@ -20,6 +20,7 @@ function hashColor(str) { return "#" + ("0" + r.toString(16)).substr(-2) + ("0" + g.toString(16)).substr(-2) + ("0" + b.toString(16)).substr(-2); } +// function to draw data we recieve from ajax requests function drawcontents(data) { keys = Object.keys(data); result = ""; @@ -30,6 +31,100 @@ function drawcontents(data) { document.getElementById("contents").innerHTML = result; } +// handle the navigation buttons +function display(page) { + var pages = document.querySelector("#body").childNodes; + for(i=0;i