Statistics
| Branch: | Tag: | Revision:

root / cloudcmsblog / templates / cloudcmsblog / archive.html @ db90a733

History | View | Annotate | Download (1.4 kB)

1
{% load applicationcontent_tags pagination_tags i18n %}
2

    
3
{% autopaginate entries ENTRIES_PER_PAGE %}
4
{% fragment request "maincol" %}
5
<div class="blog-entries">
6
    {% for entry in entries %}
7
    <div class="blog-entry">
8
        <h3 class="title">
9
            <a href="{{ entry.get_absolute_url }}">{{ entry.title|upper }}</a>
10
        </h3>
11
        {% if entry.image %}
12
        <div class="media">
13
        <img src="{{ entry.image.get_absolute_url }}" alt="{{ entry.title }}" />
14
        </div>
15
        {% endif %}
16
        {% if entry.intro_text %}
17
        <div class="intro-content">
18
            {{ entry.intro_text|safe|truncatewords:100 }}
19
            {% if entry.intro_text|safe|wordcount > 100 %}
20
                <a href="{{ entry.get_absolute_url }}">{% trans "read more" %}</a>
21
            {% endif %}
22
        </div>
23
        {% endif %}
24
        <div class="entry-info">
25
            {% trans "posted by" %} 
26
            <span class="author">{{ entry.author }}</span>
27
            {% trans "on" %} <span class="date">{{ entry.published_on }}</span>,
28
            {% trans "filed under" %}
29
            {% for c in entry.categories.all %}
30
            <a href="{{ c.get_absolute_url }}" title="{{ c|lower }} {% trans "posts" %}">
31
                {{ c|lower }}
32
            </a> {% if not forloop.last %},{% endif %}
33
            {% endfor %}
34
        </div>
35
    </div>
36
    {% endfor %}
37
</div>
38
<div class="pages">
39
    {% paginate %}
40
</div>
41
{% endfragment %}