Basic UI pages

This commit is contained in:
Thomas Rubini 2022-12-01 10:57:39 +01:00
parent 8f2a4cea04
commit 67afb7ac8f
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373
4 changed files with 26 additions and 2 deletions

View File

@ -6,5 +6,18 @@ from truthseeker.logic import game_logic
routes_ui = flask.Blueprint("ui", __name__) routes_ui = flask.Blueprint("ui", __name__)
@routes_ui.route("/") @routes_ui.route("/")
def hello(): def index():
return "Hello World!" return flask.render_template("index.html")
@routes_ui.route("/lobby/<game_id>")
def lobby(game_id):
# rendered by the javascript client-side
return flask.render_template("lobby.html")
@routes_ui.route("/solo")
def solo():
return flask.render_template("game.html")
@routes_ui.route("/multi")
def multi():
return flask.render_template("game.html")

View File

@ -0,0 +1,3 @@
game.html template
<br>
<a href="/">Return to index</a>

View File

@ -0,0 +1,5 @@
index.html template
<br>
<a href="/lobby/ABCDEF">Go to a lobby</a>
<br>
<a href="/solo">Go to a solo game</a>

View File

@ -0,0 +1,3 @@
lobby.html template
<br>
<a href="/multi">Go to the multi game</a>