]> _ Git - pmi.git/commitdiff
Fix VueJS error when cart is turned off + other misc fixes / style adjustments. WIP...
authorStephen Cameron <stephen@cubedesigners.com>
Wed, 17 Jul 2019 14:42:48 +0000 (16:42 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Wed, 17 Jul 2019 14:42:48 +0000 (16:42 +0200)
resources/styles/components/products.styl
resources/views/layouts/app.blade.php
resources/views/pages/products.blade.php
resources/views/partials/cart.blade.php
resources/views/partials/header.blade.php

index fe3c425e7f4d11882b018ed6db1985c4eb57753e..4bba0a1f1bdf3f3a59642e0ccd2c4f9626d4e31d 100644 (file)
@@ -8,4 +8,4 @@
     // automatically change the number of columns based
     // on this min-width setting...
     &.grid-cols-auto
-      grid-template-columns: repeat(auto-fit, minmax(270px, 1fr))
+      grid-template-columns: repeat(auto-fill, minmax(270px, 1fr))
index 7f8ac9c4f8756775d4178e8e714a3837c0a6398c..515d8e2cd3d3e6d1966979f33830e10ca0c9e400 100644 (file)
 @include('cubist::body.begin')
 
 @php
-    //#### Generate temporary cart data
-    $cart_items = [];
-    if(config('features.quote')){
-    for ($i = 1; $i <= 6; $i++) {
-        $cart_items[$i] = [
-            'id' => $i,
-            'quantity' => rand(1, 15),
-            'name' => 'Modèle '. rand(1000, 1500),
-            'category' => 'Capteur de force',
-            'image' => '/storage/products/'. rand(1,6) .'.png',
-        ];
+    if (config('features.quote')) {
+        //#### Generate temporary cart data
+        $cart_items = [];
+        for ($i = 1; $i <= 6; $i++) {
+            $cart_items[$i] = [
+                'id' => $i,
+                'quantity' => rand(1, 15),
+                'name' => 'Modèle '. rand(1000, 1500),
+                'category' => 'Capteur de force',
+                'image' => '/storage/products/'. rand(1,6) .'.png',
+            ];
+        }
+    } else {
+        $cart_items = new stdClass();
     }
-}
 @endphp
 
 <div id="app" class="flex flex-col min-h-screen" data-cart-items='@json($cart_items)'>
index 039e2fce11e4662e16bba307e7ad4f9a4af01c0a..847e8d6139fd40bca447909fc5ddd650ddd03302 100644 (file)
@@ -1,7 +1,7 @@
 @extends('layouts/app')
 
 @section('content')
-    @intro()
+    @intro(['padding' => 'pb-1v'])
 
     <full-width class="bg-grey-100" padding="pt-1v pb-2v">
         <content class="flex relative items-start">
index cc5fea936d65dcbeb7c7faf325b93bc78be15f2c..164e5eb7e9ba19a85094f822f7604fcadb4bd562 100644 (file)
@@ -1,5 +1,2 @@
-@if(config('features.quote'))
-    <span class="cart-header-title">My Selection</span>
-    <span class="cart-header-icon" v-html="cartItemCount"></span>
-@endif
-
+<span class="cart-header-title">My Selection</span>
+<span class="cart-header-icon" v-html="cartItemCount"></span>
index e5aa7e3d77eadad5e72dc9455cb169d1b3186ef4..f8677ff301779ecc69ffac3480d669b28659c678 100644 (file)
             <portal-target name="nav-search-toggle" slim></portal-target>
         </div>
 
-        <div class="cart-header text-right flex items-center cursor-pointer hover:text-blue" @click="openCart">
-            @include('partials.cart')
-        </div>
-
-        <div class="cart-header-popout">
-            <div class="cart-header-popout-title flex justify-between items-center px-1v py-1v">
-                <span>
-                    {{ __('Ma sélection') }}
-                </span>
-
-                <a href="#" class="close-cart-popout text-white hover:text-blue" @click.prevent="closeCart">
-                    @svg('icon-close-thin')
-                </a>
+        @if (config('features.quote'))
+            <div class="cart-header text-right flex items-center cursor-pointer hover:text-blue" @click="openCart">
+                @include('partials.cart')
             </div>
-            <div class="cart-header-popout-content text-navy font-body p-1v pb-0">
-                <cart :items='items' @update-item-quantity="updateItemQuantity"></cart>
-            </div>
-            <div class="cart-header-popout-footer bg-grey-100 p-1v">
-                <link-button class="block text-center">Obtenir un devis</link-button>
+
+            <div class="cart-header-popout">
+                <div class="cart-header-popout-title flex justify-between items-center px-1v py-1v">
+                    <span>
+                        {{ __('Ma sélection') }}
+                    </span>
+
+                    <a href="#" class="close-cart-popout text-white hover:text-blue" @click.prevent="closeCart">
+                        @svg('icon-close-thin')
+                    </a>
+                </div>
+                <div class="cart-header-popout-content text-navy font-body p-1v pb-0">
+                    <cart :items='items' @update-item-quantity="updateItemQuantity"></cart>
+                </div>
+                <div class="cart-header-popout-footer bg-grey-100 p-1v">
+                    <link-button class="block text-center">Obtenir un devis</link-button>
+                </div>
             </div>
-        </div>
+        @endif
 
     </div>