From 7b73c0ff8c8caa546442e3e3311867f2c6159754 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 6 Jul 2010 20:33:03 -0500 Subject: Get news markdown formatting working everywhere Signed-off-by: Dan McGee --- media/archweb.css | 3 ++- templates/feeds/news_description.html | 7 +++---- templates/news/add.html | 2 +- templates/news/view.html | 2 +- templates/public/index.html | 3 ++- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/media/archweb.css b/media/archweb.css index e5781c0c..4969db19 100644 --- a/media/archweb.css +++ b/media/archweb.css @@ -104,8 +104,9 @@ ul.errorlist { color: red; } /* home: news */ #news { margin-top: 1.5em; } -#news p { margin-bottom: 1.5em; } #news h3 { border-bottom: 1px solid #888; } +#news div { margin-bottom: 1em; } +#news div p { margin-bottom: 0.5em; } #news .more { font-weight: normal; } #news .rss-icon { float: right; margin: -1.6em 0.4em 0 0; } #news h4 { font-size: 1em; margin-top: 1.5em; border-bottom: 1px dotted #bbb; } diff --git a/templates/feeds/news_description.html b/templates/feeds/news_description.html index c428b9e2..a1e6446f 100644 --- a/templates/feeds/news_description.html +++ b/templates/feeds/news_description.html @@ -1,4 +1,3 @@ -{% autoescape off %} -{{obj.author.get_full_name}} wrote:
-{{ obj.content }} -{% endautoescape %} +{% load markup %} +

{{obj.author.get_full_name}} wrote:

+{{ obj.content|markdown }} diff --git a/templates/news/add.html b/templates/news/add.html index 51f4d304..48b013f0 100644 --- a/templates/news/add.html +++ b/templates/news/add.html @@ -30,7 +30,7 @@ {% load cdn %}{% jquery %}