annotate bns_website/templates/news/news_list.html @ 23:1357c69e887d
- I added a little New badge for posts in the last 3 days.
- I added a <div class=""> tag to the news posts to group them within the same Bootstrap CSS alert block. I'm not sure if it's a good idea or not, but it's kind of cool.
author |
Bob Mourlam <bob.mourlam@gmail.com> |
date |
Mon, 31 Oct 2011 22:08:45 -0500 |
parents |
687af3cb0525 |
children |
ced908af601a 6b4e02b8be6b |
rev |
line source |
bob@14
|
1 {% extends 'base.html' %}
|
bob@14
|
2 {% load core_tags %}
|
bob@14
|
3 {% block title %}News{% endblock %}
|
bob@14
|
4
|
bob@14
|
5 {% block custom_css %}
|
bob@14
|
6 <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css">
|
bob@14
|
7 {% endblock %}
|
bob@14
|
8 {% block custom_js %}
|
bob@14
|
9 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
|
bob@14
|
10 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
|
bob@14
|
11 <script type="text/javascript">
|
bob@14
|
12 $(function() {
|
bob@14
|
13 $("#accordion").accordion({active: false});
|
bob@14
|
14 });
|
bob@14
|
15 </script>
|
bob@14
|
16 {% endblock %}
|
bob@14
|
17
|
bob@14
|
18 {% block content %}
|
bob@14
|
19 {% navbar 'news' %}
|
bob@14
|
20 <h1>News</h1>
|
bob@14
|
21 <dl>
|
bob@14
|
22 {% for news in object_list %}
|
bob@23
|
23 <div class="alert-message block-message info">
|
bob@23
|
24 <dt><h2>{{ news.title }} {% if news.is_new %}<span class="label success">New</span>{% endif %}</h2>
|
bob@23
|
25 </dt>
|
bob@14
|
26 <dd>{{ news.content|linebreaksbr }}</dd>
|
bob@23
|
27 <p align="right"> <span class="label">{{news.date}}</span></p>
|
bob@23
|
28 </div>
|
bob@14
|
29 <p/>
|
bob@14
|
30 {% endfor %}
|
bob@14
|
31 </dl>
|
bob@14
|
32
|
bob@14
|
33 {% endblock %}
|