fix: 💄 correct display issue on commitment 2

This commit is contained in:
Karl Muller 2024-09-20 11:32:36 +02:00
parent 2f3a76ca77
commit 948259dd42
3 changed files with 12 additions and 30 deletions

View file

@ -125,7 +125,7 @@
// All
$collectionComplexItems = collect([$complexItem1, $complexItem2, $complexItem3, $complexItem4]);
@endphp
<section class="line-border-large container mb-5 p-0">
<section class="line-border-large mb-md-5 container p-0">
@include('fo.partials.commitments.complex-flex-items', [
'background_color' => 'tertiary',
'collection' => $collectionComplexItems,
@ -249,21 +249,7 @@
])
</section>
{{-- PARAGRAPH WITH PICTURE --}}
@php
$newsCategory = new stdClass();
$newsCategory->title = __('Actu');
$newsModel = new stdClass();
$newsModel->title = __('découvrez notre charte nutritionnelle pour alliers plaisir et santé');
$newsModel->slug = str($newsModel->title)->slug();
$newsModel->thumbnail = Vite::asset('resources/assets/images/commitments/pictograms/picto-medications.svg');
$newsModel->thumbnail_alt = __('Pictogramme de plusieurs médicaments.');
$newsModel->thumbnail_title = __('Pictogramme d’une diminution de l’utilisation des antibiotiques.');
$newsModel->date = now()->subDays(rand(0, 31));
$newsModel->link = 'FIXME: route to the news';
$newsModel->newsCategory = $newsCategory;
$newsModel->updated_at = now();
@endphp
@include('fo.partials.commitments.paragraph-with-visual', [
'title' => __('la santé de nos volailles : on en prend le plus grand soin'),
'text' => __(
@ -273,7 +259,6 @@
'picture' => Vite::asset('resources/assets/images/commitments/common/poultries-1.jpg'),
'picture_alt' => __('Volailles dans le poulailler en train de marcher'),
'picture_title' => __(' Volailles en bonne santé marchant le poulailler librement'),
'newsModel' => $newsModel,
])
{{-- COMPLEX FLEX ITEMS --}}
@php

View file

@ -7,7 +7,7 @@
<div class="bg-tertiary line-border-small w-fit p-3 ps-5">
<h3 class="m-0 text-center">{{ $title }}</h3>
@if (isset($subtitle))
<p class="f-bourton-base m-0">{{ $subtitle }}</p>
<p class="f-bourton-base m-0 text-center">{{ $subtitle }}</p>
@endif
</div>
</div>

View file

@ -30,8 +30,7 @@
])
@endif
@if (isset($btnLabel) && !empty($btnLabel))
<a href="{{ $btnLink }}" class="btn btn-{{ $btn_color }}"
title="{{ __('Accéder à la page') }}"
<a class="btn btn-{{ $btn_color }}" href="{{ $btnLink }}" title="{{ __('Accéder à la page') }}"
aria-label="{{ __('Accéder à la page') }}">{{ $btnLabel }}</a>
@endif
</div>
@ -45,11 +44,10 @@
'ratio ratio-16x9' => isset($video_id),
])>
@if (isset($picto) && !empty($picto))
<img @class([
<img src="{{ $picto }}" title="{{ $picto_title }}" alt="{{ $picto_alt }}" @class([
'img-fluid position-absolute z-1',
isset($reversed) && $reversed ? 'pictogram-reversed' : 'pictogram',
]) src="{{ $picto }}" alt="{{ $picto_alt }}"
title="{{ $picto_title }}">
])>
@endif
<div class="bottom-left-shadow">
<div @class([
@ -80,19 +78,18 @@
</div>
@endif
@if (!isset($video_id))
<img class="img-fluid line-border-small w-100" src="{{ $picture }}"
alt="{{ $picture_alt }}" title="{{ $picture_title }}">
<img class="img-fluid line-border-small w-100" src="{{ $picture }}" title="{{ $picture_title }}"
alt="{{ $picture_alt }}">
@endif
</div>
</div>
@if (isset($card_title) && !empty($card_title))
<div class="custom-card bottom-left-shadow w-fit mx-auto mt-5 mt-md-0 z-1">
<img class="position-absolute z-2" src="{{ $card_picto }}" alt="{{ $card_picto_alt }}"
title="{{ $card_picto_title }}">
<p
class="position-absolute start-0 text-light bg-secondary rotate-left h6 m-0 p-2 ps-5 z-1">
<div class="custom-card bottom-left-shadow mt-md-0 z-1 mx-auto mt-5 w-fit">
<img class="position-absolute z-2" src="{{ $card_picto }}" title="{{ $card_picto_title }}"
alt="{{ $card_picto_alt }}">
<p class="position-absolute text-light bg-secondary rotate-left h6 z-1 start-0 m-0 p-2 ps-5">
{{ $card_sustitle }}</p>
<div class="bg-tertiary line-border-small text-center p-4">
<div class="bg-tertiary line-border-small p-4 text-center">
<h2>{{ $card_title }}</h2>
<p class="h6 m-0">{{ $card_subtitle }}</p>
<p class="m-0">{{ $card_text }}</p>