update partial-demo blade for the include of product
This commit is contained in:
parent
4d8bb571af
commit
0b8614ade4
2 changed files with 48 additions and 10 deletions
|
|
@ -155,15 +155,29 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||
@include('fo.partials.product-card', [
|
||||
'productPicture' => Vite::asset('resources/assets/images/tmp/nuggets.png'),
|
||||
'isNew' => true,
|
||||
'name' => __('Sauté de dinde sans os sans peau'),
|
||||
'packagePicture' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/packaging.png'), // $productModel->picture_ package_X;
|
||||
'alt' => '#FIXME:', // $productModel->picture_ package_X_alt;
|
||||
'title' => '#FIXME:', // $productModel->picture_ package_X_title;
|
||||
],
|
||||
'isNew' => true, // $productModel->is_new;
|
||||
'name' => __('Sauté de dinde sans os sans peau'),// $productModel->label;
|
||||
'isFavorite' => $customerFavorite1,
|
||||
])
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||
@include('fo.partials.product-card', [
|
||||
'name' => __('Sauté de dinde sans os sans peau'),
|
||||
'productPicture' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/nuggets.png'), // $productModel->picture_clipped;
|
||||
'alt' => '#FIXME:', // $productModel->picture_clipped_alt;
|
||||
'title' => '#FIXME:', // $productModel->picture_clipped_title;
|
||||
],
|
||||
'packagePicture' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/packaging.png'), // $productModel->picture_ package_X;
|
||||
'alt' => '#FIXME:', // $productModel->picture_ package_X_alt;
|
||||
'title' => '#FIXME:', // $productModel->picture_ package_X_title;
|
||||
],
|
||||
'name' => __('Sauté de dinde sans os sans peau'),// $productModel->label;
|
||||
'tag' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/product-tag.png'),
|
||||
'alt' => 'Alt tag',
|
||||
|
|
@ -174,8 +188,18 @@
|
|||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||
@include('fo.partials.product-card', [
|
||||
'productPicture' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/nuggets.png'), // $productModel->picture_clipped;
|
||||
'alt' => '#FIXME:', // $productModel->picture_clipped_alt;
|
||||
'title' => '#FIXME:', // $productModel->picture_clipped_title;
|
||||
],
|
||||
'packagePicture' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/packaging.png'), // $productModel->picture_ package_X;
|
||||
'alt' => '#FIXME:', // $productModel->picture_ package_X_alt;
|
||||
'title' => '#FIXME:', // $productModel->picture_ package_X_title;
|
||||
],
|
||||
'isNew' => true,
|
||||
'name' => __('Sauté de dinde sans os sans peau'),
|
||||
'name' => __('Sauté de dinde sans os sans peau'),// $productModel->label;
|
||||
'tag' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/product-tag.png'),
|
||||
'alt' => 'Alt tag',
|
||||
|
|
@ -186,8 +210,12 @@
|
|||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-4 mb-4">
|
||||
@include('fo.partials.product-card', [
|
||||
'productPicture' => Vite::asset('resources/assets/images/tmp/nuggets.png'),
|
||||
'name' => __('Sauté de dinde sans os sans peau'),
|
||||
'packagePicture' => [
|
||||
'src' => Vite::asset('resources/assets/images/tmp/packaging.png'), // $productModel->picture_ package_X;
|
||||
'alt' => '#FIXME:', // $productModel->picture_ package_X_alt;
|
||||
'title' => '#FIXME:', // $productModel->picture_ package_X_title;
|
||||
],
|
||||
'name' => __('Sauté de dinde sans os sans peau'),// $productModel->label;
|
||||
'isFavorite' => $customerFavorite4,
|
||||
])
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
{{--
|
||||
VARIABLE || COMMENT || TYPE || REQUIRED || DEFAULT
|
||||
|
||||
$packagePicture || Picture of the packaging. || array || REQUIRED ||
|
||||
$productPicture || Picture of the product. || array || OPTIONAL ||
|
||||
$isNew || New logo for the product. || string || OPTIONAL ||
|
||||
$tag || Info logo for the product. || array || OPTIONAL ||
|
||||
$isFavorite || If customer have this product in favorite || boolean || REQUIRED ||
|
||||
$name || The name of the product || boolean || REQUIRED ||
|
||||
--}}
|
||||
<div class="position-relative product-card bottom-left-shadow mt-3 py-3">
|
||||
{{-- FIXME: Le haut de la partie tertiary doit être découpée, mais je n'arrive pas à le faire sans dégommer les images et en gardant une bonne hauteur ... --}}
|
||||
<div class="bg-tertiary position-relative d-flex justify-content-center pb-5">
|
||||
<img src="{{ Vite::asset('resources/assets/images/tmp/packaging.png') }}" title="#CHANGEME" alt="#CHANGEME"
|
||||
<img src="{{ $packagePicture['src'] }}" title="{{ $packagePicture['title'] }}" alt="{{ $packagePicture['alt'] }}"
|
||||
@class([
|
||||
'w-50 rotate-right product-card-packaging',
|
||||
'me-3 ms-auto' => !empty($productPicture),
|
||||
]) />
|
||||
|
||||
@if (!empty($isNew))
|
||||
@if (isset($isNew) && $isNew)
|
||||
<img class="position-absolute product-card-tag" src="{{ Vite::asset('resources/assets/images/tmp/tag-new.svg') }}"
|
||||
title="{{ __('Tag pour un nouveau produit') }}" alt="{{ __('Tag pour un nouveau produit') }}" />
|
||||
@elseif (!empty($tag))
|
||||
|
|
@ -15,7 +25,7 @@
|
|||
alt="{{ $tag['alt'] }}" />
|
||||
@endif
|
||||
@if (!empty($productPicture))
|
||||
<img class="w-75 position-absolute product-card-product" src="{{ $productPicture }}" title="#CHANGEME" alt="#CHANGEME" />
|
||||
<img class="w-75 position-absolute product-card-product" src="{{ $productPicture['src'] }}" title="{{ $productPicture['title'] }}" alt="{{ $productPicture['alt'] }}" />
|
||||
@endif
|
||||
<button @class([
|
||||
'btn btn-link position-absolute z-1 bottom-0',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue