diff --git a/database/items.db b/database/items.db index 675286ef..08f2850e 100644 --- a/database/items.db +++ b/database/items.db @@ -1,11 +1,4 @@ {"name":"raw-fish","count":"2","_id":"a0TVkMwP8M99LLbp"} -{"name":"iron-ore","count":26524,"_id":"bEcyT728rLO8JvqY"} -{"name":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000iron-ore","count":8,"_id":"i6fEF857vuxZpRfw"} +{"name":"iron-ore","count":25823,"_id":"bEcyT728rLO8JvqY"} {"name":"electronic-circuit","count":200,"_id":"n3JBn8ksl9YIkCWy"} {"name":"coal","count":10406,"_id":"qnEjvk1EypjWAEQk"} -{"name":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000iron-ore","count":4,"_id":"xOe2eh4SbnodgQG2"} -{"name":"iron-ore","count":26523,"_id":"bEcyT728rLO8JvqY"} -{"name":"iron-ore","count":26522,"_id":"bEcyT728rLO8JvqY"} -{"name":"iron-ore","count":26513,"_id":"bEcyT728rLO8JvqY"} -{"name":"iron-ore","count":26423,"_id":"bEcyT728rLO8JvqY"} -{"name":"iron-ore","count":25823,"_id":"bEcyT728rLO8JvqY"} diff --git a/static/index.html b/static/index.html new file mode 100644 index 00000000..9d55d35e --- /dev/null +++ b/static/index.html @@ -0,0 +1,30 @@ + + + Clusterio + + + + + + +
+ +
+

Storage

+
+
+

Production

+
+
+
+
+

Storage

+
+
+
+
+ \ No newline at end of file diff --git a/static/main.js b/static/main.js new file mode 100644 index 00000000..d56bb0dc --- /dev/null +++ b/static/main.js @@ -0,0 +1,27 @@ + + +contents = { + "iron-plate":100, + "copper-plate":7312, +} + +function drawcontents(data) { + keys = Object.keys(data); + result = ""; + for(i = 0;i < data.length; i++) { + result = result + ""; + } + result = result + "
" + data[i].name + "" + data[i].count + "
" + document.getElementById("contents").innerHTML = result; +} +setInterval(function() { + var xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function() { + if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { + data = JSON.parse(xmlhttp.responseText); + drawcontents(data); + } + } + xmlhttp.open("GET", "inventory", true); + xmlhttp.send(); +}, 500) \ No newline at end of file diff --git a/static/style.css b/static/style.css new file mode 100644 index 00000000..010a76ea --- /dev/null +++ b/static/style.css @@ -0,0 +1,39 @@ +* { + margin:0px; +} + +#logo { + background-color: yellow; +} + +#sidenav { + position:fixed; + left:0px; + width:200px; + background-color:darkgrey; + height:100%; +} +#body { + margin-left:200px; +} +#contents table { + border: 1px solid black; +} +.button-black { + width:100%; + height:40px; + background-color:black; + color:white; + transition: all 300ms; +} +.button-black:hover { + background-color:#444; + color:yellow; + cursor:pointer; +} +.button-black * { + text-align:center; + position: relative; + top: 50%; + transform: translateY(-50%); +} \ No newline at end of file