mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Refactored into pyShelf.ts.
This commit is contained in:
@@ -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();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
5
src/frontend/static/script/pyshelf.ts
vendored
5
src/frontend/static/script/pyshelf.ts
vendored
@@ -15,7 +15,12 @@ function sizeMaster() {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Get the current URL
|
// Get the current URL
|
||||||
var url = window.location.href;
|
var url = window.location.href;
|
||||||
|
console.log(url);
|
||||||
// Get the last part of the URL
|
// Get the last part of the URL
|
||||||
|
$(".navbar-burger").click(function(){
|
||||||
|
$(".navbar-burger").toggleClass("is-active");
|
||||||
|
$(".navbar-menu").toggleClass("is-active");
|
||||||
|
});
|
||||||
sizeMaster();
|
sizeMaster();
|
||||||
$(window).on('resize', function() {
|
$(window).on('resize', function() {
|
||||||
sizeMaster();
|
sizeMaster();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<link href="{{ url_for('static', path='styles/pyShelf.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', path='styles/pyShelf.css') }}" rel="stylesheet">
|
||||||
<link href="{{ url_for('static', path='styles/bulma.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/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>
|
<script src="{{ url_for('static', path='script/pyshelf.js') }}" rel="script"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user