From 242d49868507f00c49e8b411222d5287dc59668a Mon Sep 17 00:00:00 2001 From: ROMANGOLIENKO Date: Thu, 14 Mar 2024 13:11:18 +0300 Subject: [PATCH] direction offcanvas design change --- .../Controllers/Api/CalculatorController.php | 88 ++++++++++++------- app/Services/DirectonHtmlBuilder.php | 88 ++++++++++++------- resources/views/test.blade.php | 0 3 files changed, 108 insertions(+), 68 deletions(-) create mode 100644 resources/views/test.blade.php diff --git a/app/Http/Controllers/Api/CalculatorController.php b/app/Http/Controllers/Api/CalculatorController.php index 73065e8..dd7a058 100644 --- a/app/Http/Controllers/Api/CalculatorController.php +++ b/app/Http/Controllers/Api/CalculatorController.php @@ -8,6 +8,7 @@ use App\Models\Direction; use App\Models\EntranceExamination; use App\Models\Faculty; use Illuminate\Http\Request; +use Illuminate\Support\Facades\URL; class CalculatorController extends Controller { @@ -32,59 +33,78 @@ class CalculatorController extends Controller $department = Department::find($direction->department_id); $faculty = Faculty::find($department->faculty_id); // phpcs:disable + $fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png'); return "{$acc} {$faculty->name} id}{$direction->id }\" aria-controls=\"offcanvasScrolling\" role=\"button\">{$direction->name} -
id }{$direction->id }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}{$direction->id }\" style=\"height: 100%; font-family: Geologica-Medium;overflow-y: auto ;\"> -
-
- -
-
-
-
{$direction->code}
+
id }{$direction->id}\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}{$direction->id}\" style=\"height: 100%; font-family: Geologica-Medium; overflow-y: auto ; background-image: url({$fon_3}); color: #004329\"> + + +
+
+ +
+ +
+ +
+ +
+
{$direction->code}
{$direction->name}
- +
+

{$direction->description}

+
-
-
-
-
-
Уровень образования: {$direction->educationLevel->name}
-
Форма обучения: {$direction->educationForm->name}
-
-
-
-
-
Бюджетные места: {$direction->budget_places}
-
Квота: {$direction->quota}
-
-
-
-
-
Места на контракт: {$direction->paid_places}
-
Стоимость платного обучения: {$direction->cost_paid_place}
-
-
-
-
-
Период обучения (в годах): {$direction->period}
+
+ +
+
Уровень образования: + {$direction->educationLevel->name} +
+

+
Форма обучения: + {$direction->educationForm->name} +
+

+
Бюджетные места: + {$direction->budget_places} +
+

+
Квота: + {$direction->quota} +
+

+
Места на контракт: + {$direction->paid_places} +
+

+
Стоимость платного обучения: + {$direction->cost_paid_place} +
+

+
Период обучения (в годах): + {$direction->period} +
- +
-

{$direction->description}

+
+
+
diff --git a/app/Services/DirectonHtmlBuilder.php b/app/Services/DirectonHtmlBuilder.php index cb25015..86fd004 100644 --- a/app/Services/DirectonHtmlBuilder.php +++ b/app/Services/DirectonHtmlBuilder.php @@ -3,6 +3,7 @@ namespace App\Services; use App\Models\Direction; +use Illuminate\Support\Facades\URL; class DirectonHtmlBuilder { @@ -16,55 +17,74 @@ class DirectonHtmlBuilder // phpcs:disable $direction = $this->direction; - return "
id }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}\" style=\"height: 100%; font-family: Geologica-Medium;overflow-y: auto ;\"> -
-
- -
-
-
-
{$direction->code}
+ $fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png'); + return "
id }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}\" style=\"height: 100%; font-family: Geologica-Medium; overflow-y: auto ; background-image: url({$fon_3}); color: #004329\"> + + +
+
+ +
+ +
+ +
+ +
+
{$direction->code}
{$direction->name}
- +
+

{$direction->description}

+
-
-
-
-
-
Уровень образования: {$direction->educationLevel->name}
-
Форма обучения: {$direction->educationForm->name}
-
-
-
-
-
Бюджетные места: {$direction->budget_places}
-
Квота: {$direction->quota}
-
-
-
-
-
Места на контракт: {$direction->paid_places}
-
Стоимость платного обучения: {$direction->cost_paid_place}
-
-
-
-
-
Период обучения (в годах): {$direction->period}
+
+ +
+
Уровень образования: + {$direction->educationLevel->name} +
+

+
Форма обучения: + {$direction->educationForm->name} +
+

+
Бюджетные места: + {$direction->budget_places} +
+

+
Квота: + {$direction->quota} +
+

+
Места на контракт: + {$direction->paid_places} +
+

+
Стоимость платного обучения: + {$direction->cost_paid_place} +
+

+
Период обучения (в годах): + {$direction->period} +
- +
-

{$direction->description}

+
+
+
"; } // phpcs:enable diff --git a/resources/views/test.blade.php b/resources/views/test.blade.php new file mode 100644 index 0000000..e69de29