diff --git a/main.py b/main.py index 230072a..f9c392e 100644 --- a/main.py +++ b/main.py @@ -22,6 +22,12 @@ def home(): def background(): #return the background image return app.send_static_file('azul.webp') + +@app.route('/socket.io.js') +def socketio_js(): + #return the background image + return app.send_static_file('socket.io.js') + @app.route('/azul-flake.png') def logo(): #return the background image diff --git a/templates/create.html b/templates/create.html index 646a69f..4f3fb6d 100644 --- a/templates/create.html +++ b/templates/create.html @@ -10,40 +10,49 @@ flex-direction: column; justify-content: center; align-items: center; - margin-left: 20vw; - width: 60vw; - /* removed due to low visibility */ - /* background: url({{ url_for('static', filename='azul.webp') }}) no-repeat center center fixed; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; */ + margin-left: 10vw; + width: 80vw; + background-color: #000; + color: #fff; + color-scheme: dark; + } + + div { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + flex-wrap: wrap; /* Allow the flex items to wrap onto the next line */ + width: 100%; } form { - margin-top: 20px; - width: 300px; + margin-top: 20vh; + max-width: 40em; + min-width: 300px; margin: 0 auto; } input[type="text"] { - padding: 10px; - margin-top: 10px; + padding: 1em; + margin-top: 1em; width: 100%; box-sizing: border-box; - border: 2px solid #000; - border-radius: 4px; + border: 0.5em solid #000; + border-radius: 1em; } input[type="submit"] { - padding: 10px; - margin-top: 10px; + padding: 1em; + margin-top: 3em; width: 100%; background-color: #0000FF; color: #fff; border: none; - border-radius: 4px; + border-radius: 1em; cursor: pointer; + box-shadow: 0px 0.1em 0.5em rgba(255, 255, 255, 0.333); /* Add some shadow for depth */ + transition: background-color 0.3s ease; } input[type="submit"]:hover { @@ -51,12 +60,12 @@ } button { - padding: 10px; - margin-top: 10px; + padding: 1em; + margin-top: 1em; background-color: #0000FF; color: #fff; border: none; - border-radius: 4px; + border-radius: 0.5em; cursor: pointer; } @@ -67,13 +76,16 @@
{% if not game_id %} +Number of Players: {{ gamestate.n_players }}
Current Player: {{ gamestate.current_player }}
+Playing as: {{ player_name }}
Game Status: {% if gamestate.game_end %}Ended{% else %}Active{% endif %}
Rounds: {{ gamestate.rounds }}
Days: {{ gamestate.days }}
@@ -210,19 +277,20 @@(current)
+◉
+ {% else %} +○
+ {% endif %} + {% if player_name == name %} +Ready
@@ -261,32 +329,75 @@Playing as: {{ player_name }}
- + {% set current_index = gamestate.player_names.index(player_name) %} {% set next_index = current_index + 1 if current_index + 1 < gamestate.player_names|length else 0 %} @@ -339,7 +419,7 @@ - + - {% endif %} - - - -