album.html 2.21 KB
Newer Older
1
{% extends 'base.html' %}
2
{% load staticfiles i18n thumbnail shared_thumbnail %}
3

4
5
{% block title %}{{ album.title }} — {% trans "Photos" %} — {{ block.super }}{% endblock %}

Joost Rijneveld's avatar
Joost Rijneveld committed
6
7
{% block css_head %}
{{ block.super }}
8
<link href="{% static "photos/css/style.scss" %}" rel="stylesheet" type="text/scss">
Joost Rijneveld's avatar
Joost Rijneveld committed
9
10
{% endblock %}

11
{% block body %}
WKuipers's avatar
WKuipers committed
12
13
14
15
16
17
18
<h1>{{ album.title }}
<span class="title-meta clearfix">
        <span><a href="{% url 'photos:album-download' album.slug %}" class="overlay-icon-download"></a></span>
        <span><a href="{% url 'photos:index' %}" class="back"></a></span>
    </span>
<span class="title-meta clearfix">
</h1>
19
<h2>{{ album.date|date:"d-m-Y" }}</h2>
20
21
22
23
24
25
26
27
{% if album.shareable %}
<p class="tcenter">
    {% trans "Note: This album can be shared with people outside the association by sending them the following link:" %}<br>
    <small><a href="{% url 'photos:shared_album' album.slug album.access_token %}">
        {{ request.get_host }}{% url 'photos:shared_album' album.slug album.access_token %}
    </a></small>
</p>
{% endif %}
28
<div class="gallery">
29
30
31
32
33
34
35
36
37
38
39
  <ul class="gallery-photos row">
    {% for photo in photos %}
    <li class="post gallery-photo span3 has-overlay {% if forloop.counter0|divisibleby:4 %}first-child{% endif %}">
      <a data-fancybox-rotation="{{ photo.rotation }}" class="gallery-box" rel="gallery"
        {% if album.shareable %}
        data-download="{% url 'photos:shared-download' album.slug album.access_token photo %}" href="{% shared_thumbnail album.slug album.access_token photo '1024x768' fit=False %}"
        {% else %}
        data-download="{% url 'photos:download' photo %}" href="{% thumbnail photo.file '1024x768' fit=False %}"
        {% endif %}>
        <span class="post-inner">
          <span class="inner-img">
40
            {% if album.shareable %}
41
            <img class="rotate{{ photo.rotation }}" src="{% shared_thumbnail album.slug album.access_token photo '220x220' %}" alt="" />
42
            {% else %}
43
44
45
46
47
48
49
50
51
52
            <img class="rotate{{ photo.rotation }}" src="{% thumbnail photo.file '220x220' %}" alt="" />
            {% endif %}
          </span>
          <span class="post-overlay">
          </span>
        </span>
      </a>
    </li>
    {% endfor %}
  </ul>
53
</div>
54
{% endblock %}