Skip to content

Commit

Permalink
Remove reordering classes
Browse files Browse the repository at this point in the history
  • Loading branch information
adi-unni committed Oct 11, 2023
1 parent ea1eeef commit 7fe6eb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/components/card/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
}
}

&__image--reorder {
order: 1;
}

&__title--reorder {
order: 2;
}

&__link:hover {
text-decoration-thickness: 3px;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/card/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<div class="ons-card">
<a href="{{ params.url }}" class="ons-card__link">
<h{{ titleSize }} class="ons-card__title ons-card__title--reorder {{ params.titleClasses | default('ons-u-fs-m')}}" id="{{ params.id }}">
{{ params.title }}
</h{{ titleSize }}>
{%- if params.image -%}
{% if params.image.smallSrc %}
<img class="ons-card__image ons-u-mb-s ons-card__image--reorder" height="200" width="303"{% if params.image.largeSrc %} srcset="{{ params.image.smallSrc }} 1x, {{ params.image.largeSrc }} 2x"{% endif %} src="{{ params.image.smallSrc }}" alt="{{ params.image.alt }}" loading="lazy">
<img class="ons-card__image ons-u-mb-s" height="200" width="303"{% if params.image.largeSrc %} srcset="{{ params.image.smallSrc }} 1x, {{ params.image.largeSrc }} 2x"{% endif %} src="{{ params.image.smallSrc }}" alt="{{ params.image.alt }}" loading="lazy">
{% elif params.image == true or params.image.placeholderURL %}
<img class="ons-card__image ons-u-mb-s ons-card__image--reorder" height="100" width="303" srcset="{{ params.image.placeholderURL if params.image.placeholderURL }}/img/small/placeholder-card.png 1x, {{ params.image.placeholderURL if params.image.placeholderURL }}/img/large/placeholder-card.png 2x" src="{{ params.image.placeholderURL if params.image.placeholderURL }}/img/small/placeholder-card.png" alt="" loading="lazy">
<img class="ons-card__image ons-u-mb-s " height="100" width="303" srcset="{{ params.image.placeholderURL if params.image.placeholderURL }}/img/small/placeholder-card.png 1x, {{ params.image.placeholderURL if params.image.placeholderURL }}/img/large/placeholder-card.png 2x" src="{{ params.image.placeholderURL if params.image.placeholderURL }}/img/small/placeholder-card.png" alt="" loading="lazy">
{% endif %}
{%- endif -%}
<h{{ titleSize }} class="ons-card__title {{ params.titleClasses | default('ons-u-fs-m')}}" id="{{ params.id }}">
{{ params.title }}
</h{{ titleSize }}>
</a>

<p id="{{ params.textId }}">{{ params.text }}</p>
Expand Down

0 comments on commit 7fe6eb0

Please sign in to comment.