From fa33977e837f1ad3609d18bd6cf66df40c6dbce2 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Sat, 4 Nov 2023 23:43:32 -0400 Subject: [PATCH] Refactored into pyShelf.ts. --- src/frontend/static/script/pyshelf.js | 21 --------------------- src/frontend/static/script/pyshelf.ts | 5 +++++ src/frontend/templates/header.html | 2 +- 3 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 src/frontend/static/script/pyshelf.js diff --git a/src/frontend/static/script/pyshelf.js b/src/frontend/static/script/pyshelf.js deleted file mode 100644 index 84b87dc..0000000 --- a/src/frontend/static/script/pyshelf.js +++ /dev/null @@ -1,21 +0,0 @@ -function getScreenSize() { - return { - width: window.innerWidth, - height: window.innerHeight - }; -} -function sizeMaster() { - var size = getScreenSize(); - var navbar = $('#navbar-main').height(); - var footer = $('#footer-main').height(); - var master = $('#master').height(size.height - navbar - footer); -} -$(document).ready(function () { - // Get the current URL - var url = window.location.href; - // Get the last part of the URL - sizeMaster(); - $(window).on('resize', function () { - sizeMaster(); - }); -}); diff --git a/src/frontend/static/script/pyshelf.ts b/src/frontend/static/script/pyshelf.ts index c119ca8..441834e 100644 --- a/src/frontend/static/script/pyshelf.ts +++ b/src/frontend/static/script/pyshelf.ts @@ -15,7 +15,12 @@ function sizeMaster() { $(document).ready(function() { // Get the current URL var url = window.location.href; + console.log(url); // Get the last part of the URL + $(".navbar-burger").click(function(){ + $(".navbar-burger").toggleClass("is-active"); + $(".navbar-menu").toggleClass("is-active"); + }); sizeMaster(); $(window).on('resize', function() { sizeMaster(); diff --git a/src/frontend/templates/header.html b/src/frontend/templates/header.html index a1d628b..7f1304f 100644 --- a/src/frontend/templates/header.html +++ b/src/frontend/templates/header.html @@ -5,7 +5,7 @@ - +