Thumbnail on list of blogs on sidebar

This commit is contained in:
2016-12-01 16:21:02 +01:00
parent b6b517688e
commit 2bae7c2fef
4 changed files with 41 additions and 7 deletions

View File

@@ -64,14 +64,20 @@ link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=1122016
a.jstree-anchor(
href="{{ url_for_node(node=post) }}",
class="{% if post._id == node._id %}jstree-clicked{% endif %}")
i.jstree-icon.pi-document-text
| {{ post.name }}
.tree-item-thumbnail
| {% if post.picture %}
img(src="{{ post.picture.thumbnail('s', api=api) }}")
| {% else %}
i.pi-document-text
| {% endif %}
span.tree-item-title {{ post.name }}
span.tree-item-info
| {{ post._created | pretty_date }} · {{ post.user.full_name }}
| {% endfor %}
li.jstree-node(data-node-type="page")
a.jstree-anchor(
href="{{ url_for('projects.view', project_url=project.url) }}")
i.jstree-icon.pi-folder
| Browse Project
| {% endblock %}