diff --git a/app/static/css/default.css b/app/static/css/default.css new file mode 100644 index 0000000..e69de29 diff --git a/app/templates/_game_player_info.html b/app/templates/_game_player_info.html index c1d6c65..43d868d 100644 --- a/app/templates/_game_player_info.html +++ b/app/templates/_game_player_info.html @@ -1,21 +1,29 @@

Game Info

-
+
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
My Role{{ current_user.role_in_game(game).name }}
Game State{{ game.state.name }}
Start Time{% if game.start_time %}{{ moment(game.start_time).format('DD-MM-YYYY, hh:mm')}}{% else %}-{% endif %}
End Time{% if game.end_time %}{{ moment(game.end_time).format('DD-MM-YYYY, hh:mm')}}{% else %}-{% endif %}
My Game{{ game.name.title() }}
My Name{{ current_user.name.title() }}
My Role{{ current_user.role_in_game(game).name.title() }}
Game State{{ game.state.name.title() }}
Start Time{% if game.start_time %}{{ moment(game.start_time).format('DD-MM-YYYY, hh:mm')}}{% else %}-{% endif %}
End Time{% if game.end_time %}{{ moment(game.end_time).format('DD-MM-YYYY, hh:mm')}}{% else %}-{% endif %}
-
\ No newline at end of file +
diff --git a/app/templates/auth/login.html b/app/templates/auth/login.html index c345890..ec88b87 100644 --- a/app/templates/auth/login.html +++ b/app/templates/auth/login.html @@ -2,12 +2,14 @@ {% import 'bootstrap/wtf.html' as wtf %} {% block app_content %} -

Sign In

-
- {{ wtf.quick_form(form, button_map={'submit': 'primary'}) }} +
+
+

Sign In

+ {{ wtf.quick_form(form, button_map={'submit': 'primary'}) }} +
+

New User? Click to Register!

+
-
-

New User? Click to Register!

-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/templates/auth/register.html b/app/templates/auth/register.html index af31b5c..54eeb5a 100644 --- a/app/templates/auth/register.html +++ b/app/templates/auth/register.html @@ -2,12 +2,14 @@ {% import 'bootstrap/wtf.html' as wtf %} {% block app_content %} -

Register

-
-
- {{ wtf.quick_form(form, button_map={'submit': 'primary'}) }} -
+
+
+
+

Register

+ {{ wtf.quick_form(form, button_map={'submit': 'primary'}) }} +
+

Already have an account? Click to Sign In!

-
-

Already have an account? Click to Sign In!

-{% endblock %} \ No newline at end of file +
+
+{% endblock %} diff --git a/app/templates/auth/user_hash_login.html b/app/templates/auth/user_hash_login.html index cf1785f..4a4cd4a 100644 --- a/app/templates/auth/user_hash_login.html +++ b/app/templates/auth/user_hash_login.html @@ -2,13 +2,19 @@ {% import 'bootstrap/wtf.html' as wtf %} {% block app_content %} -

Welcome, {{ user.name }}!

-

+

+
+
+

Welcome, {{ user.name }}!

+

If you found this page, it probably means someone who is organising a hunt invited you by sending a link or QR-code to this page. You can start playing right away, if and if you get logged out just visit this page again. However, if you want to be sure other people can't steal this account, please set a password. -

- - -{% endblock %} \ No newline at end of file +

+ + +
+
+
+{% endblock %} diff --git a/app/templates/base.html b/app/templates/base.html index 903727d..68ad074 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,5 +1,10 @@ {% extends 'bootstrap/base.html' %} +{% block styles %} +{{ super() }} + +{% endblock %} + {% block title %} {% if title %}{{ title }} - The Hunt{% else %}Welcome to The Hunt{% endif %} {% endblock %} @@ -27,6 +32,7 @@ {% if current_user.is_anonymous %}
  • Login
  • {% else %} +
  • Logout
  • {% endif %} diff --git a/app/templates/game_bunny_dashboard.html b/app/templates/game_bunny_dashboard.html index 46cb04a..4f0836c 100644 --- a/app/templates/game_bunny_dashboard.html +++ b/app/templates/game_bunny_dashboard.html @@ -8,11 +8,14 @@ {% endblock %} {% block player_app_content %} -

    {{ game.name }}: {{ current_user.name }}

    -{% include '_game_player_info.html' %} +
    +
    + +
    +

    Objective Locations:

    {% if game.objectives %} -
    +
    @@ -34,9 +37,21 @@
    -
    {% endif %} +
    +
    + {% include '_game_player_info.html' %} +
    +
    + +{% if game.objectives %} +
    +
    +
    +
    +
    +{% endif %} {% endblock %} @@ -70,4 +85,4 @@ } -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/templates/game_hunter_dashboard.html b/app/templates/game_hunter_dashboard.html index 56c9e59..3d25668 100644 --- a/app/templates/game_hunter_dashboard.html +++ b/app/templates/game_hunter_dashboard.html @@ -8,22 +8,17 @@ {% endblock %} {% block player_app_content %} -

    {{ game.name }}: {{ current_user.name }}

    -{% include '_game_player_info.html' %} -

    Bunnies:

    - - - -
    - +
    +
    + +
    +

    Bunnies

    +
    +
    - + @@ -33,7 +28,7 @@ {% for bunny in game.bunnies() %} - @@ -43,15 +38,28 @@ {% endwith %} {% endfor %} -
    Player NameTimes Caught - - (Accepted/Denied/Not reviewed) - - Times Caught Last location
    {{ bunny.user.name }}{{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'accepted') |list|length}} / + {{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'accepted') |list|length}} / {{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'denied') |list|length}} / {{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'none') |list|length}} - +
    + + + (Accepted/Denied/Not reviewed) + +
    +
    +
    + {% include '_game_player_info.html' %} +
    +
    + +
    +
    +
    +
    -
    {% endblock %} @@ -72,8 +80,8 @@ L.tileLayer( 'https://geodata.nationaalgeoregister.nl/tiles/service/wmts/brtachtergrondkaartpastel/EPSG:3857/{z}/{x}/{y}.png', { attribution: 'Kaartgegevens © Kadaster' }).addTo( map ); - - var bunnies = JSON.parse('{{ json.dumps(game.last_locations(game.bunnies()), cls=location_encoder)|safe }}') + + var bunnies = JSON.parse('{{ json.dumps(game.last_locations(game.bunnies()), cls=location_encoder)|safe }}') for (var i = 0; i < bunnies.length; i++){ addPlayerMarker(map, bunnies[i]) } @@ -84,4 +92,4 @@ } -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/templates/index.html b/app/templates/index.html index 74fd73b..b530da6 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,11 +1,19 @@ {% extends 'player_base.html' %} {% block player_app_content %} -

    Hi, {{ current_user.name }}!

    - +
    +
    +

    My games:

    +
    +
    +
    + {% if current_user.games %} -
    +
    +
    +
    +
    @@ -20,12 +28,12 @@ {% for game in current_user.games %} - + @@ -33,9 +41,13 @@
    {{ game.name }}{{ game.state.name}}{{ game.state.name.title() }} {{ game.start_time }} {{ game.end_time }} {% for gameplayer in current_user.user_games if gameplayer.game == game %} - {{ gameplayer.role.name }} + {{ gameplayer.role.name.title() }} {% endfor %}
    +
    +
    +
    + {% else %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %}