diff --git a/webapp/app/views/register.py b/webapp/app/views/register.py index b56fabe..964c1c8 100644 --- a/webapp/app/views/register.py +++ b/webapp/app/views/register.py @@ -46,7 +46,6 @@ def login(): if request.method == "POST": data = request.form.to_dict() - #responsare = get_token(data) pigapi = api() code,responsare = pigapi.get_token(payload=data) diff --git a/webapp/app/views/static/assets/css/navbar.css b/webapp/app/views/static/assets/css/navbar.css index cd4adac..23d2e6c 100644 --- a/webapp/app/views/static/assets/css/navbar.css +++ b/webapp/app/views/static/assets/css/navbar.css @@ -138,49 +138,60 @@ a { height: 100vh; } -@media screen and (min-width: 768px) { +@media screen and (min-width: 701px) { body { margin: calc(var(--header-height) + 1rem) 0 0 0; padding-left: calc(var(--nav-width) + 2rem); } -} -@media screen and (min-width: 768px) { .header { height: calc(var(--header-height) + 1rem); padding: 0 2rem 0 calc(var(--nav-width) + 2rem); } -} - -@media screen and (min-width: 768px) { .header_img { width: 40px; height: 40px; } -} - -@media screen and (min-width: 768px) { .header_img img { width: 45px; } -} - -@media screen and (min-width: 768px) { .l-navbar { left: 0; padding: 1rem 1rem 0 0; } -} - -@media screen and (min-width: 768px) { .show-nav { width: calc(var(--nav-width) + 156px); } + .body-pd { + padding-left: calc(var(--nav-width) + 188px); + } } +@media screen and (max-width: 700px) { + body { + margin: calc(var(--header-height) + 1rem) 0 0 0; + padding-left: calc(var(--nav-width) + 2rem); + } -@media screen and (min-width: 768px) { + .header { + height: calc(var(--header-height) + 0.5rem); + padding: 0 2rem 0 calc(var(--nav-width) + 2rem); + } + .header_img { + width: 40px; + height: 40px; + } + .header_img img { + width: 45px; + } + .l-navbar { + left: 0; + padding: 1rem 1rem 0 0; + } + .show-nav { + width: calc(var(--nav-width) + 110px); + } .body-pd { - padding-left: calc(var(--nav-width) + 188px); + padding-left: calc(var(--nav-width) + 120px); } } diff --git a/webapp/app/views/static/assets/js/footer.js b/webapp/app/views/static/assets/js/footer.js index f401b47..91aed71 100644 --- a/webapp/app/views/static/assets/js/footer.js +++ b/webapp/app/views/static/assets/js/footer.js @@ -1,6 +1,6 @@ document.addEventListener("DOMContentLoaded", function() { - const currentVersion = "v1.3" + const currentVersion = "v1.4" const owner = 'k3nd0x' const repo = 'piglet' const p_version = document.getElementById('version') @@ -9,7 +9,7 @@ document.addEventListener("DOMContentLoaded", function() { .then(data => { const latestVersion = data.tag_name; // Assumes the version is stored in the tag_name field if (currentVersion !== latestVersion) { - p_version.textContent = `New Version available at Github '${latestVersion}'`; + p_version.textContent = `Piglet - Version ${currentVersion} - Newer version available at Github '${latestVersion}'`; } else { p_version.textContent = `Piglet - Version ${currentVersion}`; } diff --git a/webapp/app/views/static/assets/js/lightswitch.js b/webapp/app/views/static/assets/js/lightswitch.js index 2db15e0..732eeaa 100644 --- a/webapp/app/views/static/assets/js/lightswitch.js +++ b/webapp/app/views/static/assets/js/lightswitch.js @@ -2,12 +2,15 @@ const body = document.body; let header = null; let table = null; + let icon = null; try { header = document.getElementById('header'); table = document.getElementsByClassName('table-piglet') + icon = document.getElementById('switch-icon') } catch (error) { header = null; table = null; + icon = null; } const html = document.documentElement; @@ -22,12 +25,16 @@ for (var i = 0; i < table.length; i++) { table[i].classList.add('table-dark') } + icon.classList.remove('bx-moon') + icon.classList.add('bx-sun') } else if ( theme === "dark") { for (var i = 0; i < table.length; i++) { table[i].classList.remove('table-dark') } localStorage.setItem("theme", 'light') html.removeAttribute('data-bs-theme') + icon.classList.remove('bx-sun') + icon.classList.add('bx-moon') } } try { @@ -38,7 +45,6 @@ const theme = localStorage.getItem("theme") || "light" if ( theme == "dark"){ body.classList.toggle("dark") - if (header !== null ) { header.classList.toggle("dark") } @@ -46,11 +52,15 @@ for (var i = 0; i < table.length; i++) { table[i].classList.add('table-dark') } + icon.classList.remove('bx-moon') + icon.classList.add('bx-sun') + } else { for (var i = 0; i < table.length; i++) { table[i].classList.remove('table-dark') } html.removeAttribute('data-bs-theme') - + icon.classList.remove('bx-sun') + icon.classList.add('bx-moon') } }); \ No newline at end of file diff --git a/webapp/app/views/templates/navbar.html b/webapp/app/views/templates/navbar.html index 17e7a3b..ddeb68c 100644 --- a/webapp/app/views/templates/navbar.html +++ b/webapp/app/views/templates/navbar.html @@ -79,8 +79,8 @@
- - + +