Merge pull request #4994 from devansh-webkul/image-strecting
Fixed Image Stretching Issue #4992
This commit is contained in:
commit
eabb3e9f9c
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"/js/velocity.js": "/js/velocity.js?id=1c12a991b9a3d04715bd",
|
"/js/velocity.js": "/js/velocity.js?id=1c12a991b9a3d04715bd",
|
||||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||||
"/css/velocity.css": "/css/velocity.css?id=538a341507dd6592ac27"
|
"/css/velocity.css": "/css/velocity.css?id=1128e04b7f7920dfa37a"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,17 @@
|
||||||
border: none !important;
|
border: none !important;
|
||||||
margin: 0 5px 10px 10px;
|
margin: 0 5px 10px 10px;
|
||||||
|
|
||||||
|
.category-product-image-container {
|
||||||
|
margin: 0 auto;
|
||||||
|
height: 190px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.product-image-container {
|
.product-image-container {
|
||||||
max-height: 190px;
|
max-height: 190px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -354,7 +365,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-image-container {
|
.category-product-image-container, .product-image-container {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
<a
|
<a
|
||||||
href="{{ route('shop.productOrCategory.index', $product->url_key) }}"
|
href="{{ route('shop.productOrCategory.index', $product->url_key) }}"
|
||||||
title="{{ $product->name }}"
|
title="{{ $product->name }}"
|
||||||
class="product-image-container">
|
class="{{ $cardClass ?? 'product-image-container' }}">
|
||||||
|
|
||||||
<img
|
<img
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
|
|
|
||||||
|
|
@ -108,11 +108,14 @@
|
||||||
|
|
||||||
@foreach ($results as $productFlat)
|
@foreach ($results as $productFlat)
|
||||||
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
||||||
@include('shop::products.list.card', ['product' => $productFlat->product])
|
@include('shop::products.list.card', [
|
||||||
|
'cardClass' => 'category-product-image-container',
|
||||||
|
'product' => $productFlat->product,
|
||||||
|
])
|
||||||
@else
|
@else
|
||||||
@include('shop::products.list.card', [
|
@include('shop::products.list.card', [
|
||||||
'list' => true,
|
'list' => true,
|
||||||
'product' => $productFlat->product
|
'product' => $productFlat->product,
|
||||||
])
|
])
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue