diff --git a/public_html/index.php b/public_html/index.php index 40a7c0f..ba7ee55 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -65,6 +65,7 @@ if (isset($_GET['page'])) { } // check if logged in +unset($user); if (isset($_COOKIE['username'])) { if ( !isset($_SESSION['username']) ) { $_SESSION['username'] = $_COOKIE['username']; @@ -107,15 +108,21 @@ if (in_array($page, $allowed_urls)) { include 'templates/page-header.php'; include 'templates/page-menu.php'; include 'templates/block-message.php'; - include 'templates/page-sidebar.php'; + if (isset($user)) { + include 'templates/page-sidebar.php'; + } include "pages/{$page}.php"; } // the page is not in allowed urls, loading front page } else { + $error = 'The page "' . $page . '" is not found'; include 'templates/page-header.php'; include 'templates/page-menu.php'; include 'templates/block-message.php'; + if (isset($user)) { + include 'templates/page-sidebar.php'; + } include 'pages/front.php'; } include 'templates/page-footer.php'; diff --git a/public_html/static/all.css b/public_html/static/all.css index 3b35798..3c75c43 100644 --- a/public_html/static/all.css +++ b/public_html/static/all.css @@ -123,7 +123,19 @@ /* collapsing sidebar */ +.toggle-sidebar-button { + position: absolute; + top: -10px; + left: 0; + z-index: 100; + margin: 10px; + height: 22px; + width: 22px; + padding-left: 2px; + padding-top: 0px; +} .sidebar-wrapper { + position: relative; width: 275px; transition: width 0.5s ease; overflow-x: hidden; diff --git a/public_html/templates/form-login.php b/public_html/templates/form-login.php index 7d783db..3508d9c 100644 --- a/public_html/templates/form-login.php +++ b/public_html/templates/form-login.php @@ -1,17 +1,22 @@ -
Welcome to JILO!
Please enter login credentials:
Enter credentials for registration:
+ +