From 6ee65265a051933ee154c42490fdc509b9994202 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 12 Mar 2012 13:13:11 -0400 Subject: Show first 300 words of most recent news item on home page And 100 words of every other news item. We might as well make the most recent item more prominent. I'm not displaying it in full only so the front page doesn't look like a blog; 95% of our news items are under 300 words. Signed-off-by: Dan McGee --- templates/public/index.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'templates/public') diff --git a/templates/public/index.html b/templates/public/index.html index a57ed8aa..00edf8c4 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -9,7 +9,6 @@ {% block content_left %} {% cache 62 main-page-left secure %}
-

A simple, lightweight distribution

You've reached the website for Arch Linux, a @@ -33,11 +32,9 @@

A simple, lightweight distribution

Learn more...

-
-

Latest News @@ -53,7 +50,10 @@

title="View full article: {{ news.title }}">{{ news.title }}

{{ news.postdate|date }}

-
{{ news.content|markdown|truncatewords_html:75 }}
+
+ {% if forloop.counter0 == 0 %}{{ news.content|markdown|truncatewords_html:300 }} + {% else %}{{ news.content|markdown|truncatewords_html:100 }}{% endif %} +
{% else %} {% if forloop.counter0 == 5 %}

@@ -73,7 +73,6 @@

{% endif %} {% endif %} {% endfor %} -

{% endcache %} {% endblock %} @@ -81,7 +80,6 @@

{% block content_right %} {% cache 59 main-page-right secure %}
-
@@ -92,7 +90,6 @@

-

Recent Updates (more)

@@ -113,7 +110,6 @@

Recent Updates (