From 67afb7ac8f2369c50b2fa6649b6a2b78881a8dae Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:57:39 +0100 Subject: [PATCH] Basic UI pages --- truthseeker/routes/routes_ui.py | 17 +++++++++++++++-- truthseeker/templates/game.html | 3 +++ truthseeker/templates/index.html | 5 +++++ truthseeker/templates/lobby.html | 3 +++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 truthseeker/templates/game.html create mode 100644 truthseeker/templates/index.html create mode 100644 truthseeker/templates/lobby.html diff --git a/truthseeker/routes/routes_ui.py b/truthseeker/routes/routes_ui.py index 4e9f39c..70ce902 100644 --- a/truthseeker/routes/routes_ui.py +++ b/truthseeker/routes/routes_ui.py @@ -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/") +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") diff --git a/truthseeker/templates/game.html b/truthseeker/templates/game.html new file mode 100644 index 0000000..bf821c9 --- /dev/null +++ b/truthseeker/templates/game.html @@ -0,0 +1,3 @@ +game.html template +
+Return to index \ No newline at end of file diff --git a/truthseeker/templates/index.html b/truthseeker/templates/index.html new file mode 100644 index 0000000..a18b4ca --- /dev/null +++ b/truthseeker/templates/index.html @@ -0,0 +1,5 @@ +index.html template +
+Go to a lobby +
+Go to a solo game \ No newline at end of file diff --git a/truthseeker/templates/lobby.html b/truthseeker/templates/lobby.html new file mode 100644 index 0000000..6e411f2 --- /dev/null +++ b/truthseeker/templates/lobby.html @@ -0,0 +1,3 @@ +lobby.html template +
+Go to the multi game \ No newline at end of file