From: Vincent Vanwaelscappel Date: Fri, 20 Mar 2020 14:56:43 +0000 (+0100) Subject: wip #3511 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e694079f206e44ca22580700dfb760583ee5c4e4;p=pmi.git wip #3511 @1 --- diff --git a/resources/styles/common/global.styl b/resources/styles/common/global.styl index a8cc346..eeb9dca 100644 --- a/resources/styles/common/global.styl +++ b/resources/styles/common/global.styl @@ -22,6 +22,10 @@ p:not(:last-child) object-fit contain object-position 50% 50% + &.cover + object-fit cover + + .no-objectfit & { height auto } diff --git a/resources/styles/components/product-gallery.styl b/resources/styles/components/product-gallery.styl index d3006c8..7e5f044 100644 --- a/resources/styles/components/product-gallery.styl +++ b/resources/styles/components/product-gallery.styl @@ -1,7 +1,7 @@ .product-gallery &-main - @apply bg-white relative border-gray-100 border-4 pb-100p mb-4 + @apply bg-white relative border-gray-100 border-4 pb-100p mb-4 cursor-zoom-in &-main-image @apply absolute bg-contain bg-center bg-no-repeat @@ -11,7 +11,7 @@ left: 15% &-thumb - @apply w-full bg-center bg-cover pb-100p border-4 border-grey-100 cursor-pointer + @apply w-full bg-center bg-cover border-4 border-grey-100 cursor-zoom-in &-current @apply border-grey-300 diff --git a/resources/views/pages/product-detail.blade.php b/resources/views/pages/product-detail.blade.php index ab14a17..25f660a 100644 --- a/resources/views/pages/product-detail.blade.php +++ b/resources/views/pages/product-detail.blade.php @@ -23,13 +23,7 @@
{{-- Product images --}} - getEntity()->image_fallback]))' - :images='@json($product->getImageURLList('images', 'large', [$product->getEntity()->image_fallback]))' - class="flex-grow" - style="max-width: 348px"> - - + @include('partials.product-gallery') {{-- Product text --}} @@ -88,7 +82,7 @@ class="flex items-center text-grey-dark hover:text-primary"> {{__('Icône %s',$document['type'])}} + alt="{{__('Icône %s',[$document['type']])}}"> {{ $document['label'] }} diff --git a/resources/views/partials/product-gallery.blade.php b/resources/views/partials/product-gallery.blade.php new file mode 100644 index 0000000..2e665c8 --- /dev/null +++ b/resources/views/partials/product-gallery.blade.php @@ -0,0 +1,37 @@ +@php + $images=$product->getImagesData('images'); +@endphp + +