Merge pull request #8 from ThomasRubini/server_ui

Basic UI pages
This commit is contained in:
Djalim Simaila 2022-12-01 11:40:45 +01:00 committed by GitHub
commit 96a5271822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.route("/")
def hello():
return "Hello World!"
def index():
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>