forked from rc/aircox
bunch of work; separate publications from programs, start to work on website
This commit is contained in:
59
website/templates/website/list.html
Normal file
59
website/templates/website/list.html
Normal file
@ -0,0 +1,59 @@
|
||||
{# 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>
|
||||
|
||||
|
Reference in New Issue
Block a user