KT-personal-website/template/nav.php

32 lines
1.6 KiB
PHP
Raw Normal View History

2024-10-22 12:26:08 +02:00
<?php
use App\Utils\Selected;
?>
<header>
<nav>
<h1>
<img src="../../assets/image/avatar_120.webp" height="120px" loading="lazy" alt="logo" /><a href="/"><?= $siteName; ?></a>
</h1>
<ul>
<?php foreach ($navLinks as $name => $link) : ?>
<li><a href="<?= $link; ?>" class="<?= Selected::selected($link, $params[0]['requestUrl']); ?>"><?= $name; ?></a></li>
<?php endforeach; ?>
<li><a href="#" onclick="switchTheme();"><svg height="30px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<g>
<g>
<path
d="M256,0C114.842,0,0,114.84,0,256s114.842,256,256,256s256-114.84,256-256S397.158,0,256,0z M322.225,451.558 c-20.797,7.062-43.071,10.894-66.225,10.894c-113.837,0-206.452-92.614-206.452-206.452S142.163,49.548,256,49.548 c23.154,0,45.429,3.832,66.226,10.894C266.612,107.439,231.226,177.657,231.226,256S266.612,404.561,322.225,451.558z">
</path>
</g>
</g>
</g>
</svg>
</a>
</li>
</ul>
</nav>
</header>