quitar media print css
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{% doc %}
|
||||
Renders a featured product card for the homepage hero.
|
||||
|
||||
@param {product} product - Product to show in the card
|
||||
|
||||
@example
|
||||
{% render 'hero-product', product: block.settings.product %}
|
||||
{% enddoc %}
|
||||
|
||||
{% liquid
|
||||
assign variant = product.selected_or_first_available_variant
|
||||
assign card_image = product.featured_image
|
||||
assign image_alt = card_image.alt | default: product.title
|
||||
%}
|
||||
|
||||
<article class="hero__card">
|
||||
<a class="hero__card-media" href="{{ product.url }}">
|
||||
{% if card_image %}
|
||||
{{
|
||||
card_image
|
||||
| image_url: width: 200
|
||||
| image_tag:
|
||||
alt: image_alt,
|
||||
widths: '100, 140, 200',
|
||||
sizes: '(max-width: 1023px) 70px, 100px',
|
||||
class: 'hero__card-image',
|
||||
loading: 'eager'
|
||||
}}
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
<div class="hero__card-copy">
|
||||
<a class="hero__card-title" href="{{ product.url }}">{{ product.title | escape }}</a>
|
||||
<p class="hero__card-price">{{ variant.price | money_without_trailing_zeros }}</p>
|
||||
</div>
|
||||
|
||||
{% form 'product', product, class: 'hero__form' %}
|
||||
<input type="hidden" name="id" value="{{ variant.id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<button
|
||||
class="hero__cart"
|
||||
type="submit"
|
||||
{% unless variant.available %}
|
||||
disabled
|
||||
{% endunless %}
|
||||
aria-label="{% if variant.available %}{{ 'hero.add_to_cart' | t: product: product.title }}{% else %}{{ 'hero.sold_out' | t }}{% endif %}"
|
||||
>
|
||||
<span class="hero__cart-icon" aria-hidden="true">
|
||||
{{ 'icon-bag.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
{% endform %}
|
||||
</article>
|
||||
Reference in New Issue
Block a user