-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.inc.php
28 lines (25 loc) · 1.68 KB
/
navbar.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<nav class="nav">
<div class="container flex">
<a class="item logo noUnderline" tabindex="0" href="<?= $rootUrl ?>"><h1><?= $blogTitle ?></h1></a>
<span class="flex-grow"></span>
<?php if($loggedIn) { ?>
<a class="item nav-link dp-text " tabindex="0" href="<?= $rootUrl ?>new/" title="New post"><span class="material-icons">add</span></a>
<span id="navPfpBtn" class="item nav-pfp" tabindex="0" title="Signed in as <?= $_SESSION['username'] ?>"><img src="<?= $_SESSION['pfp'] ?>" height="45px" alt="<?= $_SESSION['username'] ?>"></span>
<?php }else { ?>
<a class="item nav-link <?php echo ($pageTitle == 'Sign in') ? 'active' : ''; ?>" tabindex="0" href="<?= $rootUrl ?>auth/"><span>Sign in</span></a>
<?php } ?>
</div>
</nav>
<div class="nav-height"></div>
<?php if($loggedIn) { ?>
<div class="container pfp-dropdown-container">
<nav id="navPfpDropdown" class="pfp-dropdown dropdown" style="display: none;">
<div class="dropdown-item"><span class="dp-text" title="Signed in as <?= $_SESSION['username'] ?>"><b><?= $_SESSION['username'] ?></b></span></div>
<div class="divider"></div>
<div class="items">
<a class="dropdown-item" href="<?= $rootUrl ?>dashboard/"><span class="dp-text"><span class="material-icons">dashboard</span>Dashboard</span></a>
<a class="dropdown-item" href="<?= $rootUrl ?>auth/?action=logout"><span class="dp-text"><span class="material-icons">exit_to_app</span>Sign out</span></a>
</div>
</nav>
</div>
<?php } ?>