mirror of
https://github.com/moparisthebest/wallabag
synced 2024-08-13 16:54:00 -04:00
[add] first picture of each entry displayed on listing
This commit is contained in:
parent
4a857c4afb
commit
456f08d9a8
@ -1,5 +1,11 @@
|
|||||||
<article id="item-{{entry.id}}">
|
<article id="item-{{entry.id}}">
|
||||||
<h2><a href="{{ path('view_entry', {'id': entry.id}) }}">{{ entry.title }}</a></h2>
|
<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) }}…</p>
|
<p class="preview">{{ entry.content|striptags|slice(0, 300) }}…</p>
|
||||||
<ul class="tools">
|
<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>
|
<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>
|
||||||
|
@ -70,6 +70,10 @@ h2 {
|
|||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.picturepreview {
|
||||||
|
max-width:100px;
|
||||||
|
}
|
||||||
|
|
||||||
.tools li {
|
.tools li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
|
Loading…
Reference in New Issue
Block a user