diff --git a/src/components/card/_card.scss b/src/components/card/_card.scss index e258508cfd..627cfd5e26 100644 --- a/src/components/card/_card.scss +++ b/src/components/card/_card.scss @@ -5,15 +5,13 @@ &__link { display: flex; flex-direction: column; - } - - &__image--reorder { - order: 1; - } + margin-bottom: 1rem; + width: fit-content; - &__title--reorder { - order: 2; - } + & > .ons-card__title { + margin-bottom: 0; + } + } &__link:hover { text-decoration-thickness: 3px; diff --git a/src/components/card/_macro.njk b/src/components/card/_macro.njk index 350826fce3..03093c3e84 100644 --- a/src/components/card/_macro.njk +++ b/src/components/card/_macro.njk @@ -5,36 +5,18 @@ {% set titleSize = params.titleSize | default('2') %}
- - {%- 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.url -%} - + + {%- if params.image -%} + {% if params.image.smallSrc %} + {{ params.image.alt }} + {% elif params.image == true or params.image.placeholderURL %} + + {% endif %} {%- endif -%} - - {%- else -%} - - - {%- if params.url -%} - - {%- endif -%} + {{ params.title }} - {%- if params.url -%} - - {%- endif -%} - - {%- endif -%} +

{{ params.text }}