From: Simounet Date: Wed, 20 Dec 2017 20:02:37 +0000 (+0100) Subject: Content card template shared X-Git-Tag: 2.3.1~1^2~6 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=3c9548257ccb92a13c658372fc09dccff117bb36 Content card template shared --- 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 %}