]> _ Git - pmi.git/commitdiff
wip #2752 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 10 Sep 2019 16:20:04 +0000 (18:20 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 10 Sep 2019 16:20:04 +0000 (18:20 +0200)
.env.production
.env.staging
resources/js/home.js [deleted file]
resources/js/logowall.js [new file with mode: 0644]
resources/styles/components/logowall.styl [new file with mode: 0644]
resources/views/pages/aboutus.blade.php
resources/views/pages/home.blade.php
resources/views/partials/logowall.blade.php [new file with mode: 0644]
webpack.mix.js

index 0e25ba79421b5e0253dc5e6d971570a1fb5f87f1..86ca6d21addeb788a70dd2503fcfadb7f22b51aa 100644 (file)
@@ -59,5 +59,5 @@ FEATURE_NEWS=true
 FEATURE_SEARCH=true
 FEATURE_I18N=false
 FEATURE_TEAM=false
-FEATURE_CLIENTS=false
-FEATURE_PARTNERS=false
+FEATURE_CLIENTS=true
+FEATURE_PARTNERS=true
index e5fed5650315514fded4fe5768256821ec5e46c7..e29a749ab9f327843a971ec04e967fbe3cc4d527 100644 (file)
@@ -58,6 +58,6 @@ FEATURE_NEWS=true
 FEATURE_SEARCH=true
 FEATURE_I18N=false
 FEATURE_TEAM=false
-FEATURE_CLIENTS=false
-FEATURE_PARTNERS=false
+FEATURE_CLIENTS=true
+FEATURE_PARTNERS=true
 
diff --git a/resources/js/home.js b/resources/js/home.js
deleted file mode 100644 (file)
index 2232cdf..0000000
+++ /dev/null
@@ -1 +0,0 @@
-require('./carrousel');
diff --git a/resources/js/logowall.js b/resources/js/logowall.js
new file mode 100644 (file)
index 0000000..894618b
--- /dev/null
@@ -0,0 +1,41 @@
+document.addEventListener('DOMContentLoaded', function () {
+    window.wall = new Logowall(document.getElementsByClassName('.logowall')[0]);
+});
+
+function Logowall(element) {
+    this.element = element;
+    this.items = element.children;
+    this.nbItems = this.items.length;
+    this.nbLines = 2;
+    this.perLine = this.nbItems / this.nbLines;
+    this.init();
+}
+
+
+logowall.prototype = {
+    init: function () {
+        this.distributeLines();
+        this.initEvents();
+    },
+
+    distributeLines: function () {
+
+    },
+
+    initEvents: function () {
+        var $this = this;
+
+        window.addEventListener('resize', function () {
+            $this.resize();
+        });
+        window.addEventListener('orientationchange', function () {
+            $this.resize();
+        });
+
+        $this.resize();
+    },
+
+    resize: function () {
+
+    },
+};
diff --git a/resources/styles/components/logowall.styl b/resources/styles/components/logowall.styl
new file mode 100644 (file)
index 0000000..607f6db
--- /dev/null
@@ -0,0 +1,21 @@
+.logowall
+  max-width 100%
+  overflow hidden
+
+  .line
+    display block
+    white-space nowrap
+
+    > div
+      display: inline-block;
+      width 25%
+      padding: 0 20px 20px 0
+
+      @media (max-width 1024px)
+        width 33.333%
+
+      @media (max-width 640px)
+        width 50%
+
+      > *
+        background: #fff;
index 4b29fcf8ee1d1ad6523f2769041e62a22e79d3f2..71ae39353c8b4af6d795428fb4b975c3e56653d3 100644 (file)
@@ -1,5 +1,10 @@
 @extends('layouts/app')
 
+@push('scripts')
+    <script src="{{ mix('/js/logowall.js') }}"></script>
+@endpush
+
+
 @section('content')
     @intro(['padding' => 'pb-4v'])
 
index 02caa759312c7fda673e861004d8bf508f84354f..32738992e83976af42ca97d8ea1c11725ef42305 100644 (file)
@@ -5,7 +5,7 @@
 @endsection
 
 @push('scripts')
-    <script src="{{ mix('/js/home.js') }}"></script>
+    <script src="{{ mix('/js/carrousel.js') }}"></script>
 @endpush
 
 @section('content')
         {{-- Our Clients --}}
         <full-width class="bg-grey-100">
             <content>
-                <text-block title="Nos clients"/>
+                <text-block :title="__('Nos clients')"/>
 
-                <grid cols="4" class="sm:grid-cols-2">
-                    @for ($i = 1; $i <= 8; $i++)
-                        <div class="bg-white hover:bg-grey-200 cursor-pointer" style="padding-bottom: 58%"></div>
-                    @endfor
-                </grid>
+                @include("partials.logowall",['logos'=>$page->get('logos')])
             </content>
         </full-width>
     @endif
diff --git a/resources/views/partials/logowall.blade.php b/resources/views/partials/logowall.blade.php
new file mode 100644 (file)
index 0000000..2511f53
--- /dev/null
@@ -0,0 +1,28 @@
+@php
+    if(count($logos)%2==1){
+        array_pop($logos);
+    }
+@endphp
+
+@foreach ($logos as $i=>$logo)
+    @php
+        $stack='line'.($i%2);
+    @endphp
+
+    @push($stack)
+        <div>
+            @if($logo['url'])
+                <a href="{{$logo['url']}}" target="_blank">
+                    @endif
+                    <img src="{{$page->getImageURLByCollection($logo['logo'])}}" alt="{{$logo['title']}}"/>
+                    @if($logo['url'])
+                </a>
+            @endif
+        </div>
+    @endpush
+@endforeach
+
+<div class="logowall">
+    <div class="line">@stack('line0')</div>
+    <div class="line">@stack('line1')</div>
+</div>
index 1dbfd4fbb8b0e9a03e6142e66347fcd2abdbed0f..fde20ab9007280eb690798e98daf554e16f13a2b 100644 (file)
@@ -26,7 +26,8 @@ mix.browserSync({
 
 mix.js('resources/js/app.js', 'public/js')
     .js('resources/js/vendor/**/**/app.js', 'public/js/vendor.js')
-    .js('resources/js/home.js', 'public/js')
+    .js('resources/js/carrousel.js', 'public/js')
+    .js('resources/js/logowall.js', 'public/js')
     .js('resources/js/product-details.js','public/js')
     .stylus('resources/styles/app.styl', 'public/css', {
         use: [