summaryrefslogtreecommitdiff
path: root/views/http/villages.twig
diff options
context:
space:
mode:
Diffstat (limited to 'views/http/villages.twig')
-rw-r--r--views/http/villages.twig38
1 files changed, 38 insertions, 0 deletions
diff --git a/views/http/villages.twig b/views/http/villages.twig
new file mode 100644
index 0000000..bdb87be
--- /dev/null
+++ b/views/http/villages.twig
@@ -0,0 +1,38 @@
+{% extends 'base.twig' %}
+
+{% block main %}
+<table>
+ <thead>
+ <tr>
+ <td>Name</td>
+ <td>Coordinates</td>
+ <td>Wood</td>
+ <td>Clay</td>
+ <td>Iron</td>
+ <td>Food</td>
+ <td>Storage</td>
+ <td>Satisfaction</td>
+ </tr>
+ </thead>
+ <tbody>
+ {% for village in villages %}
+ <tr>
+ <td>
+ <a href="/village/{{ village.x}}/{{ village.y }}">
+ {{ village.name }}
+ </a>
+ </td>
+ <td>
+ { x: {{ village.x }}, y: {{ village.y }} }
+ </td>
+ <td>{{ village.wood }}</td>
+ <td>{{ village.clay }}</td>
+ <td>{{ village.iron }}</td>
+ <td>{{ village.food }}</td>
+ <td>{{ village.getStorage(village.id).getCapacity() * (25 / 100) }}</td>
+ <td>{{ village.satisfaction }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endblock %}