Thumbnail on list of blogs on sidebar

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

View File

@ -670,7 +670,6 @@ ul.project_nav-edit-list
flex-direction: column
flex: 1
height: 100%
color: $color-text-light
background-color: white
#project_context-header+#project_context

View File

@ -205,9 +205,32 @@ $tree-color-highlight-background-text: white
&.blog
.jstree-anchor
padding: 5px 5px 5px 10px
&:hover, &:hover i
color: $tree-color-highlight
&.jstree-clicked .tree-item-info
color: white
.tree-item-info
display: block
font-size: .9em
margin-left: 20px
padding: 2px 0
line-height: 1em
color: $color-text-dark-secondary
.tree-item-thumbnail
width: 20px
height: 20px
float: left
margin: 0 5px 5px -5px
img
border-radius: 3px
width: 20px
height: 20px
.jstree-loading
padding: 5px
color: $color-text-light-secondary

View File

@ -102,14 +102,20 @@ link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=1122016
li.jstree-node
a.jstree-anchor(
href="{{ url_for_node(node=post) }}")
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 %}

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