2024-07-27 22:03:17 +00:00
|
|
|
<!DOCTYPE html>
|
2024-08-03 22:03:52 +00:00
|
|
|
<?php
|
2024-08-06 19:59:15 +00:00
|
|
|
function makeNavigationLink(string $name, string $url): void {
|
|
|
|
$currentPath = rtrim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), "/");
|
|
|
|
$targetPath = rtrim(parse_url($url, PHP_URL_PATH), "/");
|
2024-08-03 22:03:52 +00:00
|
|
|
$targetHost = parse_url($_SERVER['REQUEST_URI'], PHP_URL_HOST);
|
|
|
|
$active = false;
|
|
|
|
if ($targetHost === NULL && $currentPath === $targetPath) {
|
|
|
|
$active = true;
|
|
|
|
}
|
2024-08-04 10:32:46 +00:00
|
|
|
?><li class="menu-item <?= $active ? "active" : "" ?>"><a href="<?= $url ?>"><?= $name ?></a></li><?php
|
2024-08-03 22:03:52 +00:00
|
|
|
}
|
|
|
|
?>
|
2024-08-02 19:47:49 +00:00
|
|
|
<html lang="en">
|
2024-07-27 22:03:17 +00:00
|
|
|
<head>
|
2024-07-27 22:27:31 +00:00
|
|
|
<title><?= $title ?? ""; ?></title>
|
2024-07-27 22:03:17 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="/styles/main.css" />
|
2024-08-03 15:19:24 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="/styles/fonts.css" />
|
2024-08-03 19:52:58 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="/fonts/fontawesome/css/font-awesome.css" />
|
2024-08-01 19:58:41 +00:00
|
|
|
<script type="application/javascript" src="/js/bundle.js"></script>
|
2024-08-06 19:28:17 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2024-07-27 22:03:17 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2024-08-03 20:52:04 +00:00
|
|
|
<nav data-hx-boost="true">
|
2024-08-06 19:28:17 +00:00
|
|
|
<div class="hamburger">
|
|
|
|
<i class="fa fa-bars"></i>
|
|
|
|
<input type="checkbox" class="checkbox" />
|
|
|
|
</div>
|
2024-08-03 20:52:04 +00:00
|
|
|
<ul class="left">
|
2024-08-04 10:32:46 +00:00
|
|
|
<?php
|
|
|
|
makeNavigationLink("MobMash", "/");
|
|
|
|
makeNavigationLink("Result", "/results");
|
|
|
|
?>
|
2024-08-03 20:52:04 +00:00
|
|
|
</ul>
|
|
|
|
<ul class="right">
|
2024-08-04 10:32:46 +00:00
|
|
|
<?php
|
|
|
|
makeNavigationLink("About", "/about");
|
|
|
|
makeNavigationLink("Source", "https://github.com/overflowerror/mobmash.click");
|
|
|
|
makeNavigationLink("Privacy", "/privacy");
|
|
|
|
?>
|
2024-08-03 20:52:04 +00:00
|
|
|
</ul>
|
2024-07-29 20:26:00 +00:00
|
|
|
</nav>
|
2024-08-04 09:55:19 +00:00
|
|
|
<div id="content">
|
|
|
|
<?php
|
|
|
|
if (isset($content)) {
|
|
|
|
$content();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
2024-08-04 19:07:51 +00:00
|
|
|
<div id="disclaimer">
|
|
|
|
<p>
|
|
|
|
This is not an official Minecraft website. We are not associated with Mojang or Microsoft.<br>
|
|
|
|
Minecraft content and materials on this site are trademarks and copyrights of <a href="https://www.minecraft.net/">Mojang Studios</a>.
|
|
|
|
</p>
|
|
|
|
</div>
|
2024-08-04 19:21:58 +00:00
|
|
|
<div id="version">v<?= VERSION ?></div>
|
2024-07-27 22:03:17 +00:00
|
|
|
</body>
|
|
|
|
</html>
|