add preview pictures

This commit is contained in:
Nicolas Lœuillet 2015-09-12 13:39:01 +02:00
parent 9c08a891f9
commit e610143f51
3 changed files with 13 additions and 1 deletions

View File

@ -40,7 +40,11 @@
{% else %}
<div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur">&lt;</small> 1 min</span></div>
{% endif %}
<p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
{% if entry.previewPicture is null %}
<p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
{% else %}
<img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" />
{% endif %}
</div>
<div class="card-action">
<span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }} - {{ entry.domainName }}" class="tool original grey-text"><span>{{ entry.domainName | truncate(18) }}</span></a></bold>

View File

@ -149,6 +149,10 @@ main {
{% for tag in entry.tags %}<span><a href="#">{{ tag.label }}</a></span>{% endfor %}
</div>
{% if entry.previewPicture is not null %}
<div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div>
{% endif %}
<div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
</div>

View File

@ -226,6 +226,10 @@ main ul.row {
overflow: hidden;
}
img.preview {
max-width: 100%;
}
.card .card-content .card-title {
line-height: 32px;
}