prodV1 #2

Open
RomanGolienko wants to merge 309 commits from prodV1 into main
6 changed files with 186 additions and 59 deletions
Showing only changes of commit 2f7474d311 - Show all commits

View File

@ -146,8 +146,14 @@ class PageController extends Controller
$carry[$facultyName]['directions'][$directionName]['budget_places'] $carry[$facultyName]['directions'][$directionName]['budget_places']
[$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionBudgetPlaces; [$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionBudgetPlaces;
$carry[$facultyName]['directions'][$directionName]
['paid_places'][$educationFormName] = $directionPaidPlaces; $carry[$facultyName]['directions'][$directionName]['paid_places']
[$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionPaidPlaces;
/*$carry[$facultyName]['directions'][$directionName]
['paid_places'][$educationFormName] = $directionPaidPlaces;*/
$carry[$facultyName]['directions'][$directionName] $carry[$facultyName]['directions'][$directionName]
['cost_paid_place'][$educationFormName] = $directionCostPaidPlace; ['cost_paid_place'][$educationFormName] = $directionCostPaidPlace;
$carry[$facultyName]['directions'][$directionName]['period'][$educationFormName] = $directionPeriod; $carry[$facultyName]['directions'][$directionName]['period'][$educationFormName] = $directionPeriod;

View File

@ -19,6 +19,8 @@ class DirectonHtmlBuilder
$direction = $this->direction; $direction = $this->direction;
$fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png'); $fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png');
$green_circle = URL::to('img/front-page/green-circle.png');
$education_form = ''; $education_form = '';
foreach ($direction['education_form'] as $el) { foreach ($direction['education_form'] as $el) {
$education_form .= $el . ', '; $education_form .= $el . ', ';
@ -31,41 +33,82 @@ class DirectonHtmlBuilder
$period .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ; $period .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ;
} }
$EGE = '<br>';
//dd($direction);
$paid_cost = '<div class="col-auto ">
<strong class="fs-3"> Стоимость обучения </strong>
<br>
<br>
<div class="fs-4 text-start">';
foreach ($direction['cost_paid_place'] as $key => $el) {
$paid_cost .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ;
}
$paid_cost .= '</div></div>';
$EGE = '<div class="col-auto ">
<strong> ЕГЭ </strong>
<br>
<br>
<div class=" d-inline-block p-2 text-start">';
foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) { foreach ($direction['entrance_examinations']['ЕГЭ']['Обязательные'] as $key => $el) {
$EGE .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ; $EGE .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ;
} }
//dd($direction); $EGE .= '</div></div>';
$po_viboru = '<br>';
$po_viboru = '<div class="col-auto ">
<strong> Предметы по выбору </strong>
<br>
<br>
<div class=" d-inline-block p-2 text-start">';
if(array_key_exists('Предметы по выбору', $direction['entrance_examinations']['ЕГЭ'])){ if(array_key_exists('Предметы по выбору', $direction['entrance_examinations']['ЕГЭ'])){
foreach ($direction['entrance_examinations']['ЕГЭ']['Предметы по выбору'] as $key => $el) { foreach ($direction['entrance_examinations']['ЕГЭ']['Предметы по выбору'] as $key => $el) {
$po_viboru .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ; $po_viboru .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ;
} }
$po_viboru .= '</div></div>';
}else {
$po_viboru = '';
} }
$SPO = '<br>';
$SPO = '<div class="col-auto ">
<strong> СПО </strong>
<br>
<br>
<div class=" d-inline-block p-2 text-start">';
if(array_key_exists('СПО', $direction['entrance_examinations'])){ if(array_key_exists('СПО', $direction['entrance_examinations'])){
foreach ($direction['entrance_examinations']['СПО']['Обязательные'] as $key => $el) { foreach ($direction['entrance_examinations']['СПО']['Обязательные'] as $key => $el) {
$SPO .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ; $SPO .= '<span style="font-family: Geologica-ExtraLight">' . $key . '</span> - ' . '<strong>' . $el . '</strong><br>' ;
} }
$SPO .= '</div></div>';
}else {
$SPO = '';
} }
$mgtu = ''; $mgtu = '';
if(array_key_exists('МГТУ', $direction['budget_places'])){ if(array_key_exists('МГТУ', $direction['budget_places'])){
foreach ($direction['budget_places']['МГТУ'] as $profile_name => $profile) { foreach ($direction['budget_places']['МГТУ'] as $profile_name => $profile) {
$profile_content =''; $profile_content ='';
foreach($profile as $forms => $budget_places){ foreach($profile as $forms => $budget_places){
$profile_content .= "<strong> {$forms} </strong> - " . "<span style='font-family: Geologica-ExtraLight'> {$budget_places} </span><br>"; $profile_content .= "<strong> {$forms} </strong> - " . "<span style=\'font-family: Geologica-ExtraLight\'> {$budget_places} </span><br>";
} }
$tmp = str_replace(' ', '', $profile_name);
$tmp = str_replace(',', '', $tmp);
$mgtu .= "<div class=\"accordion\" id=\"accordionExample\"> $mgtu .= "<div class=\"accordion\" id=\"accordionExample\">
<div class=\"accordion-item\"> <div class=\"accordion-item\">
<h2 class=\"accordion-header\"> <h2 class=\"accordion-header\">
<button class=\"accordion-button\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapseOne\" aria-expanded=\"true\" aria-controls=\"collapseOne\"> <button class=\"accordion-button\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-{$tmp}\" aria-expanded=\"true\" aria-controls=\"collapse-{$tmp}\">
$profile_name $profile_name
</button> </button>
</h2> </h2>
<div id=\"collapseOne\" class=\"accordion-collapse collapse show\" data-bs-parent=\"#accordionExample\"> <div id=\"collapse-{$tmp}\" class=\"accordion-collapse collapse show\" data-bs-parent=\"#accordionExample\">
<div class=\"accordion-body\"> <div class=\"accordion-body\">
$profile_content $profile_content
</div> </div>
@ -74,49 +117,109 @@ class DirectonHtmlBuilder
</div>" ; </div>" ;
} }
} }
// if($direction['name'] == 'Нефтегазовое дело') {
// dd($direction);
// };
// dd($direction);
$filial = '';
if(array_key_exists('Филиал МГТУ (пос. Яблоновский)', $direction['budget_places'])){
$filial = '222'; foreach ($direction['budget_places']['Филиал МГТУ (пос. Яблоновский)'] as $profile_name => $profile) {
$profile_content ='';
foreach($profile as $forms => $budget_places){
$profile_content .= "<strong> {$forms} </strong> - " . "<span style=\'font-family: Geologica-ExtraLight\'> {$budget_places} </span><br>";
}
$tmp = str_replace(' ', '', $profile_name);
$tmp = str_replace(',', '', $tmp);
$filial .= "<div class=\"accordion \" id=\"accordionExample\">
<div class=\"accordion-item\">
<h2 class=\"accordion-header\">
<button class=\"accordion-button\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-{$tmp}\" aria-expanded=\"true\" aria-controls=\"collapse-{$tmp}\">
$profile_name
</button>
</h2>
<div id=\"collapse-{$tmp}\" class=\"accordion-collapse collapse show\" data-bs-parent=\"#accordionExample\">
<div class=\"accordion-body\">
$profile_content
</div>
</div>
</div>
</div>" ;
}
}
else {
$filial = '<div class="w-100 h-100 d-flex justify-content-center align-items-center" >Этой специальности нет в филиалле</div>';
}
$paid_places_content = '';
foreach ($direction['paid_places'] as $institution) {
foreach ($institution as $profile_name => $profile) {
$profile_content = '';
foreach ($profile as $forms => $paid_places) {
$profile_content .= "<strong> {$forms} </strong> - " . "<span style=\'font-family: Geologica-ExtraLight\'> {$paid_places} </span><br>";
}
$tmp = str_replace(' ', '', $profile_name);
$tmp = str_replace(',', '', $tmp);
$paid_places_content .= "<div class=\"accordion \" id=\"accordionExample\">
<div class=\"accordion-item\">
<h2 class=\"accordion-header\">
<button class=\"accordion-button\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#collapse-{$tmp}{$tmp}\" aria-expanded=\"true\" aria-controls=\"collapse-{$tmp}{$tmp}\">
$profile_name
</button>
</h2>
<div id=\"collapse-{$tmp}{$tmp}\" class=\"accordion-collapse collapse show\" data-bs-parent=\"#accordionExample\">
<div class=\"accordion-body\">
$profile_content
</div>
</div>
</div>
</div>" ;
}
}
return "<div class=\"offcanvas offcanvas-bottom\" data-bs-scroll=\"true\" data-bs-backdrop=\"false\" tabindex=\"-1\" id=\"offcanvasScrolling-{$direction['id'] }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction['id']}\" style=\"height: 100%; font-family: Geologica-Medium; overflow-y: auto ; background-image: url({$fon_3}); color: #004329\"> return "<div class=\"offcanvas offcanvas-bottom\" data-bs-scroll=\"true\" data-bs-backdrop=\"false\" tabindex=\"-1\" id=\"offcanvasScrolling-{$direction['id'] }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction['id']}\" style=\"height: 100%; font-family: Geologica-Medium; overflow-y: auto ; background-image: url({$fon_3}); color: #004329\">
<div class=\"mx-5 \"> <div class=\"mx-5 pb-5\">
<div class=\"col-12 d-flex justify-content-end mt-4\"> <div class=\"col-12 d-flex justify-content-end mt-4\">
<button type=\"button\" class=\"btn-close text-reset\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\"></button> <button type=\"button\" class=\"btn-close text-reset\" data-bs-dismiss=\"offcanvas\" aria-label=\"Close\"></button>
</div> </div>
<div class='row'> <div class='row'>
<div class='col-11 d-block'> <div class='col-11 d-block'>
<div class='col'> <div class='col ms-4'>
<div class=\"display-6 \" style=\"font-family: Geologica-Light\"> {$direction['code']} </div> <div class=\"display-5 \" style=\"font-family: Geologica-Light\"> {$direction['code']} </div>
<div class=\"display-6 \" > {$direction['name']}</div> <div class=\"display-5 \" > {$direction['name']}</div>
</div> </div>
<div class='col d-flex justify-content-end'> <div class='col d-flex justify-content-end'>
<div class=\"fs-5 \" style=\"font-family: Geologica-Light\"> <div class=\"fs-5 mb-3 \" style=\"font-family: Geologica-Light\">
<a href='#' role='button' class='button-mgtu'> МГТУ </a> |
<a href='#' role='button' class='button-filial' > Филиал МГТУ (пос. Яблоновский)</a> <button type='button' class='button_chng_instit hover2 btn btn-outline-success' data-institut='mgtu' data-id='{$direction['id']}'>
<img style='width: 8px; height: auto;' id = 'id_mgtu_{$direction['id']}' src='img/front-page/green-circle.png'>
МГТУ
</button> |
<button type='button' class='button_chng_instit hover2 btn btn-outline-success' data-institut='filial' data-id='{$direction['id']}'>
<img style='display: none; width: 8px; height: auto;' id = 'id_filial_{$direction['id']}' src='img/front-page/green-circle.png'> Филиал МГТУ (пос. Яблоновский)
</button>
</div> </div>
</div> </div>
</div> </div>
<hr class='col-11 '> <hr class='col-11 '>
<div class=\"mt-4\"> <div class=\"mt-4\">
<p style=\"text-align: justify;\">{$direction['description']}</p> <p style=\"text-align: justify;\">{$direction['description']}</p>
</div> </div>
</div> </div>
<div class='row'> <div class='row'>
<div class='col-11 d-flex justify-content-end'> <a href='#' role='button'> Бюджет </a> | <a href='#' role='button' > Коммерция</a> </div>
<div class=' col-4 '> <div class='col-12 col-lg-4 h-100 '>
<div class=\"p-3 px-5 border-success fs-5\" style='border-radius: 20px; border: 2px solid;'> <div class=\"p-3 px-5 border-success fs-5 h-100 \" style='border-radius: 20px; border: 2px solid;'>
<div > Уровень образования: <div > Уровень образования:
<strong>{$direction['education_level']} </strong> <strong>{$direction['education_level']} </strong>
</div> </div>
@ -128,53 +231,45 @@ class DirectonHtmlBuilder
</div> </div>
</div> </div>
</div> </div>
<div class=' col-7 '> <div class='col-12 col-lg-8 col-xl-7 '>
<div class=\"p-3 px-5 border-success fs-5 h-100\" style='border-radius: 20px; border: 2px solid;'> <div class=\"p-3 px-5 border-success fs-5 h-100\" style='border-radius: 20px; border: 2px solid;'>
<script> <strong class='d-flex justify-content-center fs-3'>Места для обучения:</strong><br>
$(\".button-mgtu\").click(function () {
$(\".content_budget\").html('{$mgtu}');
});
$(\".button-filial\").click(function () {
$(\".content_budget\").html('{$filial}');
});
</script>
<style>
</style>
<strong>Места для обучения:</strong><br>
<div class='content_budget'> <div class='content_budget'>
<br>
<div class='row'>
<div class='col'>
<p class='text-center'> Бюджет</p>
<div id='content_budget_filial_{$direction['id']}' style='display: none;' >{$filial}</div>
<div id='content_budget_mgtu_{$direction['id']}' >{$mgtu}</div>
</div>
<div class='col'>
<p class='text-center'> Коммерция</p>
<div> $paid_places_content </div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class='row mt-3'> <div class='row mt-3'>
<div class=' col-9 '> <div class='col-12 col-lg-9 '>
<div class=\"p-3 px-5 border-success fs-5 h-100\" style='border-radius: 20px; border: 2px solid;'> <div class=\"p-3 px-5 border-success fs-5 h-100\" style='border-radius: 20px; border: 2px solid;'>
<strong> Проходные баллы:</strong> <strong class='fs-3'> Проходные баллы:</strong>
<div class='row mt-3'> <div class='row mt-3'>
<div class='col '> $EGE $po_viboru $SPO
<strong> ЕГЭ </strong>
$EGE
</div>
<div class='col '>
<strong> Предметы по выбору </strong>
$po_viboru
</div>
<div class='col '>
<strong> СПО </strong>
$SPO
</div>
</div> </div>
</div> </div>
</div> </div>
<div class=' col-2 '> <div class='col-12 col-lg-3 col-xl-2 '>
<div class=\"p-3 px-5 border-success fs-5 h-100\" style='border-radius: 20px; border: 2px solid;'> <div class=\"p-3 border-success fs-5 h-100 col\" style='border-radius: 20px; border: 2px solid;'>
$paid_cost
</div> </div>
</div> </div>
</div> </div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico in the root directory --> <!-- Place favicon.ico in the root directory -->
<link rel="shortcut icon" type="image/x-icon" href="{{ URL::to('img/logo/logo_1-2.png') }}"> <link rel="shortcut icon" type="image/x-icon" href="{{ URL::to('img/front-page/logo.png') }}">
<!-- CSS here --> <!-- CSS here -->

View File

@ -56,8 +56,14 @@
color: unset; color: unset;
} }
.default-focus{
border-color: #198754;
box-shadow: 0 0 0 0.25rem rgba(25,135,84,.5);
}
.gradient-text { .gradient-text {
background-image: url({{ URL::to('img/front-page/bakalavr-special/fon1_blok.png') }}); background-image: url({{ URL::to('img/front-page/bakalavr-special/fon1_blok.png') }});
-webkit-background-clip: text; -webkit-background-clip: text;
@ -71,6 +77,7 @@
} }
.hover1:hover { .hover1:hover {
transform: scale(1.1); transform: scale(1.1);
transition: all .3s ease-in-out; transition: all .3s ease-in-out;
@ -452,7 +459,26 @@
</div> </div>
@endforeach @endforeach
<!--Здесь пишем ЯВА СКРИПТ-->
<script>
$(".button_chng_instit").click(function () {
let id=$(this).data('id');
let institut=$(this).data('institut');
if(institut=='mgtu') {
$("#content_budget_filial_" + id).hide();
$("#content_budget_mgtu_" + id).show();
$("#id_mgtu_" + id).show();
$("#id_filial_" + id).hide();
}else{
$("#content_budget_filial_"+id).show();
$("#content_budget_mgtu_"+id).hide();
$("#id_mgtu_"+id).hide();
$("#id_filial_"+id).show();
}
});
</script>
</div> </div>
</div> </div>
</div> </div>