From ffd2b09b25c61b285169557b93277e7c1476cd4f Mon Sep 17 00:00:00 2001 From: Choom Date: Tue, 13 Dec 2022 03:13:00 -0300 Subject: Barra superior para móviles Barra superior para móviles Barra superior para móviles --- static/js/home.js | 2 +- static/js/weabot.js | 42 +++++++++++++++++++++++++++++++++++++++++- static/js/weabotxt.js | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) (limited to 'static/js') diff --git a/static/js/home.js b/static/js/home.js index f670ce1..32ade31 100644 --- a/static/js/home.js +++ b/static/js/home.js @@ -1,4 +1,4 @@ -console.log("%c¡Es calidad BaI!", "font-size: 50px; font-weight: bold;"); +console.log("%c¡Es calidad BaI!", "font-size: 32px; font-weight: bold;"); function set_stylesheet(styletitle) { opcs.style = styletitle; diff --git a/static/js/weabot.js b/static/js/weabot.js index 3371437..1bab0f6 100644 --- a/static/js/weabot.js +++ b/static/js/weabot.js @@ -266,7 +266,8 @@ document.addEventListener("DOMContentLoaded", function(e) { weabot = { name: null, email: null, password: null }; } - var a = document.getElementById("main_nav").getElementsByTagName("a"); + var head = document.getElementById("main_nav"); + var a = head.getElementsByTagName("a"); for (var i = 0; i < a.length; i++) { if (a[i].getAttribute("href") == "/" + board + "/") { a[i].className = "cur_brd"; @@ -274,6 +275,45 @@ document.addEventListener("DOMContentLoaded", function(e) { } } + if (document.body.clientWidth < 600) { + var navlink = head.getElementsByTagName("a"); + + var sel = document.createElement("select"); + sel.id = head.id + "_sel"; + sel.addEventListener("change", function(e){ + window.location.href = this.value; + }); + + for (var i=1; i