From: Vincent Vanwaelscappel Date: Wed, 17 Jul 2019 17:49:04 +0000 (+0200) Subject: wip #2881 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=da0c24583bb5eb540557d06e37b9c517cc2fcfd3;p=pmi.git wip #2881 @1.5 --- diff --git a/public/images/product-details/product-placeholder.svg b/public/images/product-details/product-placeholder.svg new file mode 100644 index 0000000..2832cec --- /dev/null +++ b/public/images/product-details/product-placeholder.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/resources/styles/components/products.styl b/resources/styles/components/products.styl index 4bba0a1..6e1e298 100644 --- a/resources/styles/components/products.styl +++ b/resources/styles/components/products.styl @@ -1,11 +1,25 @@ .products + // Grid view of products + &-grid // When in auto grid mode, make the minimum width a bit // larger so we end up with 3 cols at the largest size. // We don't need breakpoints because CSS Grid will // automatically change the number of columns based // on this min-width setting... + &.grid-cols-auto grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) + + + .product-highlights + height 147px // 7 lines + overflow hidden + li + margin-bottom: 0 // all lines have the same size, it allows the last line not to be half croped + + h3 + height 39px + overflow hidden diff --git a/resources/views/pages/product-detail.blade.php b/resources/views/pages/product-detail.blade.php index 359f7ad..0ecb03d 100644 --- a/resources/views/pages/product-detail.blade.php +++ b/resources/views/pages/product-detail.blade.php @@ -1,3 +1,7 @@ +@php + $technical_sheet=$product->getMediaUrl('technical_sheet',false) +@endphp + @extends('layouts/app') @section('content') @@ -16,7 +20,7 @@
+ style="background-image: url({{ $product->getImageUrl('images','',asset('images/product-details/product-placeholder.svg')) }});">
@@ -37,11 +41,13 @@ @markdown($product->highlights) -

- - {{ __('Télécharger la fiche produit') }} - -

+ @if($technical_sheet) +

+ + {{ __('Télécharger la fiche produit') }} + +

+ @endif @if(config('features.quote')) diff --git a/resources/views/pages/products.blade.php b/resources/views/pages/products.blade.php index 847e8d6..e603c78 100644 --- a/resources/views/pages/products.blade.php +++ b/resources/views/pages/products.blade.php @@ -96,14 +96,14 @@ @foreach($products as $id=>$product)
{{-- Image holder --}} -
+
{{-- Product details --}}

{{ $product->get('name') }}

-
+
@markdown($product->highlights)