diff --git a/app/Http/Controllers/ProductsController.php b/app/Http/Controllers/ProductsController.php index a8c6f5de..b4c58db5 100644 --- a/app/Http/Controllers/ProductsController.php +++ b/app/Http/Controllers/ProductsController.php @@ -42,13 +42,12 @@ class ProductsController extends Controller switch ($type) { case 'gamme': - $range = Ranges::where([['slug', $slug], ['status', 1]])->first(); - if (!$range) { + $gamme = Ranges::where([['slug', $slug], ['status', 1]])->first(); + if (!$gamme) { abort(404); } - $productsList = $range->products; - $title = $range->name; - $gamme = true; + $productsList = $gamme->products; + $title = $gamme->name; break; case 'type-viande': $meatType = MeatTypes::where([['slug', $slug], ['status', 1]])->first(); diff --git a/resources/sass/front/_sub_header.scss b/resources/sass/front/_sub_header.scss index 86f74b98..7549064d 100644 --- a/resources/sass/front/_sub_header.scss +++ b/resources/sass/front/_sub_header.scss @@ -141,30 +141,6 @@ } &.entete-white { - .color-1 { - background-color: rgba(142, 184, 233, 1); - } - .color-2 { - background-color: rgba(255, 180, 0, 1); - } - .color-3 { - background-color: rgba(172, 40, 61, 1); - } - .color-4 { - background-color: rgba(231, 145, 14, 1); - } - .color-5 { - background-color: rgba(250, 183, 216, 1); - } - .color-6 { - background-color: rgba(238, 124, 40, 1); - } - .color-7 { - background-color: rgba(214, 177, 127, 1); - } - .color-8 { - background-color: rgba(163, 202, 177, 1); - } &:after { content: ""; @@ -539,12 +515,17 @@ margin: 210px 0 0; width: 100%; z-index: 1; + display: flex; + justify-content: center; + align-items: center; & h1 { color: white; text-align: center; font-size: 7em; font-family: "Veneer"; + display: inline-block; + padding: 0 0.3em; } } diff --git a/resources/sass/front/modules/_patterns.scss b/resources/sass/front/modules/_patterns.scss index 0283201c..e1ede203 100644 --- a/resources/sass/front/modules/_patterns.scss +++ b/resources/sass/front/modules/_patterns.scss @@ -4,8 +4,8 @@ } @mixin background-opacity($color, $opacity: 0.8) { - background: $color; /* The Fallback */ - background: rgba($color, $opacity); + background-color: $color; /* The Fallback */ + background-color: rgba($color, $opacity); } /* Pattern */ diff --git a/resources/sass/front/pages/_moment.scss b/resources/sass/front/pages/_moment.scss index 5aa321c2..b411ad4c 100644 --- a/resources/sass/front/pages/_moment.scss +++ b/resources/sass/front/pages/_moment.scss @@ -5,31 +5,6 @@ max-width: inherit !important; width: 100%; - .color-1 { - background-color: rgba(142,184,233,1); - } - .color-2 { - background-color: rgba(255,180,0,1); - } - .color-3 { - background-color: rgba(172,40,61,1); - } - .color-4 { - background-color: rgba(231,145,14,1); - } - .color-5 { - background-color: rgba(250,183,216,1); - } - .color-6 { - background-color: rgba(238,124,40,1); - } - .color-7 { - background-color: rgba(214, 177, 127, 1); - } - .color-8 { - background-color: rgba(163, 202, 177, 1); - } - & .img-moment { position: absolute; top: -20rem; diff --git a/resources/views/front/products/index.blade.php b/resources/views/front/products/index.blade.php index 20047c90..433effcf 100644 --- a/resources/views/front/products/index.blade.php +++ b/resources/views/front/products/index.blade.php @@ -8,7 +8,7 @@ if($routeName != 'products.index' && $routeName != 'products.departaimants') { } @endphp @extends('layouts.app', compact('brParam')) -@section('title', __('Nos produits')) +@section('title', isset($title) ? $title : __('Nos produits')) @section('description', __('Découvrez Le Gaulois, des produits de volailles françaises. Et aussi nos recettes, nos éleveurs et le Club des Gaulois, les Départ\'aimants et des réductions.')) @section('breadcrumb', $routeName) @@ -16,13 +16,13 @@ if($routeName != 'products.index' && $routeName != 'products.departaimants') { @section('sub_header')