feat: Add SEO info

This commit is contained in:
overflowerror 2024-08-08 19:30:32 +02:00
parent e5244db6b0
commit 41f9c93b8c
3 changed files with 7 additions and 3 deletions

View file

@ -16,7 +16,8 @@ function renderChoice(): void {
if ($ajax) { if ($ajax) {
include __DIR__ . "/../view/fragments/mobSelection.php"; include __DIR__ . "/../view/fragments/mobSelection.php";
} else { } else {
$title = "MobMash"; $title = "MobMash - Vote";
$description = "Which Minecraft mob is the best? Vote for your favorite mob. MobMash uses a chess rating algorithm to calculate a definitive ranking.";
$content = function() use ($left, $right, $csrfToken) { $content = function() use ($left, $right, $csrfToken) {
include __DIR__ . "/../view/pages/mobSelection.php"; include __DIR__ . "/../view/pages/mobSelection.php";
}; };

View file

@ -26,6 +26,7 @@ if (isset($_GET["ajax"])) {
require __DIR__ . '/../../view/fragments/mobList.php'; require __DIR__ . '/../../view/fragments/mobList.php';
} else { } else {
$title = "MobMash - Results"; $title = "MobMash - Results";
$description = "Which Minecraft mob is the best? Let's take a look at how people votes. These are the results.";
$content = function () use ($mobs, $trends) { $content = function () use ($mobs, $trends) {
require __DIR__ . '/../../view/pages/results.php'; require __DIR__ . '/../../view/pages/results.php';
}; };

View file

@ -13,13 +13,15 @@
?> ?>
<html lang="en"> <html lang="en">
<head> <head>
<title><?= $title ?? ""; ?></title> <title><?= $title ?? "" ?></title>
<meta name="description" content="<?= $description ?? "" ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="/styles/main.css" /> <link rel="stylesheet" type="text/css" href="/styles/main.css" />
<link rel="stylesheet" type="text/css" href="/styles/fonts.css" /> <link rel="stylesheet" type="text/css" href="/styles/fonts.css" />
<link rel="stylesheet" type="text/css" href="/styles/emoji.css" /> <link rel="stylesheet" type="text/css" href="/styles/emoji.css" />
<link rel="stylesheet" type="text/css" href="/fonts/fontawesome/css/font-awesome.css" /> <link rel="stylesheet" type="text/css" href="/fonts/fontawesome/css/font-awesome.css" />
<script type="application/javascript" src="/js/bundle.js"></script> <script type="application/javascript" src="/js/bundle.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> </head>
<body> <body>
<nav data-hx-boost="true"> <nav data-hx-boost="true">