{% extends tpl/layout.html %}

{% block title %}{{ $page }}/{{ $last_page }} | {{ $imagename }}{% endblock %}

{% block content %}

<div class="container">
  <div class="content-single">
    <div class="single-image">
      <img src="{{ $imageurl }}" title="{{ $page }}/{{ $last_page }}" />
    </div>
    {% if ($page > 1): %}
    <a id="link-prev" class="clickable clickable-left" href="/index.php?d={{ $dir }}&so={{ $sort }}&p={{ $prev_page }}&s=1&gs={{ $gallery_slice }}{{ $filter }}">
      <div></div>
    </a>
    {% endif %}
    <a id="link-home" class="clickable clickable-center" href="/index.php?d={{ $dir }}&so={{ $sort }}&p={{ $gallery_page }}&s={{ $gallery_slice }}{{ $filter }}">
      <div></div>
    </a>
    {% if ($page < $last_page): %}
    <a id="link-next" class="clickable clickable-right" href="/index.php?d={{ $dir }}&so={{ $sort }}&p={{ $next_page }}&s=1&gs={{ $gallery_slice }}{{ $filter }}">
      <div></div>
    </a>
    {% endif %}
  </div>
  <div class="page-footer">
    {% if(!empty($tags)): %}
    {% foreach($tags as $tag): %}
    <a href="/index.php?d={{ $dir }}&so={{ $sort }}&s={{ $gallery_slice }}&f={{{ $tag }}}"><span class="tag">{{ $tag }}</span></a>
    {% endforeach %}
    {% endif %}
  </div>
</div>
{% endblock %}