diff --git a/app/components/Navbar.php b/app/components/Navbar.php index 935bcdefab9e412e1c306c218ad0634d3119408a..87137ac9c556312c6b1e1dfaa937e1ed083da651 100644 --- a/app/components/Navbar.php +++ b/app/components/Navbar.php @@ -39,9 +39,16 @@ <?php endif;?> <?php endif;?> </ul> - <form method="POST" - action="/../user/logout" > - <input class="section" type="submit" value="Log Out"> </input> - </form> + <?php if(isset($_SESSION['username'])):?> + <form method="POST" + action="/../user/logout" > + <input class="section" type="submit" value="Log Out"> </input> + </form> + <?php else : ?> + <form method="GET" + action="/../user/login" > + <input class="section login" type="submit" id ="login" value="Log In"> </input> + </form> + <?php endif;?> </div> </nav> diff --git a/app/public/styles/template/navbar.css b/app/public/styles/template/navbar.css index 04b2a3764557808afd9a0bb4e01aad90eb835147..ff0cfc00b3174dceb5c842bea18c7d89192a90ce 100644 --- a/app/public/styles/template/navbar.css +++ b/app/public/styles/template/navbar.css @@ -139,7 +139,10 @@ label #btn { align-items: center; text-decoration: none; } - +.login{ + background-color: white!important; + color:teal!important; +} .section .title { display: flex; text-align: center;