From 5bcba2b19093613581ba5ac4030d2e46f6f78dcd Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 23 May 2020 16:34:20 -0700 Subject: [PATCH] empires: Bring in game client code as a template So far, this is identical to the static HTML file we were using before, but the idea is that, here as a template, we can add some dynamic elements, (such as the game ID). --- empires.js | 2 +- templates/empires-game.html | 78 +++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 templates/empires-game.html diff --git a/empires.js b/empires.js index d8cff6f..e6b7e77 100644 --- a/empires.js +++ b/empires.js @@ -259,7 +259,7 @@ app.get('/', (request, response) => { if (! request.session.nickname) response.render('choose-nickname.html'); else - response.sendFile(path.join(__dirname, './game.html')); + response.render('empires-game.html'); }); app.post('/register', (request, response) => { diff --git a/templates/empires-game.html b/templates/empires-game.html new file mode 100644 index 0000000..a3175e5 --- /dev/null +++ b/templates/empires-game.html @@ -0,0 +1,78 @@ +{% extends "base.html" %} + +{% block head %} + + +{% endblock %} + +{% block page %} + + + ⚙ + + +
+ + + +
+ +

The Game of Empires

+ +
+

+ Contacting server. Please wait... +

+
+ +
+ +

Choose your character

+ +

+ This can be anyone (real or fictional), but should be + someone that all players of the game are familiar with. +

+ +

+ Hint: Choosing an ideal character name is the key to doing + well in Empires. You definitely don't want a character that + everyone will know that only you would have chosen. +

+ + +
+
+ + +
+ +
+ +
+
+ +
+ +
+

Watch and memorize each character!

+ + +
+ +
+

Players in the game

+ + +
+{% endblock %} + -- 2.43.0