threadr.lostcave.ddnss.de/macros/templates/navbar.template

78 lines
2.2 KiB
Plaintext

<?php
if (!isset($login)){
$login=false;
%FORCE_LOGOUT%
}
?>
<ul class="topnav">
<li>
<?php
echo "<a class=\"icon ";
if ($login){
if ($navbar == "home"){
echo "active\" href=\"%CONTENT_DIR%/userhome/\"><img src=\"/%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"My Feed\" title=\"My Feed\"";
} else {
echo "\" href=\"%CONTENT_DIR%/userhome/\"><img src=\"/%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"My Feed\" title=\"My Feed\"";
}
} else {
if ($navbar == "home"){
echo "active\" href=\"%CONTENT_DIR%/\"><img src=\"/%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"Home\" title=\"Home\"";
} else {
echo "\" href=\"%CONTENT_DIR%/\"><img src=\"/%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"Home\" title=\"Home\"";
}
}
echo "/></a>";
?>
</li>
<li>
<?php
if ($navbar == "news"){
echo "<a class=\"active\" href=\"%CONTENT_DIR%/news/\">News</a>";
} else {
echo "<a href=\"%CONTENT_DIR%/news/\">News</a>";
}
?>
</li>
<li>
<?php
if ($navbar == "boards"){
echo "<a class=\"active\" href=\"%CONTENT_DIR%/boards/\">Boards</a>";
} else {
echo "<a href=\"%CONTENT_DIR%/boards/\">Boards</a>";
}
?>
</li>
<li>
<?php
if ($navbar == "about"){
echo "<a class=\"active\" href=\"%CONTENT_DIR%/about/\">About</a>";
} else {
echo "<a href=\"%CONTENT_DIR%/about/\">About</a>";
}
?>
</li>
<?php
if ($login) {
echo "<li class=\"dropdown right\"><button class=\"dropbtn\"> Put user avatar here </button><div class=\"dropdown-content\"><a href=\"%CONTENT_DIR%/logout/\">Log out</a>";
if ($navbar == "profile") {
echo "<a class=\"active\" href=\"%CONTENT_DIR%/profile/\">Profile</a>";
} else {
echo "<a href=\"%CONTENT_DIR%/profile/\">Profile</a>";
}
echo "</div></li>";
} else {
echo "<li class=\"right\">";
if ($navbar == "login") {
echo "<a class=\"active\" href=\"%CONTENT_DIR%/login/\">Log in</a>";
} else {
echo "<a href=\"%CONTENT_DIR%/login/\">Log in</a>";
}
}
?>
</ul>
<div class="topnav"></div>