summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-06 20:33:03 -0500
committerDan McGee <dan@archlinux.org>2010-07-06 20:33:03 -0500
commit7b73c0ff8c8caa546442e3e3311867f2c6159754 (patch)
tree9cce13bc2d25cc00ebb29f91ffd01fb969e7f0f9
parentad162d74db6718b2ba7dd1ab2e1f21847a7c7744 (diff)
Get news markdown formatting working everywhere
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--media/archweb.css3
-rw-r--r--templates/feeds/news_description.html7
-rw-r--r--templates/news/add.html2
-rw-r--r--templates/news/view.html2
-rw-r--r--templates/public/index.html3
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:<br />
-{{ obj.content }}
-{% endautoescape %}
+{% load markup %}
+<p>{{obj.author.get_full_name}} wrote:</p>
+{{ 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 @@
<div class="news-article box" style="display:none;">
<h2>News Preview: <span id="previewtitle"></span></h2>
- <div id="previewdata"></div>
+ <div id="previewdata" class="article-content"></div>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript">
diff --git a/templates/news/view.html b/templates/news/view.html
index 64c510e3..a7c25a43 100644
--- a/templates/news/view.html
+++ b/templates/news/view.html
@@ -18,7 +18,7 @@
<p class="article-info">{{ news.postdate }} - {{ news.author.get_full_name }}</p>
- <div>{{ news.content|markdown }}</div>
+ <div class="article-content">{{ news.content|markdown }}</div>
</div>
{% endblock %}
diff --git a/templates/public/index.html b/templates/public/index.html
index 4f248fd5..19b43c66 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load markup %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" />
@@ -44,7 +45,7 @@
<h4><a href="{{ news.get_absolute_url }}"
title="View full article: {{ news.title }}">{{ news.title }}</a></h4>
<p class="timestamp">{{ news.postdate }}</p>
- <p>{{ news.content|striptags|truncatewords:50 }}</p>
+ <div class="article-content">{{ news.content|markdown|truncatewords_html:75 }}</div>
{% endfor %}
</div><!-- #news -->