Added blog templates.
This commit is contained in:
parent
a6f8800a3f
commit
79140d46a5
7 changed files with 215 additions and 0 deletions
30
www/conservancy/templates/base_blog.html
Normal file
30
www/conservancy/templates/base_blog.html
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{% extends "base_standard.html" %}
|
||||||
|
|
||||||
|
{% block category %}blog{% endblock %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feeds/blog/" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block internal_navigate %}
|
||||||
|
|
||||||
|
<h3>Authors</h3>
|
||||||
|
<ul>
|
||||||
|
{% for author in all_authors %}
|
||||||
|
<li><a href="/blog/?author={{ author.username }}">{{ author.formal_name }}</a>
|
||||||
|
(<a href="/feeds/blog/?author={{ author.username }}">rss</a>)</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Tags</h3>
|
||||||
|
<ul>
|
||||||
|
{% for tag in all_tags %}
|
||||||
|
<li><a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>
|
||||||
|
(<a href="/feeds/blog/?tag={{ tag.slug }}">rss</a>)</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><a href="/blog/">All posts...</a></p>
|
||||||
|
<p><a href="/blog/query/">Query...</a></p>
|
||||||
|
|
||||||
|
{% endblock %}
|
20
www/conservancy/templates/blog/entry_archive_day.html
Normal file
20
www/conservancy/templates/blog/entry_archive_day.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{% extends "base_blog.html" %}
|
||||||
|
|
||||||
|
{% block subtitle %}Conservancy Blog Archive: {{ day|date:"F j, Y" }} - {% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h2>Conservancy Blog Archive: {{ day|date:"F j, Y" }}</h2>
|
||||||
|
|
||||||
|
{% for object in object_list %}
|
||||||
|
<div class="shaded">
|
||||||
|
<p class="date">{{ object.pub_date|date:"F j, Y" }}</p>
|
||||||
|
<h3><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h3>
|
||||||
|
{{ object.summary|safe }}
|
||||||
|
<p><span class="continued"><a href="{{ object.get_absolute_url }}">Read More...</a></span></p>
|
||||||
|
<p class="date small">Posted by <strong>{{ object.author.formal_name }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p>
|
||||||
|
{% if object.tags.all %}<p class="blog-tags small">Tags: {% for tag in object.tags.all %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endblock %}
|
20
www/conservancy/templates/blog/entry_archive_month.html
Normal file
20
www/conservancy/templates/blog/entry_archive_month.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{% extends "base_blog.html" %}
|
||||||
|
|
||||||
|
{% block subtitle %}Conservancy Blog Archive: {{ month|date:"F, Y" }} - {% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h2>Conservancy Blog Archive: {{ month|date:"F, Y" }}</h2>
|
||||||
|
|
||||||
|
{% for object in object_list %}
|
||||||
|
<div class="shaded">
|
||||||
|
<p class="date">{{ object.pub_date|date:"F j, Y" }}</p>
|
||||||
|
<h3><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h3>
|
||||||
|
{{ object.summary|safe }}
|
||||||
|
<p><span class="continued"><a href="{{ object.get_absolute_url }}">Read More...</a></span></p>
|
||||||
|
<p class="date small">Posted by <strong>{{ object.author.formal_name }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p>
|
||||||
|
{% if object.tags.all %}<p class="blog-tags small">Tags: {% for tag in object.tags.all %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endblock %}
|
16
www/conservancy/templates/blog/entry_archive_year.html
Normal file
16
www/conservancy/templates/blog/entry_archive_year.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{% extends "base_blog.html" %}
|
||||||
|
|
||||||
|
{% block subtitle %}Conservancy Blog Archive: {{ year }} - {% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h2>Conservancy Blog Archive: {{ year }}</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{% for object in object_list %}
|
||||||
|
<li><a href="{{ object.get_absolute_url }}"><b>{{ object.headline|safe }}</b></a><br/>
|
||||||
|
<i>{{ object.pub_date|date:"F j, Y" }} by {{ object.author.formal_name }}</i></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{% endblock %}
|
16
www/conservancy/templates/blog/entry_detail.html
Normal file
16
www/conservancy/templates/blog/entry_detail.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{% extends "base_blog.html" %}
|
||||||
|
|
||||||
|
{% block subtitle %}{{ object.headline|striptags }} - Conservancy Blog - {% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<p class="date">{{ object.pub_date|date:"F j, Y" }} by {{ object.author.formal_name }}</p>
|
||||||
|
<h2>{{ object.headline|safe }}</h2>
|
||||||
|
{{ object.body|safe }}
|
||||||
|
<p><i>Posted by <strong>{{ object.author.formal_name }}</strong> on {{ object.pub_date|date:"F j, Y" }}. Please email any comments on this entry to press@softwarefreedom.org</a>.</i></p>
|
||||||
|
|
||||||
|
{% if object.tags.all %}<p class="blog-tags">Tags: {% for tag in object.tags.all %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
||||||
|
|
||||||
|
<p><span class="continued"><a href="/blog/">Other Conservancy Blog entries...</a></span></p>
|
||||||
|
|
||||||
|
{% endblock %}
|
38
www/conservancy/templates/blog/entry_list.html
Normal file
38
www/conservancy/templates/blog/entry_list.html
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{% extends "base_blog.html" %}
|
||||||
|
{% block subtitle %}Conservancy Blog - {% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<h2><a href="/feeds/blog/" class="feedlink"><img src="/img/feed-icon-14x14.png" alt="[RSS]"/></a> Conservancy Blog{% if author %} — {{ author.formal_name }}{% endif %}</h2>
|
||||||
|
|
||||||
|
{% if authors or tags %}
|
||||||
|
<p>Displaying posts
|
||||||
|
{% if authors %}by {% for author in authors %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ author.biography_url }}">{{ author.formal_name }}</a>{% ifequal forloop.revcounter 2 %} and {% endifequal %}{% endfor %}{% endif %}
|
||||||
|
{% if tags %}tagged {% for tag in tags %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% ifequal forloop.revcounter 2 %} or {% endifequal %}{% endfor %}{% endif %}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for object in object_list %}
|
||||||
|
<div class="shaded">
|
||||||
|
<p class="date">{{ object.pub_date|date:"F j, Y" }} by {{ object.author.formal_name }}</p>
|
||||||
|
<h3><a href="{{ object.get_absolute_url }}">{{ object.headline|safe }}</a></h3>
|
||||||
|
{{ object.body|safe }}
|
||||||
|
<p class="date small">Posted by <strong>{{ object.author.formal_name }}</strong> on {{ object.pub_date|date:"F j, Y" }}</p>
|
||||||
|
{% if object.tags.all %}<p class="blog-tags small">Tags: {% for tag in object.tags.all %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% if has_next %}<a class="next_page_button" href="?page={{ next }}{% if query_string %}&{{ query_string|escape }}{% endif %}">Next page (older) »</a>{% endif %}
|
||||||
|
{% if has_previous %}<a href="?page={{ previous }}{% if query_string %}&{{ query_string|escape }}{% endif %}">« Previous page (newer)</a>{% endif %}
|
||||||
|
</p>
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
{% if date_list %}
|
||||||
|
<h3>Index by date</h3>
|
||||||
|
<ul>
|
||||||
|
{% for year in date_list %}<li><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
75
www/conservancy/templates/blog/query.html
Normal file
75
www/conservancy/templates/blog/query.html
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{% extends "base_blog.html" %}
|
||||||
|
{% block subtitle %}Conservancy Blog Query - {% endblock %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
<script type="text/javascript" src="/js/jquery-1.2.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
function my_display (sel, b) {
|
||||||
|
if (b) { sel.slideDown(); }
|
||||||
|
else { sel.slideUp(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
function my_display_instantly (sel, b) {
|
||||||
|
if (b) { sel.show(); }
|
||||||
|
else { sel.hide(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#all_authors").click(function () {
|
||||||
|
my_display($("#authors"), !this.checked);
|
||||||
|
});
|
||||||
|
$("#all_tags").click(function () {
|
||||||
|
my_display($("#tags"), !this.checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
my_display_instantly($("#authors"), !$("#all_authors").attr("checked"));
|
||||||
|
my_display_instantly($("#tags"), !$("#all_tags").attr("checked"));
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
div.query_indent { padding-left: 2em; }
|
||||||
|
div.query_indent table tr td { padding-right: 3em; padding-bottom: .3em; }
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<p>Return posts written by any of these authors...</p>
|
||||||
|
|
||||||
|
<div class="query_indent">
|
||||||
|
|
||||||
|
<p><input type="checkbox" name="all" value="authors" id="all_authors"/> <label>All authors</label></p>
|
||||||
|
|
||||||
|
<table id="authors"><tr><td>
|
||||||
|
{% for author in authors %}
|
||||||
|
<input type="checkbox" name="author" value="{{ author.username}}"/> <label>{{ author.formal_name }}</label>{% cycle </td><td>,</td><td>,</td></tr><tr><td> %}
|
||||||
|
{% endfor %}
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>marked with any of these tags...</p>
|
||||||
|
|
||||||
|
<div class="query_indent">
|
||||||
|
|
||||||
|
<p><input type="checkbox" name="all" value="tags" id="all_tags"/> <label>All tags</label></p>
|
||||||
|
|
||||||
|
<table id="tags"><tr><td>
|
||||||
|
{% for tag in tags %}
|
||||||
|
<input type="checkbox" name="tag" value="{{ tag.slug }}"/> <label>{{ tag.label }}</label>{% cycle </td><td>,</td><td>,</td></tr><tr><td> %}
|
||||||
|
{% endfor %}
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p><input type="submit" value="View blog entries"/></p>
|
||||||
|
<p><input type="submit" value="View RSS feed" name="rss"/></p>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{# get rid of side bar #}
|
||||||
|
{% block internal_navigate %}{% endblock %}
|
Loading…
Reference in a new issue