diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..1bd50319 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,45 @@ +image: $CI_REGISTRY/service-web-lab/ldc-web-images-docker/ldcweb-qa:php7.3-1.0 + +stages: + - Security + - CodingStandards + +composer-security: + stage: Security + script: + - local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json + artifacts: + when: on_failure + expose_as: 'composer-security-checker' + paths: + - composer-security-checker-report.json + allow_failure: true + +npm-security: + stage: Security + script: + - audit-ci -p npm -o json > npm-security-checker-report.json + artifacts: + when: on_failure + expose_as: 'npm-security-checker' + paths: + - npm-security-checker-report.json + allow_failure: true + +phpcs: + stage: CodingStandards + before_script: + - composer install + cache: + paths: + - vendor/ + script: + - vendor/bin/phpcs --report=junit --report-file=phpcs-report.xml + artifacts: + when: on_failure + expose_as: 'phpcs' + paths: + - phpcs-report.xml + reports: + junit: phpcs-report.xml + allow_failure: false \ No newline at end of file diff --git a/app/Http/Controllers/BreedingPageController.php b/app/Http/Controllers/BreedingPageController.php index 6f34cbda..ba534d18 100644 --- a/app/Http/Controllers/BreedingPageController.php +++ b/app/Http/Controllers/BreedingPageController.php @@ -44,8 +44,9 @@ class BreedingPageController extends Controller { $pages = BreedingPage::where('type', $pageType)->whereStatus(true)->get(); $bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType); + $headerText = $this->getTextHeaderFromGeneralConfig($pageType); - return view('front.breeding-page.list', compact('pages', 'pageType', 'bannerUrl')); + return view('front.breeding-page.list', compact('pages', 'pageType', 'bannerUrl', 'headerText')); } /** @@ -58,8 +59,10 @@ class BreedingPageController extends Controller */ public function show(BreedingPageType $pageType, BreedingPage $page) { - $bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType); - return view('front.breeding-page.show', compact('page', 'pageType', 'bannerUrl')); + $bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType); + $headerText = $this->getTextHeaderFromGeneralConfig($pageType); + + return view('front.breeding-page.show', compact('page', 'pageType', 'bannerUrl', 'headerText')); } /** @@ -81,4 +84,24 @@ class BreedingPageController extends Controller /** @var string banner url or empty */ return collect($generalConfig->data)->get(str_replace('_text', '_img2', $key))['value'] ?? ''; } + + /** + * Get text header from general config + * + * @param BreedingPageType $pageType + * @return string + */ + private function getTextHeaderFromGeneralConfig(BreedingPageType $pageType): string + { + $generalConfig = GeneralConfig::getCachedConfig(GeneralConfigType::breedingPage()); + /** @var string */ + $key = \strval(collect($generalConfig->data)->filter(function (array $input) use ($pageType) { + return $input['inputType']['value'] === InputType::string()->value and + isset($input['type']) and + $input['type']['value'] === $pageType->value; + })->keys()->first()); + + /** @var string banner url or empty */ + return collect($generalConfig->data)->get(str_replace('_text', '_img2', $key))['text'] ?? ''; + } } diff --git a/app/Http/Controllers/ProductsController.php b/app/Http/Controllers/ProductsController.php index f3e5b767..7daa2508 100644 --- a/app/Http/Controllers/ProductsController.php +++ b/app/Http/Controllers/ProductsController.php @@ -25,7 +25,7 @@ class ProductsController extends Controller $ranges = Range::where('status', 1)->with('products', function ($q) { $q->select(['id', 'range_id', 'picture']) ->whereStatus(true)->whereStar(true); - })->get(); + })->orderBy('order')->get(); return view('front.products.index', compact('productsSlides', 'ranges', 'meatTypes', 'ct', 'labels')); } diff --git a/app/Http/Requests/StoreBreedingPageRequest.php b/app/Http/Requests/StoreBreedingPageRequest.php index b6620a8c..ed24488b 100644 --- a/app/Http/Requests/StoreBreedingPageRequest.php +++ b/app/Http/Requests/StoreBreedingPageRequest.php @@ -8,13 +8,21 @@ use Illuminate\Support\Str; class StoreBreedingPageRequest extends StoreMiniAcfRequest { + /** + * @var string + */ protected $model = BreedingPage::class; - public function authorize() + /** + * Determine if the user is authorized to make this request. + * + * @return boolean + */ + public function authorize(): bool { if ( - is_null(request()->breeding_page_type) or - BreedingPage::where('type', request()->breeding_page_type)->count() >= 10 + is_null(request()->breedingPageType) or + BreedingPage::where('type', request()->breedingPageType)->count() >= 10 ) { return false; } @@ -64,7 +72,12 @@ class StoreBreedingPageRequest extends StoreMiniAcfRequest ); } - public function attributes() + /** + * Get custom attributes for validator errors. + * + * @return array + */ + public function attributes(): array { return \array_merge( [ @@ -81,7 +94,12 @@ class StoreBreedingPageRequest extends StoreMiniAcfRequest ); } - public function messages() + /** + * Get custom messages for validator errors. + * + * @return array + */ + public function messages(): array { return \array_merge( [ diff --git a/app/Http/Requests/UpdateBreedingPageRequest.php b/app/Http/Requests/UpdateBreedingPageRequest.php index 6af7f4bf..db7d587b 100644 --- a/app/Http/Requests/UpdateBreedingPageRequest.php +++ b/app/Http/Requests/UpdateBreedingPageRequest.php @@ -8,9 +8,22 @@ use Illuminate\Support\Str; class UpdateBreedingPageRequest extends UpdateMiniAcfRequest { + /** + * The model var name + * used as route parameter name + * + * This is used to populate generatedRules + * + * @var array + */ protected $modelVarName = 'breeding_page'; - public function authorize() + /** + * Determine if the user is authorized to make this request. + * + * @return boolean + */ + public function authorize(): bool { $this->merge([ 'status' => $this->status ? true : false @@ -59,7 +72,12 @@ class UpdateBreedingPageRequest extends UpdateMiniAcfRequest ); } - public function attributes() + /** + * Get custom attributes for validator errors. + * + * @return array + */ + public function attributes(): array { return \array_merge( [ @@ -76,7 +94,12 @@ class UpdateBreedingPageRequest extends UpdateMiniAcfRequest ); } - public function messages() + /** + * Get custom messages for validator errors. + * + * @return array + */ + public function messages(): array { return \array_merge( [ diff --git a/app/Http/Requests/UpdateMiniCrudRequest.php b/app/Http/Requests/UpdateMiniCrudRequest.php index 791d6c68..123d9b8f 100644 --- a/app/Http/Requests/UpdateMiniCrudRequest.php +++ b/app/Http/Requests/UpdateMiniCrudRequest.php @@ -81,7 +81,8 @@ abstract class UpdateMiniCrudRequest extends FormRequest ]), $input ), - "data.$iptName.alt" => $this->compileValidate('sometimes|string|min:5', $input) + "data.$iptName.alt" => $this->compileValidate('sometimes|string|min:5', $input), + "data.$iptName.text" => $this->compileValidate('sometimes|string|min:10', $input) ]); break; case InputType::url()->value: diff --git a/composer.json b/composer.json index 5036ce3c..eebd9390 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "facade/ignition": "^2.3.6", "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^2.0", - "guzzlehttp/guzzle": "^7.0.1", + "guzzlehttp/guzzle": "^7.4", "htmlmin/htmlmin": "^8.0", "kwaadpepper/enum": "^2.1", "kwaadpepper/exception-handler": "^0.0.6", diff --git a/composer.lock b/composer.lock index c14c8e10..d5d45198 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "61c7645cd9a253982a15cda313afa3b7", + "content-hash": "8054f930e5efb49206feeb82c32f5e39", "packages": [ { "name": "asm89/stack-cors", @@ -1603,16 +1603,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.4.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", "shasum": "" }, "require": { @@ -1707,7 +1707,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.4.4" }, "funding": [ { @@ -1723,7 +1723,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-06-09T21:39:15+00:00" }, { "name": "guzzlehttp/promises", @@ -10872,5 +10872,5 @@ "ext-xml": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/database/migrations/2022_07_08_104917_insert_breeding_text_general_configs_table.php b/database/migrations/2022_07_08_104917_insert_breeding_text_general_configs_table.php new file mode 100644 index 00000000..b9206901 --- /dev/null +++ b/database/migrations/2022_07_08_104917_insert_breeding_text_general_configs_table.php @@ -0,0 +1,51 @@ +cursor()->each(function () { + $test = GeneralConfig::whereType(GeneralConfigType::breedingPage())->get(); + $test->map(function (GeneralConfig $pageBreeding) { + $data = $pageBreeding->data; + // ajout d'un clé 'alt' aux images déjà existantes + foreach ($data as $index => $key) { + if (strpos($key['label'], "Image bannière") === 0 && !isset($key['header_text'])) { + $key = array_merge( + $key, + [ + 'label_text' => 'Texte entête Menu ', + 'text' => 'Contenu du texte d\'entête', + ] + ); + $data[$index] = $key; + } + } + $pageBreeding->data = $data; + $pageBreeding->saveOrFail(); + }); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +} diff --git a/database/migrations/2022_07_21_125038_set_default_value_on_orders.php b/database/migrations/2022_07_21_125038_set_default_value_on_orders.php new file mode 100644 index 00000000..f0f56e1d --- /dev/null +++ b/database/migrations/2022_07_21_125038_set_default_value_on_orders.php @@ -0,0 +1,32 @@ +string('phone')->default('')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('orders', function (Blueprint $table) { + $table->string('phone')->change(); + }); + } +} diff --git a/package-lock.json b/package-lock.json index 2a12dfd0..c4dc4f63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "legaulois2020", + "name": "srcs", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/resources/assets/images/marque/poultry_strat1_compressed.svg b/resources/assets/images/marque/poultry_strat1_compressed.svg new file mode 100644 index 00000000..8e4f8751 --- /dev/null +++ b/resources/assets/images/marque/poultry_strat1_compressed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/assets/images/marque/poultry_strat2.svg b/resources/assets/images/marque/poultry_strat2.svg new file mode 100644 index 00000000..92e70a93 --- /dev/null +++ b/resources/assets/images/marque/poultry_strat2.svg @@ -0,0 +1,1006 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/assets/images/marque/poultry_strat2_compressed.svg b/resources/assets/images/marque/poultry_strat2_compressed.svg new file mode 100644 index 00000000..00b10122 --- /dev/null +++ b/resources/assets/images/marque/poultry_strat2_compressed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/assets/images/marque/poultry_strat3_compressed.svg b/resources/assets/images/marque/poultry_strat3_compressed.svg new file mode 100644 index 00000000..df8082ea --- /dev/null +++ b/resources/assets/images/marque/poultry_strat3_compressed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/assets/images_originals/poultry_strat2.svg b/resources/assets/images_originals/poultry_strat2.svg new file mode 100644 index 00000000..df3274ef --- /dev/null +++ b/resources/assets/images_originals/poultry_strat2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/sass/front/pages/breeding-page/_common.scss b/resources/sass/front/pages/breeding-page/_common.scss new file mode 100644 index 00000000..a6fe6324 --- /dev/null +++ b/resources/sass/front/pages/breeding-page/_common.scss @@ -0,0 +1,17 @@ +.content { + &.breedingPageIndex, + &.breedingPageList, + &.breedingPageShow + { + .text-intro { + margin-top: 2rem; + text-align: center; + + p{ + font-family: 'Catamaran-Regular'; + width: 100%; + font-size: 1.4rem; + } + } + } +} \ No newline at end of file diff --git a/resources/sass/front/pages/breeding-page/_list.scss b/resources/sass/front/pages/breeding-page/_list.scss index 5fa8b2b3..79725a01 100644 --- a/resources/sass/front/pages/breeding-page/_list.scss +++ b/resources/sass/front/pages/breeding-page/_list.scss @@ -6,7 +6,7 @@ & .articles { display: flex; flex-direction: column; - margin-bottom: 3rem; + margin: 3rem 0; & > article { display: flex; diff --git a/resources/sass/front/pages/breeding-page/_nav.scss b/resources/sass/front/pages/breeding-page/_nav.scss index 12f96a0d..530bd4c6 100644 --- a/resources/sass/front/pages/breeding-page/_nav.scss +++ b/resources/sass/front/pages/breeding-page/_nav.scss @@ -1,7 +1,5 @@ .nav-breeding { - position: relative; - top: -8rem; - margin-top: inherit; + margin-top: 2rem; width: 100%; margin-left: auto; margin-right: auto; diff --git a/resources/sass/front/pages/breeding-page/_show.scss b/resources/sass/front/pages/breeding-page/_show.scss index 091cbb18..0b806f83 100644 --- a/resources/sass/front/pages/breeding-page/_show.scss +++ b/resources/sass/front/pages/breeding-page/_show.scss @@ -134,7 +134,7 @@ font-size: 0.933rem; text-align: center; transition: transform 0.35s; - transform: rotate(-180deg); + transform: rotate(0deg); } } & > div { @@ -162,7 +162,7 @@ } } & input:checked + label:after { - transform: rotate(0deg); + transform: rotate(-180deg); } } } diff --git a/resources/sass/front/pages/recipes/_index.scss b/resources/sass/front/pages/recipes/_index.scss index 5b6be542..4b0ff576 100644 --- a/resources/sass/front/pages/recipes/_index.scss +++ b/resources/sass/front/pages/recipes/_index.scss @@ -119,13 +119,6 @@ font-size: 18px; padding: 0 40px; text-transform: uppercase; - &:last-child { - color: $color6; - font-family: "CreamyScriptRegular"; - font-size: 26px; - text-transform: none; - text-shadow: 1px 0 0 $color5, -1px 0 0 $color5, 0 1px 0 $color5, 0 -1px 0 $color5, 1px 1px $color5, -1px -1px 0 $color5, 1px -1px 0 $color5, -1px 1px 0 $color5; - } } } diff --git a/resources/sass/front/pages/recipes/_show.scss b/resources/sass/front/pages/recipes/_show.scss index 30e4460b..0266bf81 100644 --- a/resources/sass/front/pages/recipes/_show.scss +++ b/resources/sass/front/pages/recipes/_show.scss @@ -167,8 +167,7 @@ } ul,ol { - padding-top: 3em; - border-top: 0.1em solid #e4e8ec; + padding-top: 1em; @media print { padding-top: 1em !important; } @@ -194,14 +193,14 @@ } .advice { + color: #4e3238; + font-family: "Catamaran-Regular"; + font-size: 1.5em; h3 { margin-top: 1em; } - - p, div { - font-size: 1.5em; - padding-top: 2em; - border-top: 0.1em solid #e4e8ec; + div { + padding-top: 1em; } } @@ -211,10 +210,10 @@ } h3 { margin-top: 50px; - border-bottom: 1px solid #e4e8ec; + font-size: 4.8em; } .tip { - margin-top: 40px; + margin-top: 1em; a { display: flex; @@ -561,16 +560,6 @@ font-size: 1.8em; padding: 0 1.2em; text-transform: uppercase; - &:last-child { - color: $color6; - font-family: "CreamyScriptRegular"; - font-size: 2.8em; - text-transform: none; - text-shadow: 0.05em 0 0 $color5, -0.05em 0 0 $color5, - 0 0.05em 0 $color5, 0 -0.05em 0 $color5, 0.05em 0.05em $color5, - -0.05em -0.05em 0 $color5, 0.05em -0.05em 0 $color5, - -0.05em 0.05em 0 $color5; - } } } } diff --git a/resources/sass/main.scss b/resources/sass/main.scss index db3b3d40..12ce6bec 100644 --- a/resources/sass/main.scss +++ b/resources/sass/main.scss @@ -62,6 +62,7 @@ @import "front/pages/health-nutrition/bloc4"; @import "front/pages/health-nutrition/bloc5"; +@import "front/pages/breeding-page/common"; @import "front/pages/breeding-page/index"; @import "front/pages/breeding-page/list"; @import "front/pages/breeding-page/show"; diff --git a/resources/views/bo/modules/minicrud-form-inputs.blade.php b/resources/views/bo/modules/minicrud-form-inputs.blade.php index 6395e638..e008be36 100644 --- a/resources/views/bo/modules/minicrud-form-inputs.blade.php +++ b/resources/views/bo/modules/minicrud-form-inputs.blade.php @@ -1,57 +1,63 @@ {{-- MINI CRUD EDIT --}}
@foreach($model->data as $k => $input) - @if(!$loop->first) -
- @endif - @switch($input['inputType']['value']) - @case(InputType::url()->value) - @case(InputType::string()->value) -
- - -
- @break - @case(InputType::text()->value) -
- - -
- @break - @case(InputType::boolean()->value) -
- -
- @break - @case(InputType::image()->value) -
- @if(isset($input['label'])) -

{{ $input['label'] }}

- @endif - {{ __('Visuel * de type JPEG/PNG/SVG - 2Mo max.')}} - {{ isset($input['dimensions']) ? __('Dimensions :dimensions', ['dimensions' => $input['dimensions']]) : __('Dimensions Maximales :max', ['max' => $input['dimensionsMax']]) }} px -
-
- - -
+ @if(!$loop->first) +
+ @endif + @switch($input['inputType']['value']) + @case(InputType::url()->value) + @case(InputType::string()->value) +
+ +
-
- - -
- @if(isset($input['value']) and strlen($input['value'])) - image - @endif -
- @break - @case(InputType::imageArray()->value) - @case(InputType::labelArray()->value) - @default - @php throw new Exception('Input type not handled'); @endphp - @endswitch + @break + @case(InputType::text()->value) +
+ + +
+ @break + @case(InputType::boolean()->value) +
+ +
+ @break + @case(InputType::image()->value) +
+ @if(isset($input['label'])) +

{{ $input['label'] }}

+ @endif + @if(isset($input['text'])) +
+ + +
+ @endif + {{ __('Visuel * de type JPEG/PNG/SVG - 2Mo max.')}} - {{ isset($input['dimensions']) ? __('Dimensions :dimensions', ['dimensions' => $input['dimensions']]) : __('Dimensions Maximales :max', ['max' => $input['dimensionsMax']]) }} px +
+
+ + +
+
+
+ + +
+ @if(isset($input['value']) and strlen($input['value'])) + image + @endif +
+ @break + @case(InputType::imageArray()->value) + @case(InputType::labelArray()->value) + @default + @php throw new Exception('Input type not handled'); @endphp + @endswitch @endforeach
diff --git a/resources/views/front/brand/poultry-page/svgFiles/strat2.blade.php b/resources/views/front/brand/poultry-page/svgFiles/strat2.blade.php index a553d144..cf6e9922 100644 --- a/resources/views/front/brand/poultry-page/svgFiles/strat2.blade.php +++ b/resources/views/front/brand/poultry-page/svgFiles/strat2.blade.php @@ -3939,138 +3939,64 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - - + - + - + + L869.8,673.8z M868.2,666.1c-1.1,0-2.2,2.4-2.5,4.4C868.6,669.7,869.6,666.1,868.2,666.1z" /> - @php $breederPageTypes = collect($generalConfig->data)->filter(function($v, $key) { + @php + $breederPageTypes = collect($generalConfig->data)->filter(function($v, $key) { return strpos($key, 'breeding_page_') === 0 and isset($v['type']) and $v['inputType']['value'] === InputType::string()->value; - }); @endphp + }); + @endphp @foreach($breederPageTypes as $key => $pageType) - @php $img = $generalConfig->data[str_replace('_text', '_img', $key)]; @endphp - + @php $img = $generalConfig->data[str_replace('_text', '_img', $key)]; @endphp + @endforeach
diff --git a/resources/views/front/breeding-page/list.blade.php b/resources/views/front/breeding-page/list.blade.php index 9d78cc3f..cd03115a 100644 --- a/resources/views/front/breeding-page/list.blade.php +++ b/resources/views/front/breeding-page/list.blade.php @@ -14,6 +14,9 @@ @section('content')
+
+ {!! clean($headerText) !!} +
@include('front.breeding-page.nav')
@foreach($pages as $page) diff --git a/resources/views/front/recipes/index.blade.php b/resources/views/front/recipes/index.blade.php index 8f92e5be..a96c0f14 100644 --- a/resources/views/front/recipes/index.blade.php +++ b/resources/views/front/recipes/index.blade.php @@ -1,51 +1,51 @@ @php -$vegetal = $value === "le-vegetal" ? true : false; +$vegetal = $value === 'le-vegetal' ? true : false; $metatitle = __('Toutes les recettes'); $metadescription = __('Envie de préparer des plats gourmands avec de la volaille 100% française ? Le Gaulois a la solution avec ses recettes faciles et originales'); -if($type) { +if ($type) { switch ($type) { case RecipeFilter::range()->value: $_ranges = $ranges->keyBy('slug')->all(); - if(array_key_exists(request()->value, $_ranges)) { + if (array_key_exists(request()->value, $_ranges)) { $metatitle = __('Toutes les recettes pour la gamme : :gamme', [ - 'gamme' => $_ranges[request()->value]->name + 'gamme' => $_ranges[request()->value]->name, ]); - $metadescription .= ' : '.$_ranges[request()->value]->name; + $metadescription .= ' : ' . $_ranges[request()->value]->name; } break; case RecipeFilter::consumption()->value: $_times = $consumptionTimes->keyBy('slug')->all(); - if(array_key_exists(request()->value, $_times)) { + if (array_key_exists(request()->value, $_times)) { $metatitle = __('Toutes les recettes par moment de consommation : :moment', [ - 'moment' => $_times[request()->value]->name + 'moment' => $_times[request()->value]->name, ]); - $metadescription .= ' : '.$_times[request()->value]->name; + $metadescription .= ' : ' . $_times[request()->value]->name; } break; case RecipeFilter::cooking()->value: - if($value) { + if ($value) { $metatitle = __('Toutes les recettes par temps de cuisson : :cooktime', [ - 'cooktime' => $value->label + 'cooktime' => $value->label, ]); - $metadescription .= '. Temps de cuisson : '.$value->label; + $metadescription .= '. Temps de cuisson : ' . $value->label; } break; case RecipeFilter::preparation()->value: - if($value) { + if ($value) { $metatitle = __('Toutes les recettes par temps de préparation : :preptime', [ - 'preptime' => $value->label + 'preptime' => $value->label, ]); - $metadescription .= '. Temps de préparation : '.$value->label; + $metadescription .= '. Temps de préparation : ' . $value->label; } break; } } -if(request()->page) { - $metatitle .= ' - '.__('page :number', ['number' => request()->page]); - $metadescription .= ' - '.__('page :number', ['number' => request()->page]); +if (request()->page) { + $metatitle .= ' - ' . __('page :number', ['number' => request()->page]); + $metadescription .= ' - ' . __('page :number', ['number' => request()->page]); } @endphp @@ -57,36 +57,34 @@ if(request()->page) { @section('bg-color', 'white-bg') @section('sub_header') -
- @include('front.recipes.index-header', ['title' => __('Les Recettes')]) -
+
+ @include('front.recipes.index-header', ['title' => __('Les Recettes')]) +
@endsection @section('content') -
- @include('front.recipes.recipes-filter') - {{ $recipes->withQueryString()->links() }} -
- @if(count($recipes)) - @foreach($recipes as $recipe) - - @endforeach - @else -

{{ __('Aucun résultat') }}

- @endif + {{ $recipes->withQueryString()->links() }}
- {{ $recipes->withQueryString()->links() }} -
@endsection - diff --git a/resources/views/front/recipes/show.blade.php b/resources/views/front/recipes/show.blade.php index 697348df..50ed01a0 100644 --- a/resources/views/front/recipes/show.blade.php +++ b/resources/views/front/recipes/show.blade.php @@ -3,226 +3,241 @@ $vegetal = ($recipe->products->first()->range->slug ?? '') == 'le-vegetal'; @endphp @extends('layouts.app', ['brParam' => $recipe, 'vegetal' => $vegetal]) @section('title', strlen($recipe->seo_title) ? $recipe->seo_title : $recipe->title) -@section('description', strlen($recipe->seo_description) ? $recipe->seo_description : ($recipe->catch_phrase ?? $recipe->title)) +@section('description', strlen($recipe->seo_description) ? $recipe->seo_description : $recipe->catch_phrase ?? + $recipe->title) -@section('breadcrumb', request()->route()->getName()) +@section('breadcrumb', + request()->route()->getName(),) @section('bg-color', 'white-bg recipeShow') @section('microdata') - + @endsection @section('sub_header') -
-
- @if($recipe->type->equals(RecipeType::video())) - - @else - {{ $recipe->title }} - @endif -
-
-

{{ $recipe->title }}

- @if(strlen($recipe->tags)) -
- @foreach(explode(';', $recipe->tags) as $tag) - @if(strlen($tag)) -
{{ $tag }}
+
+
+ @if ($recipe->type->equals(RecipeType::video())) + + @else + {{ $recipe->title }} @endif - @endforeach
- @endif -
- @if($recipe->number_people) -
- -
{{ __(':count personne(s)', ['count' => $recipe->number_people]) }}
-
- @endif - @if($recipe->preparation_time) -
- -
{!! sprintf(__(':time min %s de préparation', ['time' => $recipe->preparation_time]), '
') !!}
-
- @endif - @if($recipe->cooking_time) -
- -
{!! sprintf(__(':time min %s de cuisson', ['time' => $recipe->cooking_time]), '
') !!}
-
- @endif -
-
- @for($i = 0; $i < $recipe->difficulty->value; $i++) - - @endfor +
+

{{ $recipe->title }}

+ @if (strlen($recipe->tags)) +
+ @foreach (explode(';', $recipe->tags) as $tag) + @if (strlen($tag)) +
{{ $tag }}
+ @endif + @endforeach +
+ @endif +
+ @if ($recipe->number_people) +
+ +
{{ __(':count personne(s)', ['count' => $recipe->number_people]) }}
+
+ @endif + @if ($recipe->preparation_time) +
+ +
{!! sprintf(__(':time min %s de préparation', ['time' => $recipe->preparation_time]), '
') !!}
+
+ @endif + @if ($recipe->cooking_time) +
+ +
{!! sprintf(__(':time min %s de cuisson', ['time' => $recipe->cooking_time]), '
') !!}
+
+ @endif +
+
+ @for ($i = 0; $i < $recipe->difficulty->value; $i++) + + @endfor +
+
{{ $recipe->difficulty }}
-
{{ $recipe->difficulty }}
-
@endsection @section('content') -
- - - @if($recipe->ingredients) - - @endif - -
- @if(strlen($recipe->catch_phrase)) -
-

"{{ $recipe->catch_phrase }}"

-
- @endif - - @if(strlen($recipe->preparation)) -
-

{{ __('Préparation') }}

-
{!! clean($recipe->preparation) !!}
-
- @endif - - @if(strlen($recipe->advice)) -
-

{{ __('Le Conseil Le Gaulois') }}

-
{!! clean($recipe->advice) !!}
-
- @endif - - @if(count($recipe->articles)) - - @endif - -
- - -
-
-
-

{{ __('Recettes qui pourraient vous intéresser') }}

- @endsection @push('scriptsConstants') - + @endpush -