]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
material: fix missing thumbnail on list view
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / _card_list.html.twig
index 7c83c3bba712200a17c64aee1810a712c8bdc6d9..1c00f2fa3f5f5d67193a2ccfb3a7a8932229d834 100644 (file)
@@ -1,10 +1,9 @@
 <div class="card-stacked">
-    <div class="preview">
-        {% if entry.previewPicture is not null %}
-            <a href="{{ path('view', { 'id': entry.id }) }}">
-                <img src="{{ entry.previewPicture }}" />
-            </a>
-        {% endif %}
+    <div class="card-preview">
+        <a href="{{ path('view', { 'id': entry.id }) }}">
+            {% set previewClassModifier = entry.previewPicture ? '' : ' preview--default' %}
+            <span class="preview{{ previewClassModifier }}" style="background-image: url({{ entry.previewPicture | default(asset('wallassets/themes/_global/img/logo-square.svg')) }})"></span>
+        </a>
     </div>
     {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %}
     <ul class="tools-list hide-on-small-only">