<!Doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<title>Create/Join Game Session</title>
<link rel="icon" type="image/x-icon" href="images/favicon.png">
<style>
body {
background-color: #943270;
}
.card {
border-radius: 20px;
box-shadow: 5px 5px 10px 5px rgba(0,0,0,0.5);
}
.btn-primary {
background-color: #007bff;
border-color: #007bff;
}
.btn-primary:hover {
background-color: #0056b3;
border-color: #0056b3;
}
</style>
</head>
<body>
<nav class="navbar sticky-top navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<img alt="Brand" src="images/FightingMongoosesLogo.jpeg" width="7%" height="7%">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="Group5LandingPage.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="About_Us.html">About</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container py-5">
<div class="card" style="margin-bottom: 40px;">
<h1 class="text-center mb-5" style="margin-top: 40px;">Create or Join a Game Session</h1>
</div>
<div class="row justify-content-center">
<div class="col-sm-5 mb-4">
<div class="card">
<div class="card-body">
<h2 class="text-center mb-4">Create a New Game</h2>
<form>
<div class="mb-3">
<label for="player-name" class="form-label">Your Name</label>
<input type="text" class="form-control" id="player-name" name = "name" placeholder="Enter your name" required>
<label for="numPlayers" class="form-label">Number of Players</label>
<select class="form-control" id="numPlayers" name = "mySelect">
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<label for="room-title" class="form-label">Title</label>
<input type="text" class="form-control" id="room-title" name = "myTitle" placeholder="Enter a title for your room" required>
</div>
<button type="submit" class="btn btn-primary d-block mx-auto">Create Game</button>
</form>
</div>
</div>
</div>
<div class="col-sm-5">
<div class="card">
<div class="card-body">
<h2 class="text-center mb-4">Join an Existing Game</h2>
<form>
<div class="mb-3">
<label for="player-name" class="form-label">Your Name</label>
<input type="text" class="form-control" id="player-name" name = "name" placeholder="Enter your name" required>
<label for="joinGameCode" class="form-label">Game Code</label>
<input type="text" class="form-control" id="joinGameCode" name = "room-id"
placeholder="Enter RoomID you want to join" required>
</div>
<button type="submit" class="btn btn-primary d-block mx-auto" style="margin-top:85px;">Join Game</button>
</form>
</div>
</div>
</div>
</div>
<a href="Session_page.html" class="btn btn-secondary d-block mx-auto mt-3" style="box-shadow: 5px 5px 10px 5px rgba(0,0,0,0.5);">Refresh Existing Game Sessions</a>
</div>
<div class="session">
<p style="font-size:2.5em;color:white;text-align:center;text-shadow: -1px 1px 2px rgba(0, 0, 0, 0.3);">Current Game Sessions</p>
<table id="session-table" style="width: 70vw;background-color: #2a8d96;color:white;border: 1px solid white;text-align: center;text-shadow: -1px 1px 2px rgba(0, 0, 0, 0.3);margin-left: auto;margin-right: auto;margin-bottom: 40px;"> <!--style can't be applied outside element???-->
<thead>
<tr>
<th style="padding: 5px;">RoomID</th> <!--style can't be applied outside element???-->
<th style="padding: 5px;">Title</th>
<th style="padding: 5px;">Host</th>
<th style="padding: 5px;">Players</th>
</tr>
</thead>
<tbody id="session-body">
</tbody>
</table>
</div>
<!-- <script>
window.onload = function() {
fetch("test.txt")
.then((res) => res.text())
.then((text) => {
// do something with "text"
var elements = document.getElementById('session-body')
elements.innerHTML = text;
})
.catch((e) => console.error(e));
};
</script> -->
<div style="background-color: #31363c;color: white;padding: 20px 0;text-align: center;">
<h1>The People Who Worked on This Project</h1>
<p>To see a list of team members, please visit our <a href="About_Us.html">about us</a> page</p>
</div>
</body>
</html>