.product-highlights
- height 147px // 7 lines
+ height 42px // 3 lines
overflow hidden
+
li
- margin-bottom: 0 // all lines have the same size, it allows the last line not to be half croped
+ margin-bottom: 0
+
+ // all lines have the same size, it allows the last line not to be half croped
h3
- height 39px
+ height 21px
overflow hidden
+
+.product-img-holder
+ @apply bg-white
+ position: relative
+
+ &:before
+ content: "";
+ display: block
+ padding-top: 100%
+
+ > *
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ color: white;
+ text-align: center;
+
+ .product-img
+ @apply bg-contain bg-center bg-no-repeat
+ width: 70%
+ height: 70%
+ top: 15%;
+ left: 15%;
{{-- Product images --}}
<div class="product-detail-images-wrapper flex-grow" style="max-width: 348px">
<div
- class="product-detail-images-main border-gray-100 border-4 pb-100p w-full bg-center bg-cover mb-3"
+ class="product-detail-images-main border-gray-100 border-4 pb-100p w-full bg-center bg-contain mb-3"
style="background-image: url({{ $product->getImageUrl('images','',asset('images/product-details/product-placeholder.svg')) }});">
</div>
@foreach($products as $id=>$product)
<div class="product-grid-item bg-grey-200">
{{-- Image holder --}}
- <div class="bg-white pb-100p bg-cover bg-center bg-no-repeat"
- style="background-image: url({{$product->getImageUrl('images','',asset('images/product-details/product-placeholder.svg')) }})">
+ <div class="product-img-holder">
+ <div class="product-img"
+ style="background-image: url({{$product->getImageUrl('images','',asset('images/product-details/product-placeholder.svg')) }})"></div>
</div>
{{-- Product details --}}
<div class="p-4">
- <h3>{{ $product->get('name') }}</h3>
+ <h3>{{ $product->get('reference') }}</h3>
<div class="product-highlights text-sm">
- @markdown($product->highlights)
+ {{$product->get('name')}}
</div>
<p class="mt-4">
<a href="{{ $nav->getHrefById('product/'.$product->id) }}">