]> git.0d.be Git - panikweb.git/blob - panikweb_templates/templates/combo/gallery.html
add "support" for portrait galleries
[panikweb.git] / panikweb_templates / templates / combo / gallery.html
1 {% load thumbnail %}
2 {% if cell.title %}<h3>{{ cell.title }}</h3>{% endif %}
3 <div class="gallery" id="gallery-{{cell.id}}">
4 {% for image in cell.image_set.all %}
5   {% if forloop.first %}
6 <div class="first" style="display: none;">
7 <img src="#"/>
8 </div>
9 <div>
10   {% endif %}
11 {% thumbnail image.image "200x100" crop="50% 25%" as im %}
12 {% if cell.slug == 'portrait' %}
13 {% thumbnail image.image "480x640" crop="50% 25%" as im_large %}
14 <span data-image-large="{{ im_large.url }}"><img src="{{ im.url }}"
15         {% if image.title %} title="{{image.title}}" {% endif %}/></span>
16 {% endthumbnail %}
17 {% else %}
18 {% thumbnail image.image "640x480" crop="50% 25%" as im_large %}
19 <span data-image-large="{{ im_large.url }}"><img src="{{ im.url }}"
20         {% if image.title %} title="{{image.title}}" {% endif %}/></span>
21 {% endthumbnail %}
22
23 {% endif %}
24 {% endthumbnail %}
25 {% endfor %}
26 </div>
27 </div>