Mercurial > public > madeira
changeset 112:4bd65fe0911f
Bootstrap: work on the news stories.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 20 Oct 2013 10:59:47 -0500 |
parents | 23efa49f5e29 |
children | 8a0076d7d041 |
files | madeira/templates/core/navbar_tag.html madeira/templates/news/news_detail.html madeira/templates/news/news_list.html madeira/templates/news/story.html static/css/theme.css |
diffstat | 5 files changed, 26 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/madeira/templates/core/navbar_tag.html Sat Oct 19 17:18:25 2013 -0500 +++ b/madeira/templates/core/navbar_tag.html Sun Oct 20 10:59:47 2013 -0500 @@ -11,7 +11,7 @@ <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li{% if active_tab == "home" %} class="active"{% endif %}><a href="{% url 'home' %}">Home</a></li> - <li class="dropdown"> + <li class="dropdown{% if active_tab == "news" or active_tab == "press" %} active{% endif %}"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Updates <b class="caret"></b></a> <ul class="dropdown-menu"> <li{% if active_tab == "news" %} class="active"{% endif %}><a href="{% url 'news-index' %}">News</a></li>
--- a/madeira/templates/news/news_detail.html Sat Oct 19 17:18:25 2013 -0500 +++ b/madeira/templates/news/news_detail.html Sun Oct 20 10:59:47 2013 -0500 @@ -1,10 +1,7 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | News{% endblock %} +{% block navblock %}{% navbar 'news' %}{% endblock %} {% block content %} -{% if story.title %} -<h1><a href="story.get_absolute_url">{{ story.date|date:"F d, Y" }} • {{ story.title }}</a></h1> -{% else %} -<h1><a href="story.get_absolute_url">{{ story.date|date:"F d, Y" }}</a></h1> -{% endif %} -<div>{{ story.content|safe }}</div> +{% include 'news/story.html' %} {% endblock %}
--- a/madeira/templates/news/news_list.html Sat Oct 19 17:18:25 2013 -0500 +++ b/madeira/templates/news/news_list.html Sun Oct 20 10:59:47 2013 -0500 @@ -1,21 +1,15 @@ {% extends 'base.html' %} +{% load core_tags %} {% block title %}The Madeira | News{% endblock %} +{% block navblock %}{% navbar 'news' %}{% endblock %} {% block content %} <h1>News</h1> {% if news_list %} {% for story in news_list %} - {% if story.title %} - <h2><a href="{{ story.get_absolute_url }}">{{ story.date|date:"F d, Y" }} • {{ story.title }}</a></h2> - {% else %} - <h2><a href="{{ story.get_absolute_url }}">{{ story.date|date:"F d, Y" }}</a></h2> - {% endif %} - <div>{{ story.content|safe }}</div> + {% include 'news/story.html' %} {% endfor %} - {% include 'pagination.html' %} - {% else %} <p>No news at this time.</p> {% endif %} - {% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/madeira/templates/news/story.html Sun Oct 20 10:59:47 2013 -0500 @@ -0,0 +1,7 @@ +{% if story.title %} +<h1><a href="{{ story.get_absolute_url }}">{{ story.title }}</a></h1> +<p><em><small>{{ story.date|date:"F d, Y" }}</small></em></p> +{% else %} +<h1><a href="{{ story.get_absolute_url }}">{{ story.date|date:"F d, Y" }}</a></h1> +{% endif %} +<article class="news">{{ story.content|safe }}</article>
--- a/static/css/theme.css Sat Oct 19 17:18:25 2013 -0500 +++ b/static/css/theme.css Sun Oct 20 10:59:47 2013 -0500 @@ -7,3 +7,15 @@ margin-top: 1em; margin-bottom: 1em; } +img.floatLeftBox { + float: left !important; + margin-right: 1.5em; + margin-bottom: 1.0em; +} + +article.news ul { + display: table; +} +article.news ol { + display: table; +}