v0.1.4 - Fixed JS & CSS & Backend

This commit is contained in:
Anders 2021-06-09 08:50:45 +02:00
parent 36640946a1
commit 29e442bb51
4 changed files with 32 additions and 2 deletions

View File

@ -18,7 +18,7 @@ if (isset($_POST['loginsubmit'])) {
if ($password->save()) {
$_SESSION['token'] = $token;
$_SESSION['name'] = $username;
header('location: ../../admin.php?login=success');
header('location: ../../Frontend/admin.php?login=success');
exit();
http_response_code(200);
} else {

View File

@ -2,4 +2,4 @@
session_start();
session_unset();
session_destroy();
header("location: ../../index.php");
header("location: ../../Frontend/index.php");

View File

@ -24,6 +24,7 @@ function editPost(id) {
return {title: title, desc: desc}
}
}).then((result) => {
if (result.isConfirmed)
$.ajax({
type: 'POST',
url: '../Backend/controller/update.php',

View File

@ -14,6 +14,13 @@
<link rel="stylesheet" type="text/css" href="Assets/CSS/pagination.min.css"/>
<link rel="stylesheet" type="text/css" href="Assets/CSS/hover.css"/>
</head>
<style>
.swiper-slide-active .blog-slider__content {
height: -webkit-fill-available;
overflow-y: auto;
height: 100%;
}
</style>
<body class="position-relative">
<nav class="layer" id="layer">
<ul>
@ -62,6 +69,7 @@
loop: true,
observer: true,
observeParents: true,
updateOnWindowResize: true,
mousewheel: {
invert: false,
},
@ -75,6 +83,27 @@
}
});
var rtime;
var timeout = false;
var delta = 200;
$(window).resize(function() {
rtime = new Date();
if (timeout === false) {
timeout = true;
setTimeout(resizeend, delta);
}
});
function resizeend() {
if (new Date() - rtime < delta) {
setTimeout(resizeend, delta);
} else {
timeout = false;
swiper.update();
swiper.updateSize();
}
}
$(document).ready(function() {
$('#layer').removeClass('showlayer');
$('#front').addClass('transform-none');