fix: #49 - Replaced pictos imgs in home strip

This commit is contained in:
Noah Lancien 2024-07-11 14:25:05 +02:00
parent a8e5ffe776
commit 48c0ddb3f0
9 changed files with 14 additions and 7 deletions

View file

@ -33,7 +33,7 @@ enum PictoEnum: int
* Pictures paths.
*/
private const PICTURES = [
self::none->name => '',
self::none->name => 'resources/assets/images/pictos/none.jpg',
self::danger->name => 'resources/assets/images/pictos/danger.png',
self::respect_earth->name => 'resources/assets/images/pictos/respect_earth.png',
self::breeding->name => 'resources/assets/images/pictos/breeding.png',
@ -55,7 +55,7 @@ enum PictoEnum: int
* Alt attributes for pictures.
*/
private const ALTS = [
self::none->name => '',
self::none->name => 'Logo Volena',
self::danger->name => 'Pictogramme pour la catégorie \'Danger\'',
self::respect_earth->name => 'Pictogramme pour la catégorie \'Respecter la terre\'',
self::breeding->name => 'Pictogramme pour la catégorie \'Elever durablement\'',
@ -78,7 +78,7 @@ enum PictoEnum: int
* Alt attributes for pictures.
*/
private const TITLES = [
self::none->name => '',
self::none->name => 'Logo Volena',
self::danger->name => 'Pictogramme pour la catégorie \'Danger\'',
self::respect_earth->name => 'Pictogramme pour la catégorie \'Respecter la terre\'',
self::breeding->name => 'Pictogramme pour la catégorie \'Elever durablement\'',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -88,6 +88,13 @@
width: 50vw;
}
.strip-item-picto {
min-width: 75px;
min-height: 75px;
border-radius: 100%;
background-color: $color-white;
}
.strip-divider {
width: 1px;
height: 100%;

View file

@ -1,8 +1,8 @@
<div class="strip-item d-flex align-items-center px-3 py-2 text-white">
@if ($stripModel->picto !== \App\Enums\Strips\PictoEnum::none)
<img class="mx-4" src="{{ Vite::asset($stripModel->picto->picture()) }}" title="{{ $stripModel->picto->title() }}"
alt="{{ $stripModel->picto->alt() }}" width="50px">
@endif
<div class="strip-item-picto d-flex justify-content-center align-items-center me-4 overflow-hidden">
<img class="object-fit-contain" src="{{ Vite::asset($stripModel->picto->picture()) }}" title="{{ $stripModel->picto->title() }}"
alt="{{ $stripModel->picto->alt() }}" width="75px">
</div>
<div class="strip-item-content">
<p>{!! clean($stripModel->text) !!}</p>
@if ($stripModel->news)