From 9d05079c99366e3792a686f8855608e166f70ffe Mon Sep 17 00:00:00 2001 From: Antonio Dal Sie Date: Sun, 17 Jul 2022 12:50:32 +0200 Subject: [PATCH] Restyle checks and table blade --- .../views/laralens/term/checks.blade.php | 94 +++++++------------ resources/views/laralens/term/table.blade.php | 64 ++++++------- 2 files changed, 60 insertions(+), 98 deletions(-) diff --git a/resources/views/laralens/term/checks.blade.php b/resources/views/laralens/term/checks.blade.php index 713314a..02dc11a 100644 --- a/resources/views/laralens/term/checks.blade.php +++ b/resources/views/laralens/term/checks.blade.php @@ -1,78 +1,50 @@ -
+
@if (sizeof($rows) > 0) -
- - - - CHECK: issues found - -
+
+ CHECK: issues found + +
@else -
- - - - CHECK: everything looks good - -
+
+ CHECK: everything looks good + +
@endif
- - @foreach ($rows as $row) - @php + @foreach ($rows as $row) + @php $lineType = Arr::get($row, "lineType", HiFolks\LaraLens\ResultLens::LINE_TYPE_DEFAULT); $label = Arr::get($row, "label", ""); - @endphp - - @if ($label === "*** HINT") -
- - 💡 Hint: - - + @endphp + @if ($label === "*** HINT") +
+ 💡 Hint: - {{ Arr::get($row, "value", "") }} + {{ Arr::get($row, "value", "") }} -
- @else -
-
- + @else +
$lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_ERROR, + 'bg-yellow text-black' => $lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_WARNING, + 'bg-green text-white' => $lineType !== HiFolks\LaraLens\ResultLens::LINE_TYPE_ERROR + && $lineType !== HiFolks\LaraLens\ResultLens::LINE_TYPE_WARNING, + ])> + {{ Arr::get($row, "label", "")}} +
+
@if ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_ERROR) - ❌ - @elseif ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_WARNING) - ⚠️ - @else - ✔️ - @endif -  {{ Arr::get($row, "label", "")}} - - - - - - @if ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_ERROR) - {{ Arr::get($row, "value", "")}} - - @elseif ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_WARNING) - + @elseif ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_WARNING) {{ Arr::get($row, "value", "")}} - - @else - - + @else {{ Str::replace("\\", "/", Arr::get($row, "value", "")) }} - - @endif - - + @endif
- @endif - @endforeach -
+ @endif + @endforeach
-
\ No newline at end of file +
diff --git a/resources/views/laralens/term/table.blade.php b/resources/views/laralens/term/table.blade.php index ee36804..3a6612b 100644 --- a/resources/views/laralens/term/table.blade.php +++ b/resources/views/laralens/term/table.blade.php @@ -1,62 +1,52 @@ -
+
- - - - - - {{ $title }} - + {{ $title }} +
-
+
@foreach ($rows as $row) @php - $lineType = Arr::get($row, "lineType", HiFolks\LaraLens\ResultLens::LINE_TYPE_DEFAULT); - $label = Arr::get($row, "label", ""); - + $lineType = Arr::get($row, "lineType", HiFolks\LaraLens\ResultLens::LINE_TYPE_DEFAULT); + $label = Arr::get($row, "label", ""); @endphp @if ($label === "*** HINT") -
- - Hint: - +
+ Hint: - - - {{ Arr::get($row, "value", "") }} +
+ + {{ Arr::get($row, "value", "") }} -
+
@else -
+
{{ Arr::get($row, "label", "")}} - + - +
@if ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_ERROR) - - {{ Arr::get($row, "value", "")}} - + + {{ Arr::get($row, "value", "")}} + @elseif ($lineType === HiFolks\LaraLens\ResultLens::LINE_TYPE_WARNING) - - {{ Arr::get($row, "value", "")}} - + + {{ Arr::get($row, "value", "")}} + @else - - - {{ Str::replace("\\", "/", Arr::get($row, "value", "")) }} - + + {{ Str::replace("\\", "/", Arr::get($row, "value", "")) }} + @endif - - +
@endif @endforeach
- -
\ No newline at end of file + +