From cefbe6a87fee244840e088955aa787a7ad3abb3e Mon Sep 17 00:00:00 2001 From: Matt Burke Date: Sat, 13 Oct 2018 14:30:34 -0400 Subject: Add placeholder image to card-based gallery entries page for #3651 I referenced https://css-tricks.com/using-svg/ for using the SVG icon. The icon has a black foreground and white background, which doesn't look very good as a placeholder. So, using the background-image style to show the svg and the inversion filter to make it white on gray. With the image always present, there isn't much difference between the with and without image preview templates, so I merged them. Tested on Chrome, Firefox, and Safari on OSX. --- .../Resources/views/themes/material/Entry/_card_preview.html.twig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig index e93646dc..dee1f55b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig @@ -7,7 +7,11 @@ {% endfor %} + {% if entry.previewPicture is null %} + + {% else %} + {% endif %} {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %} -- cgit v1.2.3 From 2daae770942911428fba11af207e61e6460cff98 Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 11 Jul 2018 23:57:01 +0200 Subject: Card no preview replaced by wallabag logo --- .../Resources/views/themes/material/Entry/_card_preview.html.twig | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig index dee1f55b..581a1813 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig @@ -7,11 +7,8 @@ {% endfor %} - {% if entry.previewPicture is null %} - - {% else %} - - {% endif %} + {% set previewClassModifier = entry.previewPicture ? '' : ' preview--default' %} + {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %} -- cgit v1.2.3