Merge branch 'issue-44' into 'develop'

Decorative picture is now aligned with the cooking advice part in produt.show

See merge request ldc-web/projets/agis!17
This commit is contained in:
Vincent BRIDIER 2024-01-26 11:06:57 +00:00
commit 58d359155f

View file

@ -66,10 +66,10 @@
<div class="row justify-content-center px-lg-4">
@foreach ($productModel->commitments as $commitment)
@if ($commitment->published)
<div class="col-3">
<div class="col-12 col-sm-6 col-md-4 col-lg-3 mb-3">
<div class="w-100 d-flex justify-content-center">
<img src="{{ asset($commitment->picture) }}" title="{{ $commitment->picture_title }}"
alt="{{ $commitment->picture_alt }}">
<img class="img-fluid" src="{{ asset($commitment->picture) }}"
title="{{ $commitment->picture_title }}" alt="{{ $commitment->picture_alt }}">
</div>
</div>
@endif
@ -92,45 +92,52 @@
<div class="cooking-advice text-justify">{!! clean($productModel->cooking_advice) !!}</div>
</div>
</section>
{{-- INGREDIENTS --}}
<section class="row">
<h2 class="green-title f-readex-pro fs-6 w-100 mt-5 px-4 py-2 text-white">{{ __('Ingrédients') }}</h2>
<div class="col-12">
<div class="text-justify">{!! clean($productModel->ingredients) !!}</div>
</div>
</section>
</div>
<div class="col-12 col-lg-6 h-auto">
<div class="h-100 d-flex flex-column justify-content-between">
<div class="h-50 d-none d-lg-flex align-items-center justify-content-center">
<img src="{{ asset($productModel->range->picture_productsheet) }}"
title="{{ $productModel->range->picture_productsheet_alt }}"
alt="{{ $productModel->range->picture_productsheet_title }}">
</div>
{{-- NUTRITIONNAL VALUES --}}
@php
$nutrionnal_values = json_decode($productModel->nutritionnal_values);
@endphp
<table class="table-bordered f-readex-pro mt-4 table">
<thead>
<tr class="table-dark">
<th class="text-uppercase ps-sm-5 py-xl-3 text-white">{{ __('Valeurs nutritionnelles') }}</th>
<th class="py-xl-3 text-center text-white"><span class="text-uppercase">{{ __('POUR') }}</span>
{{ __('100g') }}</th>
</tr>
</thead>
<tbody>
@foreach ($nutrionnal_values as $line)
<tr class="table-secondary">
<td class="text-dark ps-sm-5">{{ $line->label }}</td>
<td class="text-dark text-center">{{ $line->value }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="col-12 col-lg-6">
<div class="d-none d-lg-flex align-items-center justify-content-center">
<img src="{{ asset($productModel->range->picture_productsheet) }}"
title="{{ $productModel->range->picture_productsheet_alt }}"
alt="{{ $productModel->range->picture_productsheet_title }}">
</div>
</div>
</div>
<div class="row px-3">
<div class="col-12 col-lg-6">
<div class="d-flex flex-column justify-content-between">
{{-- INGREDIENTS --}}
<section class="row">
<h2 class="green-title f-readex-pro fs-6 w-100 mt-5 px-4 py-2 text-white">{{ __('Ingrédients') }}</h2>
<div class="col-12">
<div class="text-justify">{!! clean($productModel->ingredients) !!}</div>
</div>
</section>
</div>
</div>
<div class="col-12 col-lg-6 mt-lg-5">
{{-- NUTRITIONNAL VALUES --}}
@php
$nutrionnal_values = json_decode($productModel->nutritionnal_values);
@endphp
<table class="table-bordered f-readex-pro mt-5 table">
<thead>
<tr class="table-dark">
<th class="text-uppercase ps-sm-5 py-xl-3 text-white">{{ __('Valeurs nutritionnelles') }}</th>
<th class="py-xl-3 text-center text-white"><span class="text-uppercase">{{ __('POUR') }}</span>
{{ __('100g') }}</th>
</tr>
</thead>
<tbody>
@foreach ($nutrionnal_values as $line)
<tr class="table-secondary">
<td class="text-dark ps-sm-5">{{ $line->label }}</td>
<td class="text-dark text-center">{{ $line->value }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</section>
@if (count($otherProductModels))