]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig
Add placeholder image to card-based gallery entries page for #3651
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / _card_preview.html.twig
index e93646dcfd0d358be661cbc0464bd35023e57bcb..dee1f55b70991c4855e3971dce54bc2339cc65c8 100644 (file)
@@ -7,7 +7,11 @@
             {% endfor %}
             </ul>
             <a href="{{ path('view', { 'id': entry.id }) }}">
+              {% if entry.previewPicture is null %}
+                <span class="preview placeholder" style="background-image: url({{ asset('wallassets/themes/_global/img/logo-square.svg') }});"></span>
+              {% else %}
                 <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
+              {% endif %}
             </a>
         </div>
         {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %}