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