move navbar into seperate file

This commit is contained in:
Thefeli73 2020-05-26 22:07:27 +02:00
parent 3fce607dd9
commit fc8bd56deb
2 changed files with 32 additions and 28 deletions

31
src/include/navbar.php Normal file
View File

@ -0,0 +1,31 @@
<?php
echo '
<nav id="nav">
<div id="menu" style="display: none;">
<span></span>
<div id="blocker"></div>
<ul>
<li data-text="Home"><a href="/">Home</a></li>
<li data-text="Websites"><a href="/websites">Websites</a></li>
<li data-text="Projects"><a href="/projects">Projects</a></li>
<li data-text="Contact"><a href="/contact">Contact</a></li>
</ul>
</div>
<div id="wrapper">
<div id="menuToggle">
<span class="bar bar1"></span>
<span class="bar bar2"></span>
<span class="bar bar1"></span>
</div>
<a href="/">
<picture id="icon">
<source srcset="/img/logo/logo@0.01x.webp" type="image/webp">
<source srcset="/img/logo/logo@0.01x.png" type="image/png">
<img src="/img/logo/logo@0.01x.png" alt="Logo">
</picture>
</a>
</div>
</nav>
';

View File

@ -46,34 +46,7 @@
</head>
<body>
<nav id="nav">
<div id="menu" style="display: none;">
<span></span>
<div id="blocker"></div>
<ul>
<li data-text="Home"><a href="/">Home</a></li>
<li data-text="Websites"><a href="/websites">Websites</a></li>
<li data-text="Projects"><a href="/projects">Projects</a></li>
<li data-text="Contact"><a href="/contact">Contact</a></li>
</ul>
</div>
<div id="wrapper">
<div id="menuToggle">
<span class="bar bar1"></span>
<span class="bar bar2"></span>
<span class="bar bar1"></span>
</div>
<a href="/">
<picture id="icon">
<source srcset="/img/logo/logo@0.01x.webp" type="image/webp">
<source srcset="/img/logo/logo@0.01x.png" type="image/png">
<img src="/img/logo/logo@0.01x.png" alt="Logo">
</picture>
</a>
</div>
</nav>
<?php include 'include/navbar.php';?>
<header id="header">
<div id="logo-container">