From 7f50fccad1b879806fe54ef553f1864ff0f9748d Mon Sep 17 00:00:00 2001 From: gilsondev Date: Wed, 10 Dec 2014 16:00:35 -0200 Subject: [PATCH] Truncate summary and define headline in articles --- templates/article.html | 6 +++++- templates/index.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/article.html b/templates/article.html index b27912a..316d968 100755 --- a/templates/article.html +++ b/templates/article.html @@ -29,7 +29,11 @@

{{ article.title }}

-

{{ article.summary }}

+ {% if article.headline %} +

{{ article.headline }}

+ {% else %} +

{{ article.summary|truncate(140) }}

+ {% endif %} Posted by {% for author in article.authors %} {{ author }} diff --git a/templates/index.html b/templates/index.html index 38cbae5..388840e 100755 --- a/templates/index.html +++ b/templates/index.html @@ -31,7 +31,7 @@ {% if article.summary %} - {{ article.summary|truncate(25) }} + {{ article.summary|truncate(140) }} {% endif %}