summaryrefslogtreecommitdiff
path: root/themes/erdgeist/templates/list_blogposts.tmpl
blob: 093d520f972dcf3ee8f01fbd6419154ce8f59fe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## -*- coding: utf-8 -*-
<%block name="content">
<!-- Begin post-list ${post_list_id} -->

<script>
function toggleClass(id) {
  var node  = document.getElementById("post-body-"+id);
  var node2 = document.getElementById("showfull-"+id);
  var nc = node.className.replace(/ full$/, '');
  if( node.className != nc ) {
    node.className = nc;
    node2.className="glyphicon glyphicon-chevron-up";
  } else {
    node.className += ' full';
    node2.className="glyphicon glyphicon-chevron-down";
  }
}
</script>


<div id="${post_list_id}" class="post-list">
    %if posts:
    <ul class="post-list list-unstyled">
        % for post in posts:
            <li class="post-list-item">
                <div class="post-list-headline">
                    <a href="${post.permalink()}"><div class="post-date">${post.formatted_date(date_format)}</div></a>
                    <div style="cursor: pointer" onclick="toggleClass(${loop.index})">
                        <span class="glyphicon glyphicon-chevron-up" id="showfull-${loop.index}"></span><span>${post.title(lang)}</span>
                    </div>
                </div>
                <div class="post-body" id="post-body-${loop.index}">
                 ${post.text( teaser_only = true, show_read_more_link = true) }
               </div>
           </li>
        % endfor
    </ul>
    %endif
</div>
<!-- End post-list ${post_list_id} -->
</%block>