diff options
Diffstat (limited to 'views/http/map.twig')
-rw-r--r-- | views/http/map.twig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/views/http/map.twig b/views/http/map.twig index 29f0294..a05fea2 100644 --- a/views/http/map.twig +++ b/views/http/map.twig @@ -3,13 +3,13 @@ {% block main %} <div class="map"> <div class="map__up"> - <a href="/map/{{ x }}/{{ y - 1 }}"> + <a href="/map/{{ x }}/{{ y - 1 }}/{{ range }}"> <i class="icon icon-arrow-up"></i> </a> </div> <div> <div class="map__left"> - <a href="/map/{{ x - 1 }}/{{ y }}"> + <a href="/map/{{ x - 1 }}/{{ y }}/{{ range }}"> <i class="icon icon-arrow-left"></i> </a> </div> @@ -17,7 +17,9 @@ {% for row in range(-range, range) %} {% for column in range(-range, range) %} {% set village = map[x + column][y + row] %} - <div class="map__village"> + <div class="map__village {% if row == 0 and column == 0 %}map__village--center{% endif %}"> + <!-- TODO: add link to center on tile in top left --> + <a class="center-anchor" title="move to center" href="/map/{{ x + column }}/{{ y + row }}/{{ range }}">c</a> {% if village %} <a href="/village/{{ village.x }}/{{ village.y }}"> {{ map[x + column][y + row].name }} @@ -28,13 +30,13 @@ {% endfor %} </div> <div class="map__right"> - <a href="/map/{{ x + 1 }}/{{ y }}"> + <a href="/map/{{ x + 1 }}/{{ y }}/{{ range }}"> <i class="icon icon-arrow-right"></i> </a> </div> </div> <div class="map__down"> - <a href="/map/{{ x }}/{{ y + 1 }}"> + <a href="/map/{{ x }}/{{ y + 1 }}/{{ range }}"> <i class="icon icon-arrow-down"></i> </a> </div> |