Add webmail to navbar, add generalized navbar to /om

This commit is contained in:
2017-11-13 20:35:25 +01:00
parent 518ee8baf2
commit 7dbce0bd24
3 changed files with 68 additions and 67 deletions

View File

@@ -7,11 +7,15 @@ function navbar($depth, $active = NULL) {
'aktiviteter' => 'aktiviteter',
'prosjekter' => 'prosjekt',
'kontakt' => 'kontakt',
'webmail' => 'https://webmail.pvv.ntnu.no/',
'wiki' => 'pvv',
];
foreach($menuItems as $caption => $link) {
if ($caption !== 'webmail') {
$link = rtrim(str_repeat('../', $depth) . $link, '/') . '/';
}
$result .= "\t\t<li" . ($active === $link ? ' class="active"' : '') . '>'
. '<a href="' . rtrim(str_repeat('../', $depth) . $link, '/') . '/">'
. '<a href="' . $link . '">'
. $caption
. "</a></li>\n"
;