diff --git a/www/conservancy/templates/blog/entry_partial.html b/www/conservancy/templates/blog/entry_partial.html new file mode 100644 index 0000000000000000000000000000000000000000..9511f757c86c35f92ebbd68f42bd11528968b4fa --- /dev/null +++ b/www/conservancy/templates/blog/entry_partial.html @@ -0,0 +1,49 @@ +{% 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 %} + +
+ +<{{ htag|default:"h3" }} + >{% if show|default:"body" != "body" %}{% endif %}{{ entry.headline|safe }}{% if show|default:"body" != "body" %}{% endif %} + +{% if show != "headline" %} +

by {{ entry.author.formal_name }} + on {{ entry.pub_date|date:"F j, Y" }} +

+ +{% if show != "dateline" %} + +{% if show|default:"body" == "body" %} +{{ entry.body|safe }} +{% else %} +{{ entry.summary|safe }} +{% endif %} + +{% if show|default:"body" != "body" %} +

Read More…

+{% endif %} + +{% if show != "summary" and entry.tags.exists %} +

Tags: + {% for tag in entry.tags.iterator %} + {{ tag.label }}{% if not forloop.last %}, {% endif %}{% endfor %}

+{% endif %} + +{% endif %}{# show != "dateline" #} +{% endif %}{# show != "headline" #} + +