split website and cms; work on sections

This commit is contained in:
bkfox
2015-10-01 16:24:06 +02:00
parent 8d561a1f7b
commit 17aa33fe04
10 changed files with 431 additions and 351 deletions

View 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 %}