From 3c9548257ccb92a13c658372fc09dccff117bb36 Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 20 Dec 2017 21:02:37 +0100 Subject: [PATCH 1/7] 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 000000000..4836a4ea3 --- /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 a4958b581..ceb953819 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 08f5b0e26..7c83c3bba 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 %} - + {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'withRemove': true} only %}