Skip to content

Commit

Permalink
added controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ivozilkenat committed Jul 18, 2024
1 parent 34bfcf2 commit d32eb69
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions services/matchmaking_server/frontend/html/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game Server Browser</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<script src="https://unpkg.com/htmx.org@1.7.0"></script>
</head>

<body class="bg-gray-100 flex items-center justify-center min-h-screen">
<div class="container mx-auto p-4">
<h1 class="text-2xl font-bold mb-4 text-center">Game Server Browser</h1>
<div class="bg-white rounded-lg shadow-lg p-6">
<div class="flex justify-end mb-4">
<button class="bg-blue-500 text-white px-4 py-2 rounded" hx-get="/servers" hx-trigger="click" hx-target="#game-server-tbody" hx-swap="innerHTML">
<button class="bg-blue-500 text-white px-4 py-2 rounded" hx-get="/servers" hx-trigger="click"
hx-target="#game-server-tbody" hx-swap="innerHTML">
Reload
</button>
</div>
Expand All @@ -29,15 +32,16 @@ <h1 class="text-2xl font-bold mb-4 text-center">Game Server Browser</h1>
</thead>
<tbody id="game-server-tbody" hx-get="/servers" hx-trigger="load, every 5s" hx-swap="innerHTML">
<tr>
<td class="border px-4 py-2" colspan="2">Loading...</td>
<td class="border px-4 py-2" colspan="6">Loading...</td>
</tr>
</tbody>
</table>
</div>
<h2 class="text-2xl font-bold py-4 text-center">Highscores (Top 5)</h2>
<div class="bg-white rounded-lg shadow-lg p-6">
<div class="flex justify-end mb-4">
<button class="bg-blue-500 text-white px-4 py-2 rounded" hx-get="/highscores_html" hx-trigger="click" hx-target="#highscores-tbody" hx-swap="innerHTML">
<button class="bg-blue-500 text-white px-4 py-2 rounded" hx-get="/highscores_html" hx-trigger="click"
hx-target="#highscores-tbody" hx-swap="innerHTML">
Reload
</button>
</div>
Expand All @@ -58,6 +62,16 @@ <h2 class="text-2xl font-bold py-4 text-center">Highscores (Top 5)</h2>
</tbody>
</table>
</div>
<h2 class="text-2xl font-bold py-4 text-center">Controls</h2>
<div class="bg-white rounded-lg shadow-lg p-6">
<ul class="list-disc pl-5">
<li class="mb-2"><strong>Movement:</strong> W, A, S, D</li>
<li class="mb-2"><strong>Aiming:</strong> Mouse</li>
<li class="mb-2"><strong>Shooting:</strong> Mouse Click or Space (holding supported)</li>
<li class="mb-2"><strong>Leaderboard:</strong> T</li>
</ul>
</div>
</div>
</body>
</html>

</html>

0 comments on commit d32eb69

Please sign in to comment.