]> git.0d.be Git - panikweb.git/blobdiff - espeweb/templates/news/inline.html
mutate into an addon module for panikweb
[panikweb.git] / espeweb / templates / news / inline.html
diff --git a/espeweb/templates/news/inline.html b/espeweb/templates/news/inline.html
new file mode 100644 (file)
index 0000000..677a43b
--- /dev/null
@@ -0,0 +1,40 @@
+{% load thumbnail staticfiles %}
+<div class="content content-inline {% if class != "special" %}inline{% endif %} cf {{ class }}">
+       <a class="block cf" href="{% url 'newsitem-view' slug=content.slug %}">
+               {% if class == "special" and content.category %}
+                       <div class="label labels absolute">
+                               <span class="item inBlock">{{ content.category.title }}</span>
+                       </div>
+               {% endif %}
+
+               <div class="logo">
+               {% if class == "special" and content.image %}
+                       {% thumbnail content.image "480x320" crop="50% 25%" as im %}
+                       <img class="normal" src="{{im.url}}"/>
+                       {% endthumbnail %}
+               {% elif content.image %}
+                       {% thumbnail content.image "60x60" crop="50% 25%" as im %}
+                       <img class="left" width="60" height="60" src="{{im.url}}"/>
+                       {% endthumbnail %}
+               {% elif content.emission.image %}
+                       {% thumbnail content.emission.image "60x60" crop="50% 25%" as im %}
+                       <img class="left" width="60" height="60" src="{{im.url}}"/>
+                       {% endthumbnail %}
+               {% else %}
+                       <img class="left" width="60" height="60" src="{% static "img/actu.png" %}"/>
+               {% endif %}
+               </div>
+               <div class="content">
+                       <h5 class="title">{{ content.title }}</h5>
+                       {% if class == "special" %}
+                       <div class="description">
+                               {{ content.text|safe|striptags|truncatewords:75}}
+                       </div>
+                       {% endif %}
+               </div>
+               {% if content.date %}
+                       <div class="smooth">PubliĆ©e le {{ content.date|date:"d/m/Y" }}</div>
+               {% endif %}
+
+       </a>
+</div>