Merge branch 'develop' into trunk
This commit is contained in:
commit
d69d815a73
13 changed files with 98 additions and 52 deletions
|
|
@ -219,7 +219,7 @@ abstract class UpdateMiniCrudRequest extends FormRequest
|
|||
if (Arr::exists($this->input("data.$iptName.value"), 'picture')) {
|
||||
$rules = array_merge($rules, [
|
||||
"data.$iptName.value.picture" => "required|array",
|
||||
"data.$iptName.value.picture.path" => "required|image|mimes:png,jpg,jpeg|dimensions:width=620,height=348",
|
||||
"data.$iptName.value.picture.path" => "required",
|
||||
"data.$iptName.value.picture.alt" => "required|string|between:3,255",
|
||||
"data.$iptName.value.picture.title" => "required|string|between:3,255",
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -184,6 +184,13 @@ trait MiniCrudModel
|
|||
}
|
||||
break;
|
||||
case InputType::selectImageVideo->value:
|
||||
if (isset($data[$o]['value']['picture']) && $data[$o]['value']['picture']['path'] instanceof \Illuminate\Http\UploadedFile) {
|
||||
$data[$o]['value']['picture']['path'] = \preg_replace(
|
||||
'/^\/|^/',
|
||||
'',
|
||||
FileStorageHelper::storeFile($this, $data[$o]['value']['picture']['path'], true)
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new \ErrorException(sprintf(
|
||||
|
|
|
|||
|
|
@ -293,6 +293,10 @@ return new class extends Migration
|
|||
'inputType' => InputType::selectImageVideo->value,
|
||||
'value' => '',
|
||||
'validate' => 'required|array',
|
||||
'dimensions' => [
|
||||
'width' => 620,
|
||||
'height' => 348
|
||||
],
|
||||
'required' => true
|
||||
],
|
||||
'discover_title_1' => [
|
||||
|
|
|
|||
|
|
@ -231,25 +231,31 @@
|
|||
}
|
||||
}
|
||||
|
||||
#cards-container-outside {
|
||||
/* GRID */
|
||||
#cards-container-outside {
|
||||
.card-grid {
|
||||
display: grid;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 48px 18px;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
max-width: 1140px;
|
||||
padding: 0 2rem;
|
||||
margin: 0 auto;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.col-card {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
/* CARD */
|
||||
.light-card {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* CONTENT */
|
||||
.light-card-content.ck-content {
|
||||
h1,h2,h3 {
|
||||
h1, h2, h3 {
|
||||
margin-bottom: 0.5rem;
|
||||
font-family: inherit;
|
||||
font-family: inherit;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.059;
|
||||
|
|
@ -302,10 +308,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media (width <= 767.98px) {
|
||||
#cards-container-outside .card-grid {
|
||||
gap: 32px;
|
||||
grid-template-columns: 1fr;
|
||||
@include media-breakpoint-down(md) {
|
||||
#cards-container-outside {
|
||||
.card-grid {
|
||||
flex-direction: column !important;
|
||||
gap: 32px !important;
|
||||
}
|
||||
|
||||
.col-card {
|
||||
width: 100% !important;
|
||||
gap: 32px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -257,6 +257,8 @@
|
|||
'name' => $k,
|
||||
'value' => old("data.{$k}.value", $input['value'] ?? null),
|
||||
'required' => isset($input['required']) ? !empty($input['required']) : true,
|
||||
'width' => $input['dimensions']['width'],
|
||||
'height' => $input['dimensions']['height'],
|
||||
'model' => $model ?? null,
|
||||
'helper' =>
|
||||
__('crud.minicrud.text_warning') .
|
||||
|
|
|
|||
|
|
@ -89,13 +89,13 @@
|
|||
@include('bo.partials.inputs.varchar-picture', [
|
||||
'id' => sprintf("%sPicture", $id),
|
||||
'name' => "data[$name][value][picture][path]",
|
||||
'width' => 500,
|
||||
'height' => 500,
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'model' => $model ?? null,
|
||||
'value' => $model->data[$name]['value']['picture']['path'] ?? null,
|
||||
'helper' => __('crud.minicrud.dimensions_must_be', [
|
||||
'width' => 500,
|
||||
'height' => 500,
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
]),
|
||||
'required' => true,
|
||||
'preview' => false,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
alt="{{ $icon['alt'] }}">
|
||||
|
||||
<span class="text-uppercase bg-secondary text-light fw-semibold right-rotate-sm">{{ $category }}</span>
|
||||
<div class="bg-light position-relative line-border-small light-card-content mt-3 fs-5 f-catamaran ck-content">
|
||||
<div class="bg-light position-relative line-border-small light-card-content mt-3 f-catamaran ck-content">
|
||||
{!! clean($content) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
@props(['title' => '', 'subtitle' => '', 'image' => '', 'title_img' => '', 'alt_img' => ''])
|
||||
@props(['staticPageModel'])
|
||||
|
||||
@php
|
||||
$translatedTitle = __($title);
|
||||
$translatedSubtitle = __($subtitle);
|
||||
$translatedTitle = __($staticPageModel->title);
|
||||
$translatedSubtitle = __($staticPageModel->content);
|
||||
@endphp
|
||||
{{-- FIXME --}}
|
||||
{{-- Image banner to centered --}}
|
||||
|
|
@ -19,25 +19,24 @@
|
|||
@endif
|
||||
<div class="d-flex align-items-center">
|
||||
@if (isset($badge) && !empty($picto))
|
||||
<img class="img-fluid my-3 me-2" id="header-banner-picto" src="{{ $picto }}" title="{!! clean($picto->picto_title) !!}"
|
||||
<img class="img-fluid my-3 me-2" id="header-banner-picto" src="{{ $picto }}" title="{{ $picto->picto_title }}"
|
||||
alt="{{ $picto_alt }}">
|
||||
@endif
|
||||
<h1 class="my-3">{!! clean($title) !!}</h1>
|
||||
<h1 class="my-3">{{ $staticPageModel->title }}</h1>
|
||||
</div>
|
||||
<p>{!! clean($subtitle) !!}
|
||||
</p>
|
||||
<p>{!! clean($staticPageModel->content) !!}</p>
|
||||
</hgroup>
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-6 col-xxl-4">
|
||||
<div class="header-image-wrapper breeding-header-translate-right">
|
||||
<img class="img-fluid" src="{{ asset($image) }}"
|
||||
title="{!! clean($title_img) !!}" alt="{!! clean($alt_img) !!}">
|
||||
<img class="img-fluid" src="{{ asset($staticPageModel->picture) }}"
|
||||
title="{{ $staticPageModel->picture_title }}" alt="{{ $staticPageModel->picture_alt }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-8 position-relative z-1 mx-auto mt-4">
|
||||
<div class="d-xl-none header-image-wrapper">
|
||||
<img class="img-fluid" src="{{ asset($image) }}"
|
||||
title="{!! clean($title_img) !!}" alt="{!! clean($alt_img) !!}">
|
||||
<img class="img-fluid" src="{{ asset($staticPageModel->picture) }}"
|
||||
title="{{ $staticPageModel->picture_title }}" alt="{{ $staticPageModel->picture_alt }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<h3 class="fs-3">{{ $card['title'] }}</h3>
|
||||
<p class="fs-5 py-3">{!! $card['content'] !!}</p>
|
||||
<p class="fs-5">{!! clean($card['content']) !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="position-absolute top-100 start-50 translate-middle">
|
||||
|
|
|
|||
|
|
@ -39,24 +39,50 @@
|
|||
@endforeach
|
||||
</div>
|
||||
{{-- Cards --}}
|
||||
<div class="row mb-5 mt-5" id="cards-container-outside">
|
||||
<div class="card-grid">
|
||||
@foreach ($items as $categoryKey => $categoryItems)
|
||||
|
||||
<div style="display: contents" data-category="{{ $categoryKey }}">
|
||||
@foreach ($categoryItems as $item)
|
||||
<div class="{{ $loop->first ? 'mt-5 mt-md-0' : '' }}">
|
||||
<x-fo.breeding.light-card :category="$item->title" :icon="[
|
||||
<div class="row mb-5 mt-5" id="cards-container-outside">
|
||||
<div class="card-grid">
|
||||
@foreach ($items as $categoryKey => $categoryItems)
|
||||
<div style="display: contents" data-category="{{ $categoryKey }}">
|
||||
{{-- left cols --}}
|
||||
<div class="col-card">
|
||||
@foreach ($categoryItems as $index => $item)
|
||||
@if ($index % 2 === 0)
|
||||
<x-fo.breeding.light-card
|
||||
:category="$item->title"
|
||||
:icon="[
|
||||
'path' => $item->picture,
|
||||
'alt' => $item->picture_alt,
|
||||
'description' => $item->picture_title,
|
||||
]" :content="$item->content"
|
||||
class="card-template-sm" data-category="{{ $categoryKey }}" />
|
||||
</div>
|
||||
]"
|
||||
:content="$item->content"
|
||||
class="card-template-sm"
|
||||
data-category="{{ $categoryKey }}"
|
||||
/>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{-- right cols --}}
|
||||
<div class="col-card">
|
||||
@foreach ($categoryItems as $index => $item)
|
||||
@if ($index % 2 !== 0)
|
||||
<x-fo.breeding.light-card
|
||||
:category="$item->title"
|
||||
:icon="[
|
||||
'path' => $item->picture,
|
||||
'alt' => $item->picture_alt,
|
||||
'description' => $item->picture_title,
|
||||
]"
|
||||
:content="$item->content"
|
||||
class="card-template-sm"
|
||||
data-category="{{ $categoryKey }}"
|
||||
/>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@
|
|||
@section('bg-offset', true)
|
||||
|
||||
@section('content')
|
||||
<x-fo.breeding.section.header-section title="{{ $staticPageModel->title }}"
|
||||
subtitle="{{ strip_tags($staticPageModel->content) }}" :image="$staticPageModel->picture"
|
||||
alt_img="{{ $staticPageModel->picture_alt }}" title_img="{{ $staticPageModel->picture_title }}"
|
||||
/>
|
||||
<x-fo.breeding.section.header-section :staticPageModel="$staticPageModel"/>
|
||||
<section class="position-relative line-border-large py-4" id="les-elevages">
|
||||
<div class="position-absolute h-100 w-100 top-0 z-0">
|
||||
<div class="bg-green-wood h-100 w-100"></div>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
@section('bg-offset', true)
|
||||
|
||||
@section('content')
|
||||
<x-fo.breeding.section.header-section title="{{ __($staticPageModel->title) }}" :image="$staticPageModel->picture"
|
||||
alt_img="{{ $staticPageModel->picture_alt }}" title_img="{{ $staticPageModel->picture_title }}" />
|
||||
<x-fo.breeding.section.header-section :staticPageModel="$staticPageModel" />
|
||||
<section class="position-relative line-border-large" id="oui-c-est-bon">
|
||||
<div class="position-absolute h-100 w-100 top-0 z-0">
|
||||
<div class="bg-green-wood h-100 w-100" id="demarche-bg"></div>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
@section('bg-offset', true)
|
||||
|
||||
@section('content')
|
||||
<x-fo.breeding.section.header-section title="{{ __($staticPageModel->title) }}" :image="$staticPageModel->picture"
|
||||
alt_img="{{ $staticPageModel->picture_alt }}" title_img="{{ $staticPageModel->picture_title }}" />
|
||||
<x-fo.breeding.section.header-section :staticPageModel="$staticPageModel" />
|
||||
<section id="sortant-a-l-exterieur">
|
||||
<x-fo.breeding.section.sortant-a-l-exterieur.cahier-des-charges-section :staticPageModel="$staticPageModel" :onglets="$categoryApproachModels"
|
||||
:sections="$sections" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue