aircox/website/templates/website/list.html

60 lines
1.7 KiB
HTML

{# Parameters are: #}
{# * pub: publication itself; pub.meta must have been eval() #}
{# * threads: list of parent, from top to bottom, including itself #}
{# #}
{# * views: a view object used to know which view to use for links #}
{# #}
{# {% extends embed|yesno:"website/single.html,website/base.html" %} #}
{% load i18n %}
{% load thumbnail %}
{# {% load website_views %} #}
<div class="post_list {{ classes }}">
{% for post in object_list %}
<a class="post_item"
href="post.get_detail_url">
{% if 'date' in list.fields or 'time' in list.fields %}
{% with post_date=post.get_date %}
<time datetime="{{ post_date }}" class="post_datetime">
{% if 'date' in list.fields %}
<span class="post_date">
{{ post_date|date:'D. d F' }},
</span>
{% endif %}
{% if 'time' in list.fields %}
<span class="post_time">
{{ post_date|date:'H:i' }},
</span>
{% endif %}
</time>
{% endwith %}
{% endif %}
{% if 'image' in list.fields %}
{% with post_image=post.get_image %}
<img src="{% thumbnail post_image "64x64" crop %}" class="post_image">
{% endwith %}
{% endif %}
{% if 'title' in list.fields %}
{% with post_title=post.get_title %}
<h4 class="post_title">post_title</h4>
{% endwith %}
{% endif %}
{% if 'content' in list.fields %}
{% with post_content=post.get_content %}
<div class="post_content">
{{ post_content|safe|striptags|truncatechars:"64" }}
</div>
{% endwith %}
{% endif %}
</a>
{% endfor %}
</div>