topik-cell.html 871 Bytes
Newer Older
fred's avatar
fred committed
1
2
3
{% load thumbnail %}
{% if cell.topik %}
<div class="topikcellcontent topik-{{cell.slug}}">
4
<a class="block cf" href="{{cell.topik.page.get_online_url}}">
5
<span class="logo">
fred's avatar
fred committed
6
{% if cell.slug == "large" %}
fred's avatar
fred committed
7
{% thumbnail cell.topik.image "800x450" crop="50% 25%" as im %}
8
<div class="logo">
fred's avatar
fred committed
9
<img class="normal" src="{{im.url}}"/>
10
</div>
fred's avatar
fred committed
11
12
{% endthumbnail %}
{% else %}
13
14
{% thumbnail cell.topik.image "480x320" crop="50% 25%" as im %}
<div class="logo">
fred's avatar
fred committed
15
<img class="normal" src="{{im.url}}"/>
16
</div>
fred's avatar
fred committed
17
18
{% endthumbnail %}
{% endif %}
19
</span>
fred's avatar
fred committed
20
21
<div>
  {% if cell.slug == "large" %}
22
23
24
  <h2>{{cell.topik.page.title}}</h2>
  {% else %}
  <h5>{{cell.topik.page.title}}</h5>
fred's avatar
fred committed
25
  {% endif %}
26
  <div class="description">
fred's avatar
fred committed
27
28
29
30
31
  {% if cell.slug == "large" %}
    {{cell.text|safe}}
  {% else %}
    {{cell.text|safe|striptags|truncatewords:75}}
  {% endif %}
32
  </div>
fred's avatar
fred committed
33
34
35
36
</div>
</a>
</div>
{% endif %}