From d73bfdbddb9f651f6f1a4b58e60d8f65a7d55343 Mon Sep 17 00:00:00 2001 From: Matt Burke Date: Thu, 11 Oct 2018 19:47:48 -0400 Subject: Show tags on non-image gallery preview card Tags and images aren't coupled, so they shouldn't be coupled in the UI, either. This also makes the titles and source domains show up consistently for image and non-image entry cards. --- .../views/themes/material/Entry/_card_no_preview.html.twig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig index 8e6bbae0..4fd4debd 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig @@ -1,5 +1,12 @@
+
+ +
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %}
-- cgit v1.2.3 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. --- .../views/themes/material/Entry/_card_no_preview.html.twig | 14 -------------- .../views/themes/material/Entry/_card_preview.html.twig | 4 ++++ .../views/themes/material/Entry/entries.html.twig | 4 +--- 3 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig (limited to 'src/Wallabag/CoreBundle/Resources/views/themes') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig deleted file mode 100644 index 4fd4debd..00000000 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig +++ /dev/null @@ -1,14 +0,0 @@ -
-
-
- -
- {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %} -
- - {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} -
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 %} 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 e883503e..a137f3c3 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 @@ -39,11 +39,9 @@
  • {% if listMode == 1 %} {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} - {% elseif entry.previewPicture is null %} - {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %} {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %} - {% elseif not entry.previewPicture is null %} + {% else %} {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %} {% endif %}
  • -- cgit v1.2.3 From a22b8043b45b0a5c2859afff90d968300b437c93 Mon Sep 17 00:00:00 2001 From: Matt Burke Date: Tue, 6 Nov 2018 22:53:48 -0500 Subject: Add rel=noopener to target=_blank links From https://developers.google.com/web/tools/lighthouse/audits/noopener: - new pages will run in separate processes, avoiding any performance intermingling impacts - new pages won't have access to current page's window object via JavaScript --- .../views/themes/baggy/Entry/entries.html.twig | 2 +- .../Resources/views/themes/baggy/Entry/entry.html.twig | 16 ++++++++-------- .../views/themes/common/Entry/share.html.twig | 2 +- .../views/themes/common/Static/howto.html.twig | 10 +++++----- .../views/themes/material/Entry/entry.html.twig | 18 +++++++++--------- .../Resources/views/themes/material/layout.html.twig | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index adc704bb..cfc6644b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -57,7 +57,7 @@ - {% 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