aboutsummaryrefslogtreecommitdiff
path: root/bgstack15-gallery-theme/templates/album_list.html
blob: 89559920dc0c754d8ccbbb61a7ebc6be2653477e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% extends "base.html" %}
{% block content %}
  {% set numbers = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] %}
  {% set column_size = settings.colorbox_column_size %}
  {% set nb_columns = (9 / column_size)|int %}
  {% set column_size_t = numbers[column_size] %}

  {% for alb in album.albums %}
    {% if loop.index % nb_columns == 1 %}
    <div id="albums" class="row">
    {% endif%}
      <div class="{{ column_size_t }} columns thumbnail">
        <a href="{{ alb.url }}">
          <img src="{{ alb.thumbnail }}" class="album_thumb"
              alt="{{ alb.title }}" title="{{ alb.title }}" /></a>
        <span class="album_title">{{ alb.title }}<p></span>
      </div>
    {% if loop.last or loop.index % nb_columns == 0 %}
    </div>
    {% endif%}
  {% endfor %}
{% endblock %}
bgstack15