From 456f08d9a8e444253b5915cf6d43ed3261fd24f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 16 Jan 2014 14:18:28 +0100 Subject: [PATCH] [add] first picture of each entry displayed on listing --- app/views/_entry.twig | 6 ++++++ web/assets/css/custom.css | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/app/views/_entry.twig b/app/views/_entry.twig index fe32d4b..ae43615 100644 --- a/app/views/_entry.twig +++ b/app/views/_entry.twig @@ -1,5 +1,11 @@

{{ entry.title }}

+ {% set picture = entry.content|getPicture %} + {% if picture != "" %} +
+ +
+ {% endif %}

{{ entry.content|striptags|slice(0, 300) }}…