From 3c9548257ccb92a13c658372fc09dccff117bb36 Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 20 Dec 2017 21:02:37 +0100 Subject: [PATCH] Content card template shared --- .../material/Entry/Card/_content.html.twig | 21 +++++++++++++++++++ .../material/Entry/_card_full_image.html.twig | 15 +------------ .../material/Entry/_card_list.html.twig | 19 +---------------- .../material/Entry/_card_no_preview.html.twig | 21 +------------------ .../material/Entry/_card_preview.html.twig | 17 +-------------- 5 files changed, 25 insertions(+), 68 deletions(-) create mode 100644 src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig new file mode 100644 index 00000000..4836a4ea --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig @@ -0,0 +1,21 @@ +
+ {% if withPreview is defined %} + more_vert + {% endif %} + + + {{ entry.title | striptags | truncate(80, true, '…') | raw }} + + + +
+ {{ entry.domainName|removeWww }} + {% if withTags %} + {% for tag in entry.tags | slice(0, 3) %} + + {{ tag.label }} + + {% endfor %} + {% endif %} +
+
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig index a4958b58..ceb95381 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig @@ -10,20 +10,7 @@ - -
- - - {{ entry.title | striptags | truncate(80, true, '…') | raw }} - - - - -
+ {% 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_list.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig index 08f5b0e2..7c83c3bb 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig @@ -6,24 +6,7 @@ {% endif %} -
- - - {{ entry.title| striptags | truncate(120, true, '…') | raw }} - - - - -
+ {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %}