From: Simounet Date: Thu, 21 Dec 2017 16:10:46 +0000 (+0100) Subject: Card tags template shared X-Git-Tag: 2.3.1~1^2~3 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=49fb9e7cabef39c30579eee0301f1019a3251dcd Card tags template shared --- diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index 4a442228..8f7f8f7b 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -250,6 +250,10 @@ a.original:not(.waves-effect) { float: right; max-width: 6em; } + + .tags { + display: inline-block; + } } #content .collection .collection-item { 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 index 06dc0b6d..fc5bfc48 100644 --- 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 @@ -8,12 +8,8 @@
{{ entry.domainName|removeWww }} - {% if withTags %} - {% for tag in entry.tags | slice(0, 3) %} - - {{ tag.label }} - - {% endfor %} + {% if withTags is defined %} + {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'listClass': ' hide-on-med-and-down'} only %} {% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig new file mode 100644 index 00000000..144a105e --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig @@ -0,0 +1,14 @@ +{% if tags is iterable and tags is not empty %} + +{% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 86588a7b..273a9b57 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -268,16 +268,7 @@ {% endif %} - + {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'withRemove': true} only %}