]> _ Git - pmi.git/commitdiff
WIP #2731 @9.5
authorStephen Cameron <stephen@cubedesigners.com>
Mon, 27 May 2019 18:50:52 +0000 (20:50 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Mon, 27 May 2019 18:50:52 +0000 (20:50 +0200)
20 files changed:
app/Providers/AppServiceProvider.php
composer.json
composer.lock
resources/styles/app.styl
resources/styles/common/columns.styl [new file with mode: 0644]
resources/styles/common/global.styl
resources/styles/common/links.styl
resources/styles/common/setup.styl
resources/styles/common/spacing.styl
resources/styles/components/buttons.styl
resources/styles/components/grids.styl
resources/styles/components/solutions.styl
resources/styles/components/text-block.styl [new file with mode: 0644]
resources/views/components/button.blade.php [deleted file]
resources/views/components/column.blade.php [new file with mode: 0644]
resources/views/components/columns.blade.php
resources/views/components/flexible-image.blade.php [new file with mode: 0644]
resources/views/components/link-button.blade.php [new file with mode: 0644]
resources/views/components/text-block.blade.php
resources/views/pages/home.blade.php

index fba2c6c42fc50f17d3b5f0f4942e09e36ad05221..88faa47ffa4ff735e9271dd1b47b84805a0daaaf 100644 (file)
@@ -4,6 +4,7 @@ namespace App\Providers;
 
 use Illuminate\Support\ServiceProvider;
 use Illuminate\Support\Facades\Blade;
+use Spatie\BladeX\Facades\BladeX;
 
 class AppServiceProvider extends ServiceProvider
 {
@@ -24,11 +25,14 @@ class AppServiceProvider extends ServiceProvider
      */
     public function boot()
     {
-        // Blade Component Aliases
-        Blade::component('components.full-width', 'fullwidth'); // @fullwidth / @endfullwidth
-        Blade::component('components.content', 'content'); // @content / @endcontent
-        Blade::component('components.columns', 'cols'); // @cols / @endcols
-        Blade::component('components.text-block', 'textblock'); // @textblock / @endtextblock
-        Blade::component('components.button', 'button'); // @button / @endbutton
+        // BladeX Component Aliases
+        // Ref: https://docs.spatie.be/laravel-blade-x/v2/introduction
+        BladeX::component('components.flexible-image'); // <flexible-image />
+        BladeX::component('components.full-width'); // <full-width> ... </full-width>
+        BladeX::component('components.content'); // <content> ... </content>
+        BladeX::component('components.columns'); // <columns> ... </columns>
+        BladeX::component('components.column'); // <column> ... </column>
+        BladeX::component('components.text-block'); // <text-block> ... </text-block>
+        BladeX::component('components.link-button'); // <link-button> ... </link-button>
     }
 }
index f28b4f2ddf17d46cb9345f84d2a523f9f4f77bfd..6e0203bbb93fdd97b757918a087dd53f65c2c293 100644 (file)
@@ -14,7 +14,8 @@
     ],
     "license": "proprietary",
     "require": {
-        "cubist/cms-back": "dev-master"
+        "cubist/cms-back": "dev-master",
+        "spatie/laravel-blade-x": "^2.2"
     },
     "config": {
         "optimize-autoloader": true,
index 64ba83d21f6997ee6bdf0b25069cff0524229dbf..52b94f9998eb6cd057f27aadcc4cf524e757b038 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "baa7e538ae705a74b0316768ec48ab1e",
+    "content-hash": "d30d88039eb3603444dae6a76486df8e",
     "packages": [
         {
             "name": "almasaeed2010/adminlte",
             ],
             "time": "2019-04-25T11:01:00+00:00"
         },
+        {
+            "name": "spatie/laravel-blade-x",
+            "version": "2.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/spatie/laravel-blade-x.git",
+                "reference": "db4f3dfd1f5f3d05ca3f4a688cdd708129a652f4"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/spatie/laravel-blade-x/zipball/db4f3dfd1f5f3d05ca3f4a688cdd708129a652f4",
+                "reference": "db4f3dfd1f5f3d05ca3f4a688cdd708129a652f4",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/view": "~5.8.0",
+                "php": "^7.2"
+            },
+            "require-dev": {
+                "orchestra/testbench": "~3.8.0",
+                "phpunit/phpunit": "^8.0",
+                "spatie/phpunit-snapshot-assertions": "^2.1"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Spatie\\BladeX\\BladeXServiceProvider"
+                    ],
+                    "aliases": {
+                        "BladeX": "Spatie\\BladeX\\Facades\\BladeX"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Spatie\\BladeX\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastian De Deyne",
+                    "email": "sebastian@spatie.be",
+                    "homepage": "https://spatie.be",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Freek Van der Herten",
+                    "email": "freek@spatie.be",
+                    "homepage": "https://spatie.be",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Alex Vanderbist",
+                    "email": "alex@spatie.be",
+                    "homepage": "https://spatie.be",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Brent Roose",
+                    "email": "brent@spatie.be",
+                    "homepage": "https://spatie.be",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Ruben Van Assche",
+                    "email": "ruben@spatie.be",
+                    "homepage": "https://spatie.be",
+                    "role": "Developer"
+                }
+            ],
+            "description": "Supercharged Blade components",
+            "homepage": "https://github.com/spatie/laravel-blade-x",
+            "keywords": [
+                "blade",
+                "components",
+                "html",
+                "laravel-blade-x",
+                "spatie"
+            ],
+            "time": "2019-02-27T16:32:52+00:00"
+        },
         {
             "name": "spatie/laravel-googletagmanager",
             "version": "2.6.0",
index 4a843cc35fa09b932d93295a1b3e698c6b279027..f2129dd499afd3e529832b9a67e4839e89cb926d 100644 (file)
@@ -8,6 +8,7 @@
 
 // Extracted components or custom styles that can't be done with utilities
 @import 'common/spacing'
+@import 'common/columns'
 @import 'common/global'
 @import 'common/headings'
 @import 'common/links'
diff --git a/resources/styles/common/columns.styl b/resources/styles/common/columns.styl
new file mode 100644 (file)
index 0000000..11ad380
--- /dev/null
@@ -0,0 +1,24 @@
+// Layout Columns (see columns.blade.php)
+
+// Using CSS Grid make a set of equal width columns
+// The number of columns may vary and we can also use
+// other classes set things like the grid gap
+.column-wrapper
+  display: grid
+  grid-auto-columns: 1fr
+  grid-auto-flow: column
+
+  // Although we could use CSS Grid's minmax functionality to make
+  // grids wrap, it's better to set a specific breakpoint because
+  // then we can use the same breakpoint for other things like
+  // disabling overlaps, reducing text-block padding etc.
+  +below($breakpoint-columns)
+    grid-template-columns: 1fr
+    grid-auto-columns: unset
+    grid-auto-flow: unset
+
+    // When columns are stacked, add margins between them
+    .column
+      constrain(margin-bottom, $vertical-gutter)
+
+
index dca707a0a0dd72799562b1fe4eae0d6d0d885a04..246ba106b3185c24ea9cb66e7eab910503264c11 100644 (file)
@@ -18,14 +18,16 @@ $overlap-amount = 10vw
 .overlap
   &-left
 
-    // Todo: only apply this above the columns breakpoint
-    //+above($breakpoint-columns)
-
-    position: relative
-    constrain(left, - $overlap-amount)
-
-    width: s('calc(100% + %s)', $overlap-amount)
-    max-width: 672px
+    +above($breakpoint-columns)
+      position: relative
+      constrain(left, - $overlap-amount)
+      width: s('calc(100% + %s)', $overlap-amount)
+      max-width: 672px
 
     +above($base-width)
       width: s('calc(100% + %s)', $base-width * 0.1)
+
+  &-bottom
+    +above($breakpoint-columns)
+      constrain(margin-bottom, -5vw)
+      z-index: 10
index ccc34b37e0222b82ac0706048058c0336d500527..2fdd559cce747e5981db5271ad4e846c1a71db11 100644 (file)
@@ -4,12 +4,13 @@ a
   @apply text-blue
   transition: color 0.3s
 
-  &.animated-underline
+  // Apply these styles only to links without any classes (default links)
+  // OR to those with the special class names in case we need to override it
+  &:not([class]), &.animated-underline, &.partial-underline
+    font-family: theme('fontFamily.display')
     position: relative
     padding-bottom: 2px
 
-
-
     &:before
       content: ''
       display: block
@@ -28,15 +29,15 @@ a
         transform: scaleX(1)
 
 
-    // Partial underline hover effect
-    &.partial-underline
-      overflow: hidden
+  // Partial underline hover effect
+  &.partial-underline
+    overflow: hidden
 
-      &:before
-        constrain(width, 2.5vw)
+    &:before
+      constrain(width, 2.5vw)
 
-      &:hover > *
-        color: currentColor
+    &:hover > *
+      color: currentColor
 
-      > *
-        transition: color 0.2s
+    > *
+      transition: color 0.2s
index d7e96bbf751b93c2cb03ab65dd7393c73e836c6b..99d1bcebcab10569d8b38805619a822609c5f100 100644 (file)
@@ -9,9 +9,10 @@ $content-max-width = $base-width * 0.9 // Allows 5% either side
 
 // Gutters (assumed to always be a vw, vh or % unit)
 $horizontal-gutter = 5vw
-$vertical-gutter   = 2.5vw
+$vertical-gutter   = 5vw
 
 // Breakpoints in Rupture (https://github.com/jescalan/rupture)
+$breakpoint-columns  = 768px
 rupture.scale        = 0 400px   768px   1024px
 rupture.scale-names  = 'small' 'medium' 'large'
 rupture.anti-overlap = -1px // Results in +below(1000px) being max-width: 999px and +above(1000px) being min-width: 1000px
index c0f8bc568bd96eac7515e143354e68454cd68bfc..2f3b6d0d97990369be56b866873d94f7789f5545 100644 (file)
@@ -1,4 +1,4 @@
-// Build utility classes for padding/margin based on vw units
+// Generate utility classes for padding/margin based on vw units
 // This will generate classes like pt-1v, pt-2v, pr-1v etc.
 
 $vw-spacing = {
@@ -21,7 +21,7 @@ $sides = {
 // Generate classes
 for counter, vwAmount in $vw-spacing
 
-  // First, generate classes for all sides...
+  // First, generate classes for all sides + grid gaps...
 
   // Padding (p-1v, p-2v etc)
   .p-{counter}v
@@ -32,7 +32,7 @@ for counter, vwAmount in $vw-spacing
     constrain(margin, vwAmount)
 
   // Negative margins (-m-1v, -m-2v etc)
-  .-m{counter}v
+  .-m-{counter}v
     constrain(margin, - vwAmount)
 
 
index 8556931093b7120e5da9bc9469252c5839f5c875..26ac84fc62395f04e53aa26f42cd90b0e758e5d1 100644 (file)
@@ -1,7 +1,7 @@
 // Buttons
 
 .btn
-  @apply bg-blue text-white px-10 py-4 relative inline-block overflow-hidden
+  @apply bg-blue text-white font-display px-10 py-4 relative inline-block overflow-hidden
 
   &-text
     @apply z-10 relative
index 2d6d0345863cb8a40b9c9959a631f3a65e96d74f..a3c5e4c980e1227456df4a33371496aa442a6c1b 100644 (file)
@@ -1,32 +1,66 @@
-.grid
-  @supports (display: grid) // Modern browsers get the native grid
-    display: grid
-    constrain(grid-gap, 1.25vw)
+// Generate utility classes for grids
+// Grid gaps are on 0.25vw jumps for greater control
+$vw-spacing = {
+  '1': 0.25vw,
+  '2': 0.5vw,
+  '3': 0.75vw,
+  '4': 1vw,
+  '5': 1.25vw,
+  '6': 1.5vw,
+  '7': 1.75vw,
+  '8': 2vw,
+  '9': 2.25vw,
+  '10': 2.25vw,
+}
 
-  &-cols-2
+// Generate classes
+for counter, vwAmount in $vw-spacing
 
-    // Todo: consider using Modernizr so we can clean this up and only apply the .no-grid for IE11 and friends
-    // For IE11 and older browsers, use lost grid...
-    > *
-      lost-column: 1/2 2 1.25vw
-      margin-bottom: 1.25vw
+  .grid-gap-{counter}v
+    constrain(grid-gap, vwAmount)
 
-    @supports (display: grid)
-      grid-template-columns: repeat(auto-fill, minmax(225px, 1fr))
+//----------------------------------
 
-      //Reset the lost-grid so it doesn't interfere
-      > *
-        lost-column: none
-        margin: 0 !important
-        flex-basis: auto
-        max-width: none
 
-        //// Internal block alignment - make sure text label sits at bottom
-        //display: flex
-        //flex-direction: column
-        //justify-content: space-between
+.grid
+  display: grid
+
+  // ToDo: add Tailwind @responsive variations so grids can be changed via generic class names
 
+  &-cols-2
+    grid-template-columns: repeat(2, 1fr)
 
   &-cols-3
-    @supports (display: grid)
-      grid-template-columns: repeat(3, 1fr)
+    grid-template-columns: repeat(3, 1fr)
+
+  &-cols-4
+    grid-template-columns: repeat(4, 1fr)
+
+
+  //&-cols-2
+  //
+  //  // Todo: consider using Modernizr so we can clean this up and only apply the .no-grid for IE11 and friends
+  //  // For IE11 and older browsers, use lost grid...
+  //  > *
+  //    lost-column: 1/2 2 1.25vw
+  //    margin-bottom: 1.25vw
+  //
+  //  @supports (display: grid)
+  //    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr))
+  //
+  //    //Reset the lost-grid so it doesn't interfere
+  //    > *
+  //      lost-column: none
+  //      margin: 0 !important
+  //      flex-basis: auto
+  //      max-width: none
+  //
+  //      //// Internal block alignment - make sure text label sits at bottom
+  //      //display: flex
+  //      //flex-direction: column
+  //      //justify-content: space-between
+  //
+  //
+  //&-cols-3
+  //  @supports (display: grid)
+  //    grid-template-columns: repeat(3, 1fr)
index cdade838ef9897e80c773411e3e49e32dd55b61e..bd16b9ccae50158ce9638306267bea9a3f6cdc87 100644 (file)
       content: ''
       position: absolute
       left: 0
-      bottom: 0
+      bottom: -5px // Avoid small gaps at some resolutions when bottom: 0
       width: 110% // A bit wider to get rid of small gaps at some resolutions
       height: 50%
       background-image: linear-gradient(to top, rgba(#000, 0.6), transparent)
 
 
   &-text
-    @apply absolute text-2xl text-white
+    @apply absolute text-2xl text-white font-display
     constrain(left, 2.5vw)
     constrain(bottom, 2.5vw)
 
diff --git a/resources/styles/components/text-block.styl b/resources/styles/components/text-block.styl
new file mode 100644 (file)
index 0000000..823da83
--- /dev/null
@@ -0,0 +1,11 @@
+.text-block
+
+  +below($breakpoint-columns)
+    padding-left: 0
+    padding-right: 0
+
+  &-body
+    @apply max-w-text
+
+    +below($breakpoint-columns)
+      max-width: none
diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php
deleted file mode 100644 (file)
index 45cbe77..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<a href="{{ $url ?? '#' }}" class="btn {{ $class ?? '' }}">
-    <span class="btn-text">{{ $slot }}</span>
-</a>
diff --git a/resources/views/components/column.blade.php b/resources/views/components/column.blade.php
new file mode 100644 (file)
index 0000000..a9eeb47
--- /dev/null
@@ -0,0 +1,4 @@
+{{-- Column Component --}}
+<div class="column {{ $class ?? '' }}">
+    {{ $slot }}
+</div>
index 5b1eee433830f5cd892844f39a6b8908692fbd80..b4f6ab3930b0604b2a659f56c7df5d5e58cdf4b3 100644 (file)
@@ -1,19 +1,13 @@
-@php
-    $count = $count ?? 2;
-    $column_class = 'w-1/' . $count; // Dynamic number of columns
-
-    // PurgeCSS can't see the dynamically generated class names above
-    // so we provide a quick whitelist in this comment for it to read:
-    // w-1/2 w-1/3 w-1/4 w-1/5 w-1/6 w-1/12
-@endphp
-
-<div class="flex">
-
-    @for ($i = 1; $i <= $count; $i++)
-        <div class="{{ $column_class }} {{ ${"column_{$i}_class"} ?? '' }}" {{ ${"column_{$i}_attributes"} ?? '' }}>
-            {{-- Create numbered slots for each column with the name 'column_x' --}}
-            {{ ${"column_$i"} ?? '' }}
-        </div>
-    @endfor
-
+{{-- Columns Component --}}
+{{--
+    This is a simplified version thanks to CSS Grid.
+    Using the BladeX syntax, this is called using:
+    <columns class="grid-no-gap">
+        <column>Col 1</column>
+        <column>Col 2</column>
+    </columns>
+--}}
+
+<div class="column-wrapper {{ $class ?? '' }}">
+    {{ $slot }}
 </div>
diff --git a/resources/views/components/flexible-image.blade.php b/resources/views/components/flexible-image.blade.php
new file mode 100644 (file)
index 0000000..1a16dc9
--- /dev/null
@@ -0,0 +1,21 @@
+{{-- Flexible Background Image Block --}}
+{{--
+    This component is used when we need an image that will fill a column's height
+    (cropped using background-size: cover) but then behave like a normal responsive
+    image when the columns are stacked.
+--}}
+
+@if ($src)
+
+    @php
+        $meta = getimagesize($src);
+        $ratio = $meta[1] / $meta[0] * 100 .'%'; // Height / Width
+    @endphp
+
+    <div class="bg-image h-full bg-cover bg-no-repeat" style="background-image: url({{ asset($src) }}); background-position: {{ $bg_position ?? 'center' }}">
+        <div class="bg-image-sizer" style="padding-bottom: {{ $ratio }}"></div>
+    </div>
+@endif
+
+
+
diff --git a/resources/views/components/link-button.blade.php b/resources/views/components/link-button.blade.php
new file mode 100644 (file)
index 0000000..b1ad034
--- /dev/null
@@ -0,0 +1,3 @@
+<a href="{{ $href ?? '#' }}" class="btn {{ $class ?? '' }}">
+    <span class="btn-text">{{ $slot }}</span>
+</a>
index e6926473020ed826e951634dec13ef76b2127e33..5d43db75bce02637df43bde30fc05eadb85cb6ac 100644 (file)
@@ -3,16 +3,16 @@
     // Default classes
     $class = $class ?? '';
     $padding = $padding ?? 'pl-2v';
-    $title_class = $title_class ?? 'h1';
+    $titleClass = $titleClass ?? 'h1';
 @endphp
 
 <div class="text-block {{ $class }} {{ $padding }}">
 
     @isset($title)
-        <h2 class="{{ $title_class }}">{{ $title }}</h2>
+        <h2 class="{{ $titleClass }}">{{ $title }}</h2>
     @endisset
 
-    <div class="text-block-body max-w-text">
+    <div class="text-block-body">
         {{ $slot }}
     </div>
 
index 06f5aafec4ebf02371294e30b50ce960b7818fec..875786b816eee35fd76a6dc4cf30b61c0f707620 100644 (file)
@@ -1,93 +1,76 @@
-@extends('layouts.app')
+@extends('layouts/app')
 
 @section('content')
 
     {{-- Slider --}}
-    @fullwidth(['class' => 'bg-navy text-white antialiased', 'padding' => 'pt-1v'])
-        @content
+    <full-width class="bg-navy text-white antialiased" padding="pt-1v">
+        <content>
+            <columns>
+                <column class="pt-2v pr-1v pb-2v">
 
-            @cols
-                @slot('column_1_class') pt-2v pr-1v pb-2v @endslot
-                @slot('column_1')
-
-                    @textblock(['title_class' => 'h1 text-inherit'])
-
-                        @slot('title')
-                            Wheel Force Transducer
-                        @endslot
+                    <text-block title="Wheel Force Transducer" title-class="h1 text-inherit">
 
                         <p>
                             Wheel Force Transducers (WFT) are used for measuring all wheel forces and moments. Field and laboratory test of passenger cars, light duty trucks, heavy duty trucks, vans, SUVs, class 8 trucks, heavy duty construction and farm equipment.
                         </p>
 
                         <p>
-                            @button(['url' => '#'])
-                            Découvrir
-                            @endbutton
+                            <link-button href="#test123">Découvrir</link-button>
                         </p>
 
                         <div class="pb-2v"></div>
+                    </text-block>
 
+                </column>
 
-                    @endtextblock
-
-                @endslot
+                <column class="overlap-bottom">
+                    <flexible-image src="storage/uploads/images/home-car.jpg" />
+                </column>
 
-                @slot('column_2_class') -mb-2v z-10 bg-cover @endslot
-                @slot('column_2_attributes')
-                    style="background-image:url({{ asset('storage/uploads/images/home-car.jpg') }})"
-                @endslot
-                @slot('column_2')
-                    {{-- No content --}}
-                @endslot
-
-            @endcols
-        @endcontent
-    @endfullwidth
+            </columns>
+        </content>
+    </full-width>
 
     {{-- Intro text --}}
-    @fullwidth(['padding' => 'pt-5v pb-4v'])
-        @content
-            @cols
-                @slot('column_1')
+    <full-width padding="pt-5v pb-4v">
+        <content>
+            <columns>
+                <column>
                   <img src="{{ asset('storage/uploads/images/home-wing.jpg') }}" alt="">
-                @endslot
+                </column>
 
-                @slot('column_2')
-                    @textblock(['class' => 'pt-2v', 'title_class' => 'h1 overlap-left'])
-                        @slot('title')
+                <column>
+                    <text-block class="pt-2v" title_class="h1 overlap-left">
+                        <slot name="title">
                             Expert de la mesure
                             depuis plus de 30 ans
-                        @endslot
+                        </slot>
 
                         <p>PM instrumentation distribue depuis 1986 des Capteurs et Systèmes de haute technicité. Issue de la société Schaevitz, PM Instrumentation a su développer une gamme de capteurs et systèmes d’excellente qualité provenant principalement des Etats-Unis.</p>
 
                         <p>Principalement dédiés aux mesures physiques, nous saurons vous conseiller dans le choix de produits adaptés à votre environnement.</p>
 
-                        <p><a class="animated-underline" href="#">En savoir plus</a></p>
-                    @endtextblock
-                @endslot
-            @endcols
-        @endcontent
-    @endfullwidth
+                        <p><a href="#">En savoir plus</a></p>
+                    </text-block>
+
+                </column>
+            </columns>
+        </content>
+    </full-width>
 
 
     {{-- Our products --}}
-    @fullwidth(['class' => 'bg-grey-100'])
-        @content
+    <full-width class="bg-grey-100">
+        <content>
 
-            @textblock(['class' => 'mb-2v'])
-                @slot('title')
-                    Nos Produits
-                @endslot
-            @endtextblock
+            <text-block class="mb-2v" title="Nos Produits" />
 
-            @cols
-                @slot('column_1')
+            <columns>
+                <column>
 
                     <h3 class="h2 simple pl-1v">Capteurs</h3>
 
-                    <div class="grid grid-cols-2 pr-1v border-r border-grey-300">
+                    <div class="grid grid-cols-2 grid-gap-5v pr-1v border-r border-grey-300">
                         @for ($i = 1; $i <= 6; $i++)
                             <div class="bg-white px-1v py-6 flex">
                                 <a class="animated-underline partial-underline flex flex-col justify-between w-full" href="#">
                         @endfor
                     </div>
 
-                @endslot
+                </column>
 
 
-                @slot('column_2')
+                <column>
                     <h3 class="h2 simple pl-2v">Systèmes de mesure</h3>
 
-                    <div class="grid grid-cols-2 pl-1v">
+                    <div class="grid grid-cols-2 grid-gap-5v pl-1v">
                         @for ($i = 1; $i <= 6; $i++)
                             <div class="bg-white px-1v py-6 flex">
                                 <a class="animated-underline partial-underline flex flex-col justify-between w-full" href="#">
                         @endfor
                     </div>
 
-                @endslot
+                </column>
 
-            @endcols
+            </columns>
 
-        @endcontent
-    @endfullwidth
+        </content>
+    </full-width>
 
 
     {{-- Solutions / Applications --}}
-    @fullwidth(['class' => 'bg-navy text-white antialiased'])
-        @content
-            @textblock(['title_class' => 'h1 text-inherit'])
-                @slot('title')
-                    Solutions / Applications
-                @endslot
-            @endtextblock
+    <full-width class="bg-navy text-white antialiased">
+        <content>
+            <text-block title-class="h1 text-inherit" title="Solutions / Applications" />
 
             @php
                 // TEMPORARY DATA
                 ];
             @endphp
 
-            <div class="grid grid-cols-3">
+            <div class="grid grid-cols-3 grid-gap-10v">
                 @foreach ($solutions as $i => $solution)
                     @php($i++)
                     <a class="solutions-link">
                 @endforeach
             </div>
 
-        @endcontent
-    @endfullwidth
+        </content>
+    </full-width>
 
     {{-- Services & Support --}}
-    @fullwidth(['class' => 'bg-grey-100'])
-        @content
-        @cols
-            @slot('column_1')
-                <img src="{{ asset('storage/uploads/images/home-services.jpg') }}" alt="">
-            @endslot
-
-            @slot('column_2')
-                @textblock(['class' => 'pt-2v', 'title_class' => 'h1 overlap-left'])
-                    @slot('title')
-                        Services & Support
-                    @endslot
-
-                    <p>PM instrumentation distribue depuis 1986 des Capteurs et Systèmes de haute technicité. Issue de la société Schaevitz, PM Instrumentation a su développer une gamme de capteurs et systèmes d’excellente qualité provenant principalement des Etats-Unis.</p>
-
-                    <p>Principalement dédiés aux mesures physiques, nous saurons vous conseiller dans le choix de produits adaptés à votre environnement.</p>
-
-                    <p><a class="animated-underline" href="#">En savoir plus</a></p>
-                @endtextblock
-            @endslot
-        @endcols
-        @endcontent
-    @endfullwidth
+    <full-width class="bg-grey-100">
+        <content>
+            <columns>
+                <column>
+                    <img src="{{ asset('storage/uploads/images/home-services.jpg') }}" alt="">
+                </column>
+
+                <column>
+                    <text-block class="pt-2v" title-class="h1 overlap-left" title="Services & Support">
+                        <p>PM instrumentation distribue depuis 1986 des Capteurs et Systèmes de haute technicité. Issue de la société Schaevitz, PM Instrumentation a su développer une gamme de capteurs et systèmes d’excellente qualité provenant principalement des Etats-Unis.</p>
+
+                        <p>Principalement dédiés aux mesures physiques, nous saurons vous conseiller dans le choix de produits adaptés à votre environnement.</p>
+
+                        <p><a href="#">En savoir plus</a></p>
+                    </text-block>
+                </column>
+            </columns>
+        </content>
+    </full-width>
 
     {{-- News --}}
-    @fullwidth
-        @content
-            @textblock
-                @slot('title')
-                    Actualités
-                @endslot
-            @endtextblock
-        @endcontent
-    @endfullwidth
+    <full-width>
+        <content>
+            <text-block title="Actualités" />
+
+            <div class="grid grid-cols-4 grid-gap-10v">
+                @for ($i = 1; $i <= 4; $i++)
+                    <div>
+                        <img class="mb-4" src="{{ asset('storage/uploads/images/news-1.jpg') }}" alt="">
+                        <h4 class="font-display">News 0{{ $i }}</h4>
+                        <p>PM instrumentation distribue depuis 1986 des Capteurs et Systèmes de haute technicité. Issue de la société Schaevitz,...</p>
+                        <p><a href="#">Lire la suite</a></p>
+                    </div>
+                @endfor
+            </div>
+        </content>
+    </full-width>
 
     {{-- Our Clients --}}
-    @fullwidth(['class' => 'bg-grey-100'])
-        @content
-            @textblock
-                @slot('title')
-                    Nos clients
-                @endslot
-            @endtextblock
-        @endcontent
-    @endfullwidth
+    <full-width class="bg-grey-100">
+        <content>
+            <text-block title="Nos clients" />
+
+            <div class="grid grid-cols-4 grid-gap-10v">
+                @for ($i = 1; $i <= 8; $i++)
+                    <div class="bg-white hover:bg-grey-200 cursor-pointer" style="padding-bottom: 58%"></div>
+                @endfor
+            </div>
+        </content>
+    </full-width>
 
 @endsection