diff --git a/public/js/main.js b/public/js/main.js index b2c83ea..a4cf979 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,11 +1,11 @@ window.addEventListener('resize', function() { var logo_full = document.getElementById("logo_full") var logo_small = document.getElementById("logo_small") - var smallbtn0 = document.getElementById("smallbtn0") - var smallbtn2 = document.getElementById("smallbtn2") - var smallbtn3 = document.getElementById("smallbtn3") - var smallbtn1 = document.getElementById("smallbtn4") - var smallbtn5 = document.getElementById("smallbtn5") + var BuildBtn = document.getElementById("smallbtn0") + var ProfileBtn = document.getElementById("smallbtn2") + var SettingsBtn = document.getElementById("smallbtn3") + var CatalogBtn = document.getElementById("smallbtn4") + var GameBtn = document.getElementById("smallbtn5") var navbarusername = document.getElementById("navbarusername") var viewport_width = window.innerWidth; if (viewport_width < 900) { @@ -16,39 +16,38 @@ window.addEventListener('resize', function() { logo_full.className = ""; } if (viewport_width < 730) { - smallbtn2.className = "invisible"; - smallbtn3.className = "invisible"; + BuildBtn.className = "invisible"; + CatalogBtn.className = "invisible"; } else { - smallbtn2.className = "navbarbutton"; - smallbtn3.className = "navbarbutton"; + BuildBtn.className = "navbarbutton"; + CatalogBtn.className = "navbarbutton"; } if (viewport_width < 564 ) { - smallbtn0.className = "invisible"; - smallbtn1.className = "invisible"; + GameBtn.className = "invisible"; + ProfileBtn.className = "invisible"; } else { - smallbtn0.className = "navbarbutton"; - smallbtn1.className = "navbarbutton"; + GameBtn.className = "navbarbutton"; + ProfileBtn.className = "navbarbutton"; } if (viewport_width < 400) { - smallbtn5.className = "invisible"; + SettingsBtn.className = "invisible"; } else { - smallbtn5.className = "navbarbutton"; + SettingsBtn.className = "navbarbutton"; } if (viewport_width < 360) { navbarusername.className = "invisible"; } else { navbarusername.className = "nonbolded"; } - }); window.onload = function() { var logo_full = document.getElementById("logo_full") var logo_small = document.getElementById("logo_small") - var smallbtn0 = document.getElementById("smallbtn0") - var smallbtn2 = document.getElementById("smallbtn2") - var smallbtn3 = document.getElementById("smallbtn3") - var smallbtn1 = document.getElementById("smallbtn4") - var smallbtn5 = document.getElementById("smallbtn5") + var BuildBtn = document.getElementById("smallbtn0") + var ProfileBtn = document.getElementById("smallbtn2") + var SettingsBtn = document.getElementById("smallbtn3") + var CatalogBtn = document.getElementById("smallbtn4") + var GameBtn = document.getElementById("smallbtn5") var navbarusername = document.getElementById("navbarusername") var viewport_width = window.innerWidth; if (viewport_width < 900) { @@ -59,23 +58,23 @@ window.onload = function() { logo_full.className = ""; } if (viewport_width < 730) { - smallbtn2.className = "invisible"; - smallbtn3.className = "invisible"; + BuildBtn.className = "invisible"; + CatalogBtn.className = "invisible"; } else { - smallbtn2.className = "navbarbutton"; - smallbtn3.className = "navbarbutton"; + BuildBtn.className = "navbarbutton"; + CatalogBtn.className = "navbarbutton"; } - if (viewport_width < 564) { - smallbtn0.className = "invisible"; - smallbtn1.className = "invisible"; + if (viewport_width < 564 ) { + GameBtn.className = "invisible"; + ProfileBtn.className = "invisible"; } else { - smallbtn0.className = "navbarbutton"; - smallbtn1.className = "navbarbutton"; + GameBtn.className = "navbarbutton"; + ProfileBtn.className = "navbarbutton"; } if (viewport_width < 400) { - smallbtn5.className = "invisible"; + SettingsBtn.className = "invisible"; } else { - smallbtn5.className = "navbarbutton"; + SettingsBtn.className = "navbarbutton"; } if (viewport_width < 360) { navbarusername.className = "invisible";