Compare commits

...

3 Commits

  1. 0
      app/static/css/default.css
  2. 14
      app/templates/_game_player_info.html
  3. 10
      app/templates/auth/login.html
  4. 10
      app/templates/auth/register.html
  5. 6
      app/templates/auth/user_hash_login.html
  6. 6
      app/templates/base.html
  7. 23
      app/templates/game_bunny_dashboard.html
  8. 36
      app/templates/game_hunter_dashboard.html
  9. 22
      app/templates/index.html

0
app/static/css/default.css

14
app/templates/_game_player_info.html

@ -1,13 +1,21 @@ @@ -1,13 +1,21 @@
<h2>Game Info</h2>
<div class="table-responsive">
<div class="table">
<table class="table">
<tr>
<th>My Game</th>
<td>{{ game.name.title() }}</td>
</tr>
<tr>
<th>My Name</th>
<td>{{ current_user.name.title() }}</td>
</tr>
<tr>
<th>My Role</th>
<td>{{ current_user.role_in_game(game).name }}</td>
<td>{{ current_user.role_in_game(game).name.title() }}</td>
</tr>
<tr>
<th>Game State</th>
<td>{{ game.state.name }}</td>
<td>{{ game.state.name.title() }}</td>
</tr>
<tr>
<th>Start Time</th>

10
app/templates/auth/login.html

@ -2,12 +2,14 @@ @@ -2,12 +2,14 @@
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
<h1>Sign In</h1>
<div class="row">
<div class="col-md-4">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-8 col-md-4">
<h1>Sign In</h1>
{{ wtf.quick_form(form, button_map={'submit': 'primary'}) }}
</div>
</div>
<br>
<p>New User? <a href="{{ url_for('auth.register') }}">Click to Register!</a></p>
</div>
<div class="col-xs-0 col-md-7"></div>
</div>
{% endblock %}

10
app/templates/auth/register.html

@ -2,12 +2,14 @@ @@ -2,12 +2,14 @@
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
<h1>Register</h1>
<div class="row">
<div class="col-md-4">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-8 col-md-4">
<h1>Register</h1>
{{ wtf.quick_form(form, button_map={'submit': 'primary'}) }}
</div>
</div>
<br>
<p>Already have an account? <a href="{{ url_for('auth.login') }}">Click to Sign In!</a></p>
</div>
<div class="col-xs-0 col-md-7"></div>
</div>
{% endblock %}

6
app/templates/auth/user_hash_login.html

@ -2,6 +2,9 @@ @@ -2,6 +2,9 @@
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
<div class="row">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-12 col-md-10">
<h1>Welcome, {{ user.name }}!</h1>
<p>
If you found this page, it probably means someone who is organising a hunt invited you by
@ -11,4 +14,7 @@ @@ -11,4 +14,7 @@
</p>
<a href="{{ url_for('main.index') }}"><button class="btn btn-primary">Set Password</button></a>
<a href="{{ url_for('auth.user_hash_login', auth_hash=user.auth_hash, login='true') }}"><button class="btn btn-primary">Start Playing!</button></a>
</div>
<div class="col-xs-0 col-md-1"></div>
</div>
{% endblock %}

6
app/templates/base.html

@ -1,5 +1,10 @@ @@ -1,5 +1,10 @@
{% extends 'bootstrap/base.html' %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ url_for('static', filename='css/default.css') }}">
{% endblock %}
{% block title %}
{% if title %}{{ title }} - The Hunt{% else %}Welcome to The Hunt{% endif %}
{% endblock %}
@ -27,6 +32,7 @@ @@ -27,6 +32,7 @@
{% if current_user.is_anonymous %}
<li><a href="{{ url_for('auth.login') }}">Login</a></li>
{% else %}
<li><a href="#"><div class="hidden-xs hidden-sm">{{ current_user.name }}{% if game is defined %}/{{ game.name }}{% endif %}</div></a></li>
<li><a href="{{ url_for('auth.logout') }}">Logout</a></li>
{% endif %}
</ul>

23
app/templates/game_bunny_dashboard.html

@ -8,11 +8,14 @@ @@ -8,11 +8,14 @@
{% endblock %}
{% block player_app_content %}
<h1>{{ game.name }}: {{ current_user.name }}</h1>
{% include '_game_player_info.html' %}
<div class="row">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-12 col-md-7">
<h2>Objective Locations:</h2>
{% if game.objectives %}
<div class="table-responsive">
<div class="table">
<table class="table">
<thead>
<tr>
@ -34,9 +37,21 @@ @@ -34,9 +37,21 @@
</tbody>
</table>
</div>
<div id="map" style=" height: 500px; border-radius: 10px; " class="col-md-6 col-xs-12"></div>
{% endif %}
</div>
<div class="col-xs-12 col-md-3">
{% include '_game_player_info.html' %}
</div>
</div>
{% if game.objectives %}
<div class="row">
<div class="col-xs-1 col-md-1"></div>
<div id="map" style=" height: 500px; border-radius: 10px; " class="col-xs-10 col-md-10"></div>
<div class="col-xs-1 col-md-1"></div>
</div>
{% endif %}
{% endblock %}

36
app/templates/game_hunter_dashboard.html

@ -8,22 +8,17 @@ @@ -8,22 +8,17 @@
{% endblock %}
{% block player_app_content %}
<h1>{{ game.name }}: {{ current_user.name }}</h1>
{% include '_game_player_info.html' %}
<h2>Bunnies:</h2>
<a href="{{ url_for('main.catch_bunny', game_name=game.name) }}">
<button class="btn btn-success">Catch Bunny</button>
</a>
<div class="table-responsive">
<div class="row">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-12 col-md-7">
<h2>Bunnies</h2>
<div class="table">
<table class="table">
<thead>
<tr>
<th scope="col">Player Name</th>
<th scope="col">Times Caught
<span style="font-size: smaller;">
(<span style="color:green;">Accepted</span>/<span style="color:red;">Denied</span>/<span style="color:gray;">Not reviewed</span>)
</span>
</th>
<th scope="col">Times Caught</th>
<th scope="col">Last location</th>
<th scope="col"></th>
</tr>
@ -43,15 +38,28 @@ @@ -43,15 +38,28 @@
{% endwith %}</td>
<td>
<a href="{{ url_for('main.catch_bunny', game_name=game.name, bunny_name=bunny.user.name) }}">
<button class="btn btn-success">Catch</button>
<button class="btn btn-success btn-sm">Catch</button>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<span style="font-size: smaller;">
(<span style="color:green;">Accepted</span>/<span style="color:red;">Denied</span>/<span style="color:gray;">Not reviewed</span>)
</span>
</div>
</div>
<div class="col-xs-12 col-md-3">
{% include '_game_player_info.html' %}
</div>
</div>
<div class="row">
<div class="col-xs-1 col-md-1"></div>
<div id="map" style=" height: 500px; border-radius: 10px; " class="col-xs-10 col-md-10"></div>
<div class="col-xs-1 col-md-1"></div>
</div>
<div id="map" style=" height: 500px; border-radius: 10px; " class="col-md-6 col-xs-12"></div>
{% endblock %}

22
app/templates/index.html

@ -1,11 +1,19 @@ @@ -1,11 +1,19 @@
{% extends 'player_base.html' %}
{% block player_app_content %}
<h1>Hi, {{ current_user.name }}!</h1>
<div class="row">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-12 col-md-10">
<h2>My games:</h2>
</div>
<div class="col-xs-0 col-md-1"></div>
</div>
{% if current_user.games %}
<div class="table-responsive">
<div class="row">
<div class="col-xs-0 col-md-1"></div>
<div class="col-xs-12 col-md-10">
<div class="table">
<table class="table">
<thead>
<tr>
@ -20,12 +28,12 @@ @@ -20,12 +28,12 @@
{% for game in current_user.games %}
<tr>
<td><a href="{{ url_for('main.game_dashboard', game_name = game.name) }}">{{ game.name }}</a></td>
<td>{{ game.state.name}}</td>
<td>{{ game.state.name.title() }}</td>
<td>{{ game.start_time }}</td>
<td>{{ game.end_time }}</td>
<td>
{% for gameplayer in current_user.user_games if gameplayer.game == game %}
{{ gameplayer.role.name }}
{{ gameplayer.role.name.title() }}
{% endfor %}
</td>
</tr>
@ -33,6 +41,10 @@ @@ -33,6 +41,10 @@
</tbody>
</table>
</div>
</div>
<div class="col-xs-0 col-md-1"></div>
</div>
{% else %}
<div class="alert alert-info" role="alert">
You don't participate in any game yet 😢

Loading…
Cancel
Save