This repository has been archived on 2023-01-08. You can view files and clone it, but cannot push or open issues or pull requests.
stafett-for-livet/template/_header.php
2021-09-06 09:04:29 +02:00

53 lines
2.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// When including this template from other directories, using relative url paths is not sufficient. Therefore we use a prefix to ensure that the correct url path is given.
// Typically we put this before any local urls, such as navigation, icons etc to ensure that they use the correct path.
$templateUrlPrefix = dirname(str_replace(realpath($_SERVER['DOCUMENT_ROOT']), '', realpath(__DIR__)));
if ((strlen($templateUrlPrefix) > 1)) {
$templateUrlPrefix = $templateUrlPrefix . DIRECTORY_SEPARATOR;
}
if ($templateParameters["render"] === false) {
return;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?=htmlspecialchars($templateParameters["title"]);?> Stafett for livet</title>
<link rel="stylesheet" href="<?=$templateUrlPrefix;?>style/main.css">
<link rel="icon" href="<?=$templateUrlPrefix;?>img/cropped-kf-propell-ikon-32x32.png" sizes="32x32">
<body>
<div class="navbar-top-head">
<div class="navbar-top-inner">
<!-- Jalla løsning -->
<a href="<?=$templateUrlPrefix;?>" style="display: block; max-width: max-content;">
<img style="display: block; height: 32px;" src="<?=$templateUrlPrefix;?>img/cropped-kf-propell-ikon-32x32.png" alt="">
<div style="margin-left: 44px;">
<div style="font-size: 24px; margin-top: -38px;">Stafett for livet</div>
<div style="font-size: 10px; margin-top: -6px;"><b>KREFT</b>FORENINGEN</div>
</div>
</a>
</div>
</div>
<div class="grid-container">
<div>
<nav>
<ul>
<li><a href="<?=$templateUrlPrefix;?>">Forside</a></li>
<li><a href="<?=$templateUrlPrefix;?>login.php">Logg inn</a></li>
<li><a href="<?=$templateUrlPrefix;?>example.php">Eksempel</a></li>
</ul>
</nav>
</div>
<div>
<main>