forked from Shopify/dawn
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathquick-order-product-row.liquid
41 lines (40 loc) · 1.16 KB
/
quick-order-product-row.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% comment %}
Quick Order Product Row
Accepts:
- item: {Object} Variant or Product object
- image: {Object} Product or Variant image (optional)
Usage:
{% render 'quick-order-product-row' %}
{% endcomment %}
<tr
class="product"
>
<td class="product-item__inner">
<div class="product-item__title--wrapper">
<div class="variant-item__media">
<div class="variant-item__image-container gradient global-media-settings">
{%- if image -%}
{%- assign img_height = 36 | divided_by: image.aspect_ratio | ceil -%}
{{
image
| image_url: width: 72
| image_tag:
loading: 'lazy',
fetchpriority: 'low',
decoding: 'async',
class: 'variant-item__image',
width: 36,
height: img_height,
widths: '72',
alt: image.alt
| escape
}}
{% endif %}
</div>
</div>
<div class="small-hide">
<a href="{{ item.url }}" class="variant-item__name h4 break">{{ item.title | escape }}</a>
</div>
</div>
</td>
</tr>