Commit 2ce3de2d authored by Administrator's avatar Administrator

Update 2 files via Son of Anton

parent 59e1896c
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<?php <?php
$__session = \App\Core\App::getInstance()->session(); $__session = \App\Core\App::getInstance()->session();
$__alerts = $__session->flash('_alerts') ?? []; $__alerts = $__session->getFlash('_alerts') ?? [];
?> ?>
<?php if (!empty($__alerts)): ?> <?php if (!empty($__alerts)): ?>
<?php foreach ($__alerts as $__alert): ?> <?php foreach ($__alerts as $__alert): ?>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!-- Alerts --> <!-- Alerts -->
<?php <?php
$__session = \App\Core\App::getInstance()->session(); $__session = \App\Core\App::getInstance()->session();
$__alerts = $__session->flash('_alerts') ?? []; $__alerts = $__session->getFlash('_alerts') ?? [];
?> ?>
<?php if (!empty($__alerts)): ?> <?php if (!empty($__alerts)): ?>
<div style="padding:15px 25px 0;"> <div style="padding:15px 25px 0;">
...@@ -91,7 +91,6 @@ ...@@ -91,7 +91,6 @@
overlay.addEventListener('click', closeSidebar); overlay.addEventListener('click', closeSidebar);
} }
// Close sidebar on link click (mobile)
var sidebarLinks = sidebar ? sidebar.querySelectorAll('.sidebar-link') : []; var sidebarLinks = sidebar ? sidebar.querySelectorAll('.sidebar-link') : [];
sidebarLinks.forEach(function(link) { sidebarLinks.forEach(function(link) {
link.addEventListener('click', function() { link.addEventListener('click', function() {
...@@ -101,12 +100,10 @@ ...@@ -101,12 +100,10 @@
}); });
}); });
// Close on Escape
document.addEventListener('keydown', function(e) { document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') closeSidebar(); if (e.key === 'Escape') closeSidebar();
}); });
// Close sidebar if window resizes above mobile
window.addEventListener('resize', function() { window.addEventListener('resize', function() {
if (window.innerWidth > 768) { if (window.innerWidth > 768) {
closeSidebar(); closeSidebar();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment