Move nav-menu to external php file

This commit is contained in:
Fred Boniface 2022-09-20 19:41:47 +01:00
parent ec6551e985
commit 2e56d59664
2 changed files with 12 additions and 9 deletions

View File

@ -4,21 +4,14 @@
<?php include './page-blocks/headers.php';?>
<title>Athena</title>
<script src="/js/tiploc-finder.js"></script>
<script src="/js/nav.js"></script>
<script src="/js/tiploc-finder.js" async></script>
</head>
<body>
<!-- Popup Menu -->
<div id="menu-button" class="menu-button">
<img onclick="openMenu()" src="/assets/icons/menu.png"></img>
</div>
<div id="menu" class="menu">
<button class="menuitem" onclick="openAboutPopup(),closeMenu()">Help</button>
<img onclick="closeMenu()" class="popup-close" src="/assets/icons/close-circle.png"></img>
</div>
<?php require "./page-blocks/nav-menu.php";?>
<!-- Main Content Begins -->
<img class="titleimg" src="/assets/title/title.webp"></img>

10
page-blocks/nav-menu.php Normal file
View File

@ -0,0 +1,10 @@
<?php
echo '<script src="/js/nav.js" async></script>';
echo '<div id="menu-button" class="menu-button">';
echo '<img onclick="openMenu()" src="/assets/icons/menu.png"></img>';
echo '</div>'
echo '<div id="menu" class="menu">'
echo '<button class="menuitem" onclick="openAboutPopup(),closeMenu()">Help</button>'
echo '<img onclick="closeMenu()" class="popup-close" src="/assets/icons/close-circle.png"></img>'
echo '</div>'