Mercurial > public > bravenewsurf
changeset 39:b9d6f6d930a9
Merged Chris and Brian's changes with mine.
author | Bob Mourlam <bob.mourlam@gmail.com> |
---|---|
date | Sun, 06 Nov 2011 20:28:25 -0600 |
parents | 6b4e02b8be6b (diff) 1eb4b4072888 (current diff) |
children | 5c0f9d80442e |
files | bns_website/static/css/base.css bns_website/templates/news/news_list.html |
diffstat | 3 files changed, 10 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/bns_website/news/models.py Sun Nov 06 14:19:12 2011 -0600 +++ b/bns_website/news/models.py Sun Nov 06 20:28:25 2011 -0600 @@ -15,7 +15,7 @@ def is_new(self): - if datetime.now() - self.date <= timedelta(days=3): + if datetime.now() - self.date <= timedelta(days=30): return True return False
--- a/bns_website/static/css/base.css Sun Nov 06 14:19:12 2011 -0600 +++ b/bns_website/static/css/base.css Sun Nov 06 20:28:25 2011 -0600 @@ -1,4 +1,4 @@ -body { +body { padding-top: 60px } .social-sharing { @@ -24,3 +24,6 @@ li.review-list-item { margin-bottom: 30px; } +#article { + margin-bottom: 1.5em; +} \ No newline at end of file
--- a/bns_website/templates/news/news_list.html Sun Nov 06 14:19:12 2011 -0600 +++ b/bns_website/templates/news/news_list.html Sun Nov 06 20:28:25 2011 -0600 @@ -2,31 +2,16 @@ {% load core_tags %} {% block title %}News{% endblock %} -{% block custom_css %} -<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css"> -{% endblock %} -{% block custom_js %} -<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> -<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script> -<script type="text/javascript"> - $(function() { - $("#accordion").accordion({active: false}); - }); -</script> -{% endblock %} - {% block content %} {% navbar 'news' %} <h1>News</h1> <dl> {% for news in object_list %} -<div class="alert-message block-message info"> -<dt><h2>{{ news.title }} {% if news.is_new %}<span class="label success">New</span>{% endif %}</h2> -</dt> -<dd>{{ news.content|safe }}</dd> -<p align="right"> <span class="label">{{news.date}}</span></p> -</div> -<p/> +<article id="article"><h2>{{ news.title }} {% if news.is_new %}<span class="label success">New</span>{% endif %}</h2> + <div>{{ news.content|safe }}</div> + <small><b>{{ news.date }}</b></small> +</article> + {% endfor %} </dl>