2016-12-30 23:06:20 +00:00
|
|
|
{% comment %}
|
|
|
|
|
|
|
|
This partial requires these parameters:
|
|
|
|
|
|
|
|
* `entry`: The BlogEntry object to render.
|
|
|
|
|
|
|
|
This partial accepts these optional parameters:
|
|
|
|
|
|
|
|
* `show`: How much of the BlogEntry to render. Accepted values are
|
|
|
|
"headline", "dateline", "summary", "summary+tags", and "body".
|
|
|
|
Every value will render the parts listed before it, except "body"
|
|
|
|
doesn't include "summary". Default "body".
|
|
|
|
* `htag`: Name of the HTML tag to render the entry headline. Default "h3".
|
|
|
|
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
|
|
<div class="blog-entry">
|
|
|
|
|
2016-12-31 03:13:50 +00:00
|
|
|
<{{ htag|default:"h3" }} class="clear"
|
2016-12-30 23:06:20 +00:00
|
|
|
>{% if show|default:"body" != "body" %}<a href="{{ entry.get_absolute_url }}"
|
2021-12-17 21:56:14 +00:00
|
|
|
>{% endif %}{{ entry.headline|safe }}{% if show|default:"body" != "body" %}</a>{% endif %}</{{ htag|default:"h3" }}>
|
2016-12-30 23:06:20 +00:00
|
|
|
|
|
|
|
{% if show != "headline" %}
|
|
|
|
<p class="date">by <span class="author">{{ entry.author.formal_name }}</span>
|
|
|
|
on {{ entry.pub_date|date:"F j, Y" }}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{% if show != "dateline" %}
|
|
|
|
|
|
|
|
{% if show|default:"body" == "body" %}
|
|
|
|
{{ entry.body|safe }}
|
|
|
|
{% else %}
|
|
|
|
{{ entry.summary|safe }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if show|default:"body" != "body" %}
|
|
|
|
<p><a class="continued" href="{{ entry.get_absolute_url }}">Read More…</a></p>
|
|
|
|
{% endif %}
|
2017-09-13 16:46:38 +00:00
|
|
|
{% if show != "summary" %}
|
2017-09-13 16:40:36 +00:00
|
|
|
<p class="permalink"><a href="{{ entry.get_absolute_url }}">[permalink]</a></p>
|
|
|
|
{% endif %}
|
2016-12-30 23:06:20 +00:00
|
|
|
|
|
|
|
{% if show != "summary" and entry.tags.exists %}
|
|
|
|
<p class="blog-tags">Tags:
|
|
|
|
{% for tag in entry.tags.iterator %}
|
|
|
|
<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}{# show != "dateline" #}
|
|
|
|
{% endif %}{# show != "headline" #}
|
|
|
|
|
|
|
|
</div>
|