From 36a46de994ca64ba94bff97b55f421101d93f17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Legrand?= Date: Wed, 12 Feb 2020 08:11:23 +0100 Subject: [PATCH 1/2] Fix VC blocks html --- resources/views/templates/Article/front.blade.php | 4 ++-- .../views/templates/ImageMultiple/front.blade.php | 2 +- resources/views/templates/ImageSimple/crud.blade.php | 7 +++++++ .../views/templates/ImageSimple/front.blade.php | 12 ++++++++---- resources/views/templates/Separator/front.blade.php | 2 +- resources/views/templates/Title/front.blade.php | 2 +- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/resources/views/templates/Article/front.blade.php b/resources/views/templates/Article/front.blade.php index 570e6e1..1f26cd4 100644 --- a/resources/views/templates/Article/front.blade.php +++ b/resources/views/templates/Article/front.blade.php @@ -10,7 +10,7 @@ ) = $content; @endphp -
+
@if (!empty($title))

{{ $title }} @@ -26,4 +26,4 @@ {!! $htmlContent !!}

@endif - + diff --git a/resources/views/templates/ImageMultiple/front.blade.php b/resources/views/templates/ImageMultiple/front.blade.php index 50305f9..33641df 100644 --- a/resources/views/templates/ImageMultiple/front.blade.php +++ b/resources/views/templates/ImageMultiple/front.blade.php @@ -4,7 +4,7 @@ } $images = array_shift($content); @endphp -
+
@foreach($images as $image) @endforeach diff --git a/resources/views/templates/ImageSimple/crud.blade.php b/resources/views/templates/ImageSimple/crud.blade.php index fc2bc4b..53acfb8 100644 --- a/resources/views/templates/ImageSimple/crud.blade.php +++ b/resources/views/templates/ImageSimple/crud.blade.php @@ -6,5 +6,12 @@
+
+ + +
diff --git a/resources/views/templates/ImageSimple/front.blade.php b/resources/views/templates/ImageSimple/front.blade.php index b05f713..fc344ee 100644 --- a/resources/views/templates/ImageSimple/front.blade.php +++ b/resources/views/templates/ImageSimple/front.blade.php @@ -2,9 +2,13 @@ if (empty($content) || !is_array($content)) { return; } - $images = array_shift($content); - $image = array_shift($images); + + list( + $image, + $altText, + ) = $content; @endphp -
- + +
+ {{ $altText ?? '' }}
diff --git a/resources/views/templates/Separator/front.blade.php b/resources/views/templates/Separator/front.blade.php index 8f8f0ac..a1d5704 100644 --- a/resources/views/templates/Separator/front.blade.php +++ b/resources/views/templates/Separator/front.blade.php @@ -1 +1 @@ -
+
diff --git a/resources/views/templates/Title/front.blade.php b/resources/views/templates/Title/front.blade.php index 70f331e..c413dd3 100644 --- a/resources/views/templates/Title/front.blade.php +++ b/resources/views/templates/Title/front.blade.php @@ -5,7 +5,7 @@ $title = array_shift($content); @endphp @if (!empty($title)) -
+

{{ $title }}

From e50e7f45c320f885970484a8badd8b8c0c970053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Legrand?= Date: Wed, 12 Feb 2020 08:29:10 +0100 Subject: [PATCH 2/2] Forgot translation --- resources/lang/en/templates.php | 1 + resources/lang/fr/templates.php | 1 + 2 files changed, 2 insertions(+) diff --git a/resources/lang/en/templates.php b/resources/lang/en/templates.php index d611e73..543b570 100644 --- a/resources/lang/en/templates.php +++ b/resources/lang/en/templates.php @@ -14,6 +14,7 @@ 'image-simple' => [ 'name' => 'Image', 'crud_image' => 'Image', + 'crud_image_alt' => 'Alt attribut', ], 'separator' => [ 'name' => 'Separator', diff --git a/resources/lang/fr/templates.php b/resources/lang/fr/templates.php index a93c92a..25eaf01 100644 --- a/resources/lang/fr/templates.php +++ b/resources/lang/fr/templates.php @@ -14,6 +14,7 @@ 'image-simple' => [ 'name' => 'Image', 'crud_image' => 'Image', + 'crud_image_alt' => 'Attribut Alt', ], 'separator' => [ 'name' => 'Séparateur',