forked from rc/aircox
split website and cms; work on sections
This commit is contained in:
46
cms/templates/cms/list.html
Normal file
46
cms/templates/cms/list.html
Normal file
@ -0,0 +1,46 @@
|
||||
{# {% extends embed|yesno:"website/single.html,website/base.html" %} #}
|
||||
|
||||
{% load i18n %}
|
||||
{% load thumbnail %}
|
||||
{# {% load website_views %} #}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="post_list {{ classes }}">
|
||||
{% for post in object_list %}
|
||||
<a class="post_item"
|
||||
href="{{ post.detail_url }}">
|
||||
{% if 'date' in list.fields or 'time' in list.fields %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
{% if 'image' in list.fields %}
|
||||
<img src="{% thumbnail post.image "64x64" crop %}" class="post_image">
|
||||
{% endif %}
|
||||
|
||||
{% if 'title' in list.fields %}
|
||||
<h4 class="post_title">{{ post.title }}</h4>
|
||||
{% endif %}
|
||||
|
||||
{% if 'content' in list.fields %}
|
||||
<div class="post_content">
|
||||
{{ post.content|safe|striptags|truncatechars:"64" }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user