From: Stephen Cameron Date: Mon, 22 Jul 2019 19:16:13 +0000 (+0200) Subject: Product image gallery. WIP #2768 @6 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c5d4b321ae5bd0f944fce557bb93b7e1b68e930a;p=pmi.git Product image gallery. WIP #2768 @6 --- diff --git a/.gitignore b/.gitignore index a1ac577..eb84a4e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /vendor /.idea /_doc +/.proxy-address* .env .phpunit.result.cache Homestead.json diff --git a/resources/js/components/ProductGallery.vue b/resources/js/components/ProductGallery.vue new file mode 100644 index 0000000..6733217 --- /dev/null +++ b/resources/js/components/ProductGallery.vue @@ -0,0 +1,52 @@ + + + diff --git a/resources/styles/components/product-gallery.styl b/resources/styles/components/product-gallery.styl new file mode 100644 index 0000000..bb22291 --- /dev/null +++ b/resources/styles/components/product-gallery.styl @@ -0,0 +1,17 @@ +.product-gallery + + &-main + @apply bg-white relative border-gray-100 border-4 pb-100p mb-4 + + &-main-image + @apply absolute bg-contain bg-center bg-no-repeat + width: 70% + height: 70% + top: 15% + left: 15% + + &-thumb + @apply w-full bg-center bg-cover pb-100p border-4 border-grey-100 cursor-pointer + + &-current + @apply border-grey-300 \ No newline at end of file diff --git a/resources/styles/components/products.styl b/resources/styles/components/products.styl index 1d263de..629b502 100644 --- a/resources/styles/components/products.styl +++ b/resources/styles/components/products.styl @@ -1,8 +1,6 @@ .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. @@ -15,39 +13,23 @@ .product-highlights - height 42px // 3 lines - overflow hidden + 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 // avoids last line being partially cropped h3 - height 21px - overflow hidden + 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; + @apply bg-white relative pb-100p .product-img - @apply bg-contain bg-center bg-no-repeat + @apply absolute bg-contain bg-center bg-no-repeat width: 70% height: 70% - top: 15%; - left: 15%; + top: 15% + left: 15% \ No newline at end of file diff --git a/resources/views/pages/product-detail.blade.php b/resources/views/pages/product-detail.blade.php index 6b534c8..e71d3cc 100644 --- a/resources/views/pages/product-detail.blade.php +++ b/resources/views/pages/product-detail.blade.php @@ -17,28 +17,10 @@
{{-- Product images --}} -
-
-
-
-{{-- --}} -{{--
--}} - - - @foreach ($product->getImageURLList('images') as $key=>$url) - @if ($key==0) - continue; - @endif -
-
- @endforeach -
-
+ + {{-- Product text --}} @@ -57,8 +39,7 @@ @if(config('features.quote')) {{__('Ajouter à ma sélection')}} - ? + ? @endif diff --git a/yarn.lock b/yarn.lock index 5339241..ed80254 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3152,7 +3152,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.2: +glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== @@ -6164,7 +6164,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -6208,6 +6208,11 @@ selfsigned@^1.10.4: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== +semver@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + semver@^6.1.0, semver@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" @@ -6540,7 +6545,7 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@~0.7.2: +source-map@^0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== @@ -6796,12 +6801,10 @@ stylus-loader@^3.0.2: dependencies: css-parse "~2.0.0" debug "~3.1.0" - glob "^7.1.3" + glob "~7.1.2" mkdirp "~0.5.x" - safer-buffer "^2.1.2" sax "~1.2.4" - semver "^6.0.0" - source-map "^0.7.3" + source-map "~0.7.2" supports-color@^2.0.0: version "2.0.0"