diff options
| author | erdgeist <erdgeist@bauklotz.local> | 2015-08-16 16:38:25 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@bauklotz.local> | 2015-08-16 16:38:25 +0200 |
| commit | 23f0e1561767dd8a396188e317bae5920d171ea8 (patch) | |
| tree | a67f44e39ad8a45e42d60634488a65c37f3ad432 /themes/erdgeist/templates/list_blogposts.tmpl | |
Initial import of my nikola website
Diffstat (limited to 'themes/erdgeist/templates/list_blogposts.tmpl')
| -rw-r--r-- | themes/erdgeist/templates/list_blogposts.tmpl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/themes/erdgeist/templates/list_blogposts.tmpl b/themes/erdgeist/templates/list_blogposts.tmpl new file mode 100644 index 0000000..093d520 --- /dev/null +++ b/themes/erdgeist/templates/list_blogposts.tmpl | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | ## -*- coding: utf-8 -*- | ||
| 2 | <%block name="content"> | ||
| 3 | <!-- Begin post-list ${post_list_id} --> | ||
| 4 | |||
| 5 | <script> | ||
| 6 | function toggleClass(id) { | ||
| 7 | var node = document.getElementById("post-body-"+id); | ||
| 8 | var node2 = document.getElementById("showfull-"+id); | ||
| 9 | var nc = node.className.replace(/ full$/, ''); | ||
| 10 | if( node.className != nc ) { | ||
| 11 | node.className = nc; | ||
| 12 | node2.className="glyphicon glyphicon-chevron-up"; | ||
| 13 | } else { | ||
| 14 | node.className += ' full'; | ||
| 15 | node2.className="glyphicon glyphicon-chevron-down"; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | </script> | ||
| 19 | |||
| 20 | |||
| 21 | <div id="${post_list_id}" class="post-list"> | ||
| 22 | %if posts: | ||
| 23 | <ul class="post-list list-unstyled"> | ||
| 24 | % for post in posts: | ||
| 25 | <li class="post-list-item"> | ||
| 26 | <div class="post-list-headline"> | ||
| 27 | <a href="${post.permalink()}"><div class="post-date">${post.formatted_date(date_format)}</div></a> | ||
| 28 | <div style="cursor: pointer" onclick="toggleClass(${loop.index})"> | ||
| 29 | <span class="glyphicon glyphicon-chevron-up" id="showfull-${loop.index}"></span><span>${post.title(lang)}</span> | ||
| 30 | </div> | ||
| 31 | </div> | ||
| 32 | <div class="post-body" id="post-body-${loop.index}"> | ||
| 33 | ${post.text( teaser_only = true, show_read_more_link = true) } | ||
| 34 | </div> | ||
| 35 | </li> | ||
| 36 | % endfor | ||
| 37 | </ul> | ||
| 38 | %endif | ||
| 39 | </div> | ||
| 40 | <!-- End post-list ${post_list_id} --> | ||
| 41 | </%block> | ||
