From 02cc4ed0783063de5bfe19677fad4c22f67440c8 Mon Sep 17 00:00:00 2001 From: Aditya Unnithan Date: Fri, 6 Oct 2023 13:26:00 +0100 Subject: [PATCH] Remove redundant code --- src/components/card/_card.scss | 8 ++++---- src/components/card/_macro.njk | 29 ++++++++--------------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/components/card/_card.scss b/src/components/card/_card.scss index eafbf0966d..c5acdf2d26 100644 --- a/src/components/card/_card.scss +++ b/src/components/card/_card.scss @@ -7,11 +7,11 @@ flex-direction: column; margin-bottom: 1rem; width: fit-content; - } - &__remove--margin { - margin-bottom: 0; - } + & > .ons-card__title { + margin-bottom: 0; + } + } &__image--reorder { order: 1; diff --git a/src/components/card/_macro.njk b/src/components/card/_macro.njk index 42516328a8..e962d3b15b 100644 --- a/src/components/card/_macro.njk +++ b/src/components/card/_macro.njk @@ -6,36 +6,23 @@
- {%- if params.image -%} {%- if params.url -%} {%- endif -%} - + {{ params.title }} - {% if params.image.smallSrc %} - {{ params.image.alt }} - {% elif params.image == true or params.image.placeholderURL %} - - {% endif %} + {%- if params.image -%} + {% if params.image.smallSrc %} + {{ params.image.alt }} + {% elif params.image == true or params.image.placeholderURL %} + + {% endif %} + {%- endif -%} {%- if params.url -%} {%- endif -%} - {%- else -%} - - {%- if params.url -%} - - {%- endif -%} - - {{ params.title }} - - {%- if params.url -%} - - {%- endif -%} - - {%- endif -%} -

{{ params.text }}

{% if params.itemsList -%}