1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-15 13:45:04 -05:00

[add] first picture of each entry displayed on listing

This commit is contained in:
Nicolas Lœuillet 2014-01-16 14:18:28 +01:00
parent 4a857c4afb
commit 456f08d9a8
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,11 @@
<article id="item-{{entry.id}}">
<h2><a href="{{ path('view_entry', {'id': entry.id}) }}">{{ entry.title }}</a></h2>
{% set picture = entry.content|getPicture %}
{% if picture != "" %}
<figure class="right">
<img src="{{ picture }}" class="picturepreview thumb round border right" />
</figure>
{% endif %}
<p class="preview">{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
<ul class="tools">
<li>{% if entry.status == "read" %}<a href="{{ path('mark_entry_unread', {'id': entry.id}) }}">{{ 'mark as unread'|trans }}</a>{% else %}<a href="{{ path('mark_entry_read', {'id': entry.id}) }}">{{ 'mark as read'|trans }}</a>{% endif %}</li>

View File

@ -70,6 +70,10 @@ h2 {
color: #333;
}
img.picturepreview {
max-width:100px;
}
.tools li {
display: inline-block;
font-size: 0.8em;