mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Setup to handle book objects from sqlalchemy.
This commit is contained in:
21
src/frontend/static/script/pyshelf.js
Normal file
21
src/frontend/static/script/pyshelf.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user