From 8205777a9e237fc2f0ba05bc1b47a5b4efe9bd81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Sat, 15 Dec 2018 22:39:41 -0500 Subject: [PATCH] Overhaul card template for small cards No paragraphs. Keep it simple. Ref #110 --- .../layout/node--small-card.html.twig | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/agaric/templates/layout/node--small-card.html.twig b/agaric/templates/layout/node--small-card.html.twig index cbccc17..8893ef3 100644 --- a/agaric/templates/layout/node--small-card.html.twig +++ b/agaric/templates/layout/node--small-card.html.twig @@ -72,35 +72,13 @@ #} - -{% set has_title_paragraph = false %} -{% if content.field_body_paragraph %} - {% for i, paragraph in content.field_body_paragraph if i|first != '#' %} - {% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %} - {% set has_title_paragraph = true %} - {{ paragraph }} - {% endif %} - {% endfor %} -{% endif %} - -{% if not has_title_paragraph %} -
- {{ content.field_image }} - {% if node.bundle == 'blog' and content.field_authors is not empty %} - - {% endif %} -
-
-

{{ label }}

-
+
+
+

{{ label }}

+
{{ content.field_summary }}
-{% endif %} -
-{{ content|without('field_body_paragraph', 'field_authors', 'field_image', 'field_summary', 'uid', 'created') }} +{{ content|without('field_image', 'field_summary', 'uid', 'created') }}