fix product image link in product box, center product image vertically

This commit is contained in:
Martin Filipovic Hinrichs 2026-06-06 11:52:59 +02:00
parent 2309de20d0
commit 1a950d78ba
2 changed files with 32 additions and 7 deletions

View file

@ -22,13 +22,30 @@
height: auto; height: auto;
flex: 0 0 auto; flex: 0 0 auto;
position: relative; position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
> * { .product-image-link {
&::before {
content: '';
position: absolute; position: absolute;
top: 0; top: -1rem;
left: 0; left: -1rem;
right: 0; right: -1rem;
bottom: 0; bottom: -1rem;
z-index: 1;
}
}
.awards {
z-index: 2;
}
.product-wishlist {
position: relative;
z-index: 2;
} }
} }

View file

@ -1,5 +1,13 @@
{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %} {% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{% block component_product_box_image_inner %}
<a href="{{ seoUrl('frontend.detail.page', routeArguments) }}"
title="{{ name }}"
class="product-image-link is-{{ displayMode }}">
{{ parent() }}
</a>
{% endblock %}
{% block component_product_box_image %} {% block component_product_box_image %}
{{ parent() }} {{ parent() }}
{% if product.extensions.awardMedia|length %} {% if product.extensions.awardMedia|length %}