From eeabf6f48af9182e54a88648fd036df148f882df Mon Sep 17 00:00:00 2001
From: Martin Leblanc <m26lebla@uwaterloo.ca>
Date: Thu, 18 Nov 2021 18:55:15 +0000
Subject: [PATCH] ISTWCMS-5195: card yaml and css

---
 .../_patterns/04-components/card/_card.scss   |  7 +-
 ...card--feature.twig => _card--feature.twig} |  0
 .../card/card--node/card--node-news-item.yml  | 29 +++++++++
 .../card/card--node/card--node.yml            | 65 +++++++++----------
 source/_patterns/04-components/card/card.twig |  3 +-
 source/_patterns/04-components/card/card.yml  | 61 +++++++++--------
 6 files changed, 96 insertions(+), 69 deletions(-)
 rename source/_patterns/04-components/card/card--feature/{card--feature.twig => _card--feature.twig} (100%)

diff --git a/source/_patterns/04-components/card/_card.scss b/source/_patterns/04-components/card/_card.scss
index f2ac603b..a46d110a 100644
--- a/source/_patterns/04-components/card/_card.scss
+++ b/source/_patterns/04-components/card/_card.scss
@@ -123,8 +123,7 @@ $card-padding: rem(gesso-spacing(sm)) !default;
 }
 // body
 .card__body {
-
-
+  width: 100%;
 }
 .card__content {
   margin-bottom: rem(gesso-spacing(md));
@@ -169,12 +168,14 @@ $card-padding: rem(gesso-spacing(sm)) !default;
 
 // footer
 .card__footer {
-
   width: 100%;
 }
 .card__tags{
+  margin:0;
+  padding:0;
   width: 100%;
 
+
 }
 .card__readmore {
   text-align: right;
diff --git a/source/_patterns/04-components/card/card--feature/card--feature.twig b/source/_patterns/04-components/card/card--feature/_card--feature.twig
similarity index 100%
rename from source/_patterns/04-components/card/card--feature/card--feature.twig
rename to source/_patterns/04-components/card/card--feature/_card--feature.twig
diff --git a/source/_patterns/04-components/card/card--node/card--node-news-item.yml b/source/_patterns/04-components/card/card--node/card--node-news-item.yml
index 562d50fc..ec0fa37e 100644
--- a/source/_patterns/04-components/card/card--node/card--node-news-item.yml
+++ b/source/_patterns/04-components/card/card--node/card--node-news-item.yml
@@ -3,6 +3,35 @@ modifier_classes: ''
 header_level: '2'
 type: 'news-item'
 news:
+  tags:
+    -
+      url: '#'
+      title: 'Tag 1'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 2'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 3'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 4'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 5'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 6'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 7'
+      type: 'simple'
   url: '#'
   header:
     date:
diff --git a/source/_patterns/04-components/card/card--node/card--node.yml b/source/_patterns/04-components/card/card--node/card--node.yml
index c2ff68a5..9c5e46fc 100644
--- a/source/_patterns/04-components/card/card--node/card--node.yml
+++ b/source/_patterns/04-components/card/card--node/card--node.yml
@@ -12,36 +12,35 @@ node:
     author:
       name: 'Author Lastname'
       link: '#'
-  footer:
-    tags:
-      -
-        url: '#'
-        title: 'Tag 1'
-        type: 'simple'
-      -
-        url: '#'
-        title: 'Tag 2'
-        type: 'simple'
-      -
-        url: '#'
-        title: 'Tag 3'
-        type: 'simple'
-      -
-        url: '#'
-        title: 'Tag 4'
-        type: 'simple'
-      -
-        url: '#'
-        title: 'Tag 5'
-        type: 'simple'
-      -
-        url: '#'
-        title: 'Tag 6'
-        type: 'simple'
-      -
-        url: '#'
-        title: 'Tag 7'
-        type: 'simple'
+  tags:
+    -
+      url: '#'
+      title: 'Tag 1'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 2'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 3'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 4'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 5'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 6'
+      type: 'simple'
+    -
+      url: '#'
+      title: 'Tag 7'
+      type: 'simple'
   sources:
     - srcset: '../../../../source/images/president/president_xlarge.jpg'
       media: 'all and (min-width: 63.19rem)'
@@ -61,9 +60,9 @@ node:
   img_element: '../../../../source/images/president/president_xlarge.jpg'
   alt: 'Alternative text'
   content: '<p>This is the summary, which can contain <abbr title="Hyper Text Markup Language">HTML</abbr> markup. It should be 600 characters or less.Ea sit vide commodo ancillae, pro eu quidam ancillae offendit. Odio ferri officiis an his, sit id causae partiendo accusamus, has discere expetendis ne. Per at wisi homero voluptaria, vis vidit ornatus vituperatoribus no. Labores maiestatis mei ad, cum cu exerci appareat.</p>'
-  listing_image:
-    img_element: '../../../../source/images/president/president_xlarge.jpg'
-    alt: 'Alternative listing image text.'
+#  listing_image:
+#    img_element: '../../../../source/images/president/president_xlarge.jpg'
+#    alt: 'Alternative listing image text.'
 #  hero_image:
 #    img_element: '../../../../source/images/president/president_xlarge.jpg'
 #    alt: 'Alternative hero text'
diff --git a/source/_patterns/04-components/card/card.twig b/source/_patterns/04-components/card/card.twig
index b1d1ff26..7c2fbcee 100644
--- a/source/_patterns/04-components/card/card.twig
+++ b/source/_patterns/04-components/card/card.twig
@@ -26,7 +26,7 @@
     } %}
   {% endif %}
 
-  {% if content or banner %}
+  {% if content or banner or listing_image %}
     <div class="card__body">
 
       {% if banner %}
@@ -65,7 +65,6 @@
     </div>
   {% endif %}
 
-  {{ tags }}
   {% if tags %}
     {% include '@components/card/card-elements/_tags.twig' with {
       'tags': tags
diff --git a/source/_patterns/04-components/card/card.yml b/source/_patterns/04-components/card/card.yml
index 0699189b..7a1f3d95 100644
--- a/source/_patterns/04-components/card/card.yml
+++ b/source/_patterns/04-components/card/card.yml
@@ -1,7 +1,7 @@
 ---
 modifier_classes: ''
 header_level: '2'
-type: 'node'
+type: 'card'
 url: '#'
 show_title: 'yes'
 header:
@@ -11,36 +11,35 @@ header:
   author:
     name: 'Author Lastname'
     link: '#'
-footer:
-  tags:
-    -
-      url: '#'
-      title: 'Tag 1'
-      type: 'simple'
-    -
-      url: '#'
-      title: 'Tag 2'
-      type: 'simple'
-    -
-      url: '#'
-      title: 'Tag 3'
-      type: 'simple'
-    -
-      url: '#'
-      title: 'Tag 4'
-      type: 'simple'
-    -
-      url: '#'
-      title: 'Tag 5'
-      type: 'simple'
-    -
-      url: '#'
-      title: 'Tag 6'
-      type: 'simple'
-    -
-      url: '#'
-      title: 'Tag 7'
-      type: 'simple'
+tags:
+  -
+    url: '#'
+    title: 'Tag 1'
+    type: 'simple'
+  -
+    url: '#'
+    title: 'Tag 2'
+    type: 'simple'
+  -
+    url: '#'
+    title: 'Tag 3'
+    type: 'simple'
+  -
+    url: '#'
+    title: 'Tag 4'
+    type: 'simple'
+  -
+    url: '#'
+    title: 'Tag 5'
+    type: 'simple'
+  -
+    url: '#'
+    title: 'Tag 6'
+    type: 'simple'
+  -
+    url: '#'
+    title: 'Tag 7'
+    type: 'simple'
 sources:
   - srcset: '../../../../source/images/president/president_xlarge.jpg'
     media: 'all and (min-width: 63.19rem)'
-- 
GitLab