From: Nicolas LÅ“uillet Date: Sat, 12 Sep 2015 11:39:01 +0000 (+0200) Subject: add preview pictures X-Git-Tag: 2.0.0-alpha.0~2^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=e610143f51d991a63bb70645f2de63fdbc1173fe;p=github%2Fwallabag%2Fwallabag.git add preview pictures --- diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index 3711f6e5..f7f53b9d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig @@ -40,7 +40,11 @@ {% else %}
{% trans %}estimated reading time: {% endtrans %} < 1 min
{% endif %} -

{{ entry.content|striptags|slice(0, 300) }}…

+ {% if entry.previewPicture is null %} +

{{ entry.content|striptags|slice(0, 300) }}…

+ {% else %} + {{ entry.title|raw }} + {% endif %}
{{ entry.domainName | truncate(18) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 75ac2a6b..3b4c7053 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -149,6 +149,10 @@ main { {% for tag in entry.tags %}{{ tag.label }}{% endfor %}
+ {% if entry.previewPicture is not null %} +
{{ entry.title|raw }}
+ {% endif %} + diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css index 6c139b72..5e1ae8bd 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css @@ -226,6 +226,10 @@ main ul.row { overflow: hidden; } +img.preview { + max-width: 100%; +} + .card .card-content .card-title { line-height: 32px; }