Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new button style and centered input fields #69

Merged
merged 2 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions campus_game_project/game/static/game/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,18 @@ body {
border-radius: 10px;
background: #201d1dad;
}

input[type=text] {
width: 20%;
padding: 10px, 20px;
height: 35px;
margin: 10px, 0;
border: 2px solid grey;
border-radius: 5px;
}

.center-block {
display: block;
margin-right: auto;
margin-left: auto;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 15 additions & 5 deletions campus_game_project/game/templates/game/join.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<link rel="stylesheet" href="{% static 'game/create.css'%}">
</head>
{{ error_message|json_script:"error_message" }}
<body style="background-color:#264d00;color:#ffffff">
<body style="background-color:#363a3e;color:#ffffff">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top main-navigation">
<div class="container-fluid">
<a href="{% url 'home:home' %}" class="font-monospace navbar-brand order-1 order-lg-1 mr-auto mr-lg-3 ml-3 ml-lg-0">Hide and Seek</a>
Expand All @@ -27,16 +27,26 @@
</nav>
<form id="form" method="post">
{% csrf_token %}
<input required name="uname" type="text" placeholder="Username">
<input required id="lobby-code" type="text" placeholder="Code" onchange="document.getElementById('form').action = '/game/' + this.value + '/';">
<input class="btn btn-dark" id="join" type="submit" value="Join">
<input type="hidden" name="create" value="False">
<br>
<br>
<br>
<input class="center-block" required name="uname" type="text" placeholder="Username">
<br>
<input class="center-block" required id="lobby-code" type="text" placeholder="Code" onchange="document.getElementById('form').action = '/game/' + this.value + '/';">
<br>
<input class="btn btn-dark center-block" id="join" type="submit" value="Join">
<input type="hidden" name="create" value="False">
</form>
<div id="error" style="color: red"></div>
<script>
const error = JSON.parse(document.getElementById('error_message').textContent);

document.getElementById('error').innerText = error;
</script>
<center>
<div>
<img alt="Zombie" src="{%static 'game/movin_zomb.gif' %}" height="250">
</div>
</center>
</body>
</html>