Refactored into pyShelf.ts.

This commit is contained in:
th3r00t
2023-11-04 23:43:32 -04:00
parent d1e095b871
commit fa33977e83
3 changed files with 6 additions and 22 deletions

View File

@@ -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();
});
});

View File

@@ -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();

View File

@@ -5,7 +5,7 @@
<link href="{{ url_for('static', path='styles/pyShelf.css') }}" rel="stylesheet">
<link href="{{ url_for('static', path='styles/bulma.css') }}" rel="stylesheet">
<script src="{{ url_for('static', path='script/jquery-3.6.1.js') }}" rel="script"></script>
<script src="{{ url_for('static', path='script/bulma-helper.js') }}" rel="script"></script>
<!-- <script src="{{ url_for('static', path='script/bulma-helper.js') }}" rel="script"></script> -->
<script src="{{ url_for('static', path='script/pyshelf.js') }}" rel="script"></script>
</head>
<body>