]> git.0d.be Git - panikweb.git/blobdiff - panikweb/templates/panikombo/topik-cell.html
move static & templates to panikweb project directory
[panikweb.git] / panikweb / templates / panikombo / topik-cell.html
diff --git a/panikweb/templates/panikombo/topik-cell.html b/panikweb/templates/panikombo/topik-cell.html
new file mode 100644 (file)
index 0000000..d9ffe24
--- /dev/null
@@ -0,0 +1,36 @@
+{% load thumbnail %}
+{% if cell.topik %}
+<div class="topikcellcontent topik-{{cell.slug}}">
+<a class="block cf" href="{{cell.topik.page.get_online_url}}">
+<span class="logo">
+{% if cell.slug == "large" %}
+{% thumbnail cell.topik.image "800x450" crop="50% 25%" as im %}
+<div class="logo">
+<img class="normal" src="{{im.url}}"/>
+</div>
+{% endthumbnail %}
+{% else %}
+{% thumbnail cell.topik.image "480x320" crop="50% 25%" as im %}
+<div class="logo">
+<img class="normal" src="{{im.url}}"/>
+</div>
+{% endthumbnail %}
+{% endif %}
+</span>
+<div>
+  {% if cell.slug == "large" %}
+  <h2>{{cell.topik.page.title}}</h2>
+  {% else %}
+  <h5>{{cell.topik.page.title}}</h5>
+  {% endif %}
+  <div class="description">
+  {% if cell.slug == "large" %}
+    {{cell.text|safe}}
+  {% else %}
+    {{cell.text|safe|striptags|truncatewords:75}}
+  {% endif %}
+  </div>
+</div>
+</a>
+</div>
+{% endif %}