new responsive nav

This commit is contained in:
Tim Krehan 2019-05-23 11:58:26 +02:00
parent 996c00307f
commit 7592bc4fa3
4 changed files with 47 additions and 21 deletions

View file

@ -1,11 +1,6 @@
<?php <?php
$CONFIG = array ( $CONFIG = array (
'installed' => true, 'installed' => false,
'host' => 'localhost',
'username' => 'shoppinglist',
'passwd' => 'Erfolg100%',
'database' => 'shoppinglist',
'theme' => 'default',
); );
?> ?>

View file

@ -1,16 +1,47 @@
<nav class="navbar navbar-inverse bg-secondary rounded-bottom fixed-top"> <nav class="navbar navbar-expand-sm navbar-dark bg-dark rounded-bottom fixed-top">
<div class="container-fluid"> <a class="navbar-brand" href="/">
<i class="fas fa-check-square w-auto"></i>
ShoppingList
</a>
<ul class="nav navbar-left"> <button class="navbar-toggler float-right" type="button" data-toggle="collapse" data-target="#navbarToggleResponsive" aria-controls="navbarToggleResponsive" aria-expanded="false" aria-label="Toggle navigation">
<a class="navbar-brand text-light font-weight-bold p-2" href="/"><i class="fas fa-check-square w-auto"></i></a> <i class="fas fa-bars"></i>
<a class="text-light font-weight-bold text-decoration-none p-2 ml-1" href="/list">Liste</a> </button>
<a class="text-light font-weight-bold text-decoration-none p-2 ml-1" href="/recipes">Rezepte</a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item <?php if($site=="list"){print_r("active");} ?>">
<a class="nav-link" href="/list">Liste</a>
</li>
<li class="nav-item <?php if($site=="recipes"){print_r("active");} ?>">
<a class="nav-link" href="/recipes">Rezepte</a>
</li>
</ul> </ul>
<ul class="navbar-nav">
<ul class="nav navbar-right text-light"> <li class="nav-item <?php if($site=="settings"){print_r("active");} ?>">
<a class="fas fa-user-cog text-light text-decoration-none p-1" href="/settings"></a> <a class="nav-link" href="/settings"><i class="fas fa-user-cog"></i></a>
<a class="fas fa-sign-out-alt text-light text-decoration-none p-1" href="/php/logout.php" id='logout'></a> </li>
<li class="nav-item">
<a class="nav-link" href="/php/logout.php"><i class="fas fa-sign-out-alt"></i></a>
</li>
</ul> </ul>
</div>
<div class="collapse w-75 pl-2" id="navbarToggleResponsive">
<ul class="navbar-nav mr-auto">
<li class="nav-item <?php if($site=="list"){print_r("active");} ?>">
<a class="nav-link" href="/list"><i class="fas fa-list"></i> Liste</a>
</li>
<li class="nav-item <?php if($site=="recipes"){print_r("active");} ?>">
<a class="nav-link" href="/recipes"><i class="fas fa-book"></i> Rezepte</a>
</li>
<li class="nav-item <?php if($site=="settings"){print_r("active");} ?>">
<a class="nav-link" href="/settings"><i class="fas fa-user-cog"></i> Einstellungen</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/php/logout.php"><i class="fas fa-sign-out-alt"></i> Logout</a>
</li>
</ul>
</div> </div>
</nav> </nav>

View file

@ -6,7 +6,7 @@
$recipe = $book->sites[0]; $recipe = $book->sites[0];
?> ?>
<div class="dropdown text-right mt-4"> <div class="dropdown text-right mt-5">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Menü Menü
</button> </button>

View file

@ -55,7 +55,7 @@ $user->get_info($_COOKIE["token"]);
if ($site && ($site != "login")) { if ($site && ($site != "login")) {
include $_SESSION["docroot"] . '/cont/nav.php'; include $_SESSION["docroot"] . '/cont/nav.php';
} }
echo '<div id="content" class="container pt-2">'; echo '<div id="content" class="container pt-4">';
switch ($site) { switch ($site) {
case "login": case "login":
include $_SESSION["docroot"] . '/cont/login.php'; include $_SESSION["docroot"] . '/cont/login.php';