From e5a243a52b910e35b10b26c06aa8978356b86769 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 2 Dec 2023 14:14:34 +0100 Subject: login and events --- views/base.twig | 2 ++ views/error.twig | 8 ++++++++ views/login.twig | 17 +++++++++++++++++ views/village.twig | 16 +++++++++++----- 4 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 views/error.twig create mode 100644 views/login.twig (limited to 'views') diff --git a/views/base.twig b/views/base.twig index 0063e31..15ddafd 100644 --- a/views/base.twig +++ b/views/base.twig @@ -5,7 +5,9 @@
+ Logged in as {{ session.user.username }}
diff --git a/views/error.twig b/views/error.twig new file mode 100644 index 0000000..f9d70cd --- /dev/null +++ b/views/error.twig @@ -0,0 +1,8 @@ +{% extends 'root.twig' %} + +{% block body %} +
+ {{ message }} + Back +
+{% endblock %} diff --git a/views/login.twig b/views/login.twig new file mode 100644 index 0000000..095f53e --- /dev/null +++ b/views/login.twig @@ -0,0 +1,17 @@ +{% extends 'root.twig' %} + +{% block body %} +
+
+ + + +
+
+{% endblock %} diff --git a/views/village.twig b/views/village.twig index d2b8a4e..97d65f7 100644 --- a/views/village.twig +++ b/views/village.twig @@ -84,7 +84,8 @@ - {% for event in events['UpgradeBuilding'] %} + {% for typeEvents in events['UpgradeBuilding'] %} + {% for event in typeEvents %} {{ event.type }} @@ -97,6 +98,7 @@ {% endfor %} + {% endfor %} {% endif %} @@ -190,21 +192,21 @@ {{ building.type | default(type) }} {{ building.level | default(0) }} - {{ building.getBuildTime() | buildTime }} + {{ building.getBuildTimeForLevel(building.getEffectiveLevel() + 1) | buildTime }} - {{ building.getResourceRequirements()['wood'] }} + {{ building.getResourceRequirementsForLevel(building.getEffectiveLevel() + 1)['wood'] }}   - {{ building.getResourceRequirements()['clay'] }} + {{ building.getResourceRequirementsForLevel(building.getEffectiveLevel() + 1)['clay'] }}   - {{ building.getResourceRequirements()['iron'] }} + {{ building.getResourceRequirementsForLevel(building.getEffectiveLevel() + 1)['iron'] }} @@ -235,6 +237,7 @@ {{ unit.type }} {{ unit.amount }} + {% if not unit.isTraveling %} {{ unit.getBuildTime(1) | buildTime }} @@ -265,6 +268,9 @@ + {% else %} + ~traveling~ + {% endif %} {% endfor %} -- cgit v1.2.3