From d62e4b4e7567127337ad48f289f26a208b82176d Mon Sep 17 00:00:00 2001 From: Sergey Panarin Date: Sat, 24 Aug 2024 11:20:55 +0200 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/CompanyController.php | 9 ++++--- app/Http/Controllers/EmployerController.php | 12 ++++------ public/css/style_may2024.css | 34 +++++++++++++++++++-------- public/js/func.js | 17 ++++++++++++++ resources/views/admin/users/form.blade.php | 2 +- resources/views/employers/menu.blade.php | 26 ++++++++------------ resources/views/index.blade.php | 2 +- resources/views/workers/menu.blade.php | 18 +++++++------- 8 files changed, 73 insertions(+), 47 deletions(-) diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index 1df1d58..c4c8ce5 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -54,9 +54,12 @@ class CompanyController extends Controller $title = $company[0]->name_company; - $ads = Ad_employer::query()->with('jobs')->with('jobs_code')-> - OrderByDesc('id')-> - where('employer_id', '=', $company[0]->id)->paginate(50); + $ads = Ad_employer::query()->with('jobs')->with('jobs_code') + ->where('employer_id', '=', $company[0]->id) + ->where('is_remove', '=', '0') + ->OrderByDesc('id') + ->paginate(50) + ; return view('info_company_new', compact('company', 'user_id', 'title', 'ads')); } diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index be96eb7..c645ade 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -213,6 +213,7 @@ class EmployerController extends Controller ->with('jobs_code') ->where('employer_id', $Employer->id) ->where('is_remove', 0) + ->orderbyDesc('updated_at') ; if (($request->has('search')) && (!empty($request->get('search')))) { @@ -223,14 +224,9 @@ class EmployerController extends Controller if ($request->get('sort')) { $sort = $request->get('sort'); switch ($sort) { - case 'name_up': $vacancy_list = $vacancy_list->orderBy('name')->orderBy('id'); break; - case 'name_down': $vacancy_list = $vacancy_list->orderByDesc('name')->orderby('id'); break; - case 'nopublic': $vacancy_list->where('active_is', '=', 0)->orderBy('id');break; - case 'public':$vacancy_list->where('active_is', '=', 1)->orderBy('id');break; - case 'created_at_up': $vacancy_list = $vacancy_list->OrderBy('created_at')->orderBy('id'); break; - case 'created_at_down': $vacancy_list = $vacancy_list->orderByDesc('created_at')->orderBy('id'); break; - case 'default': $vacancy_list = $vacancy_list->orderbyDesc('updated_at')->orderBy('name'); break; - default: $vacancy_list = $vacancy_list->orderByDesc('id')->orderbyDesc('updated_at'); break; + case 'nopublic': $vacancy_list->where('active_is', '=', 0);break; + case 'public':$vacancy_list->where('active_is', '=', 1);break; + default: $vacancy_list = $vacancy_list->orderByDesc('id'); break; } } else { $vacancy_list = $vacancy_list->orderByDesc('updated_at')->orderBy('id'); diff --git a/public/css/style_may2024.css b/public/css/style_may2024.css index 8746134..19cb011 100644 --- a/public/css/style_may2024.css +++ b/public/css/style_may2024.css @@ -2345,10 +2345,22 @@ h1 { } .header__menu { display: none; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - gap: 20px; +} +.header.active-menu{ + position: unset; +} +.header.active-menu .header__menu{ + position: absolute; + display: flex; + flex-direction: column; + z-index: 999; + top: 48px; + background: #fff; + -webkit-box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2); + box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2); + left: 0; + border: 1px solid #e9e9e9; + width: 100%; } @media (min-width: 768px) { .header__menu { @@ -2357,6 +2369,12 @@ h1 { display: flex; } } +.header__menu-item{ + padding: 5px 10px; +} +.header__menu-item:hover, .header__menu-item:active{ + border: 1px solid #cfcfcf; +} .header__menu-item:hover { color: #377d87; } @@ -7260,7 +7278,7 @@ main + .news { text-align: right; } .chatbox__bottom { - background: #4d88d9; + background: #377d87; padding: 10px; border-radius: 8px; display: -webkit-box; @@ -7308,11 +7326,7 @@ main + .news { .chatbox__bottom-file svg { width: 50%; aspect-ratio: 1/1; -} -@media (min-width: 768px) { - .chatbox__bottom-file svg { - width: 40%; - } + stroke-width: 1.5px; } .chatbox__bottom-text { width: calc(100% - 60px); diff --git a/public/js/func.js b/public/js/func.js index 93ad13b..37b82bb 100644 --- a/public/js/func.js +++ b/public/js/func.js @@ -8,6 +8,21 @@ $(function(){ "close" ] }); + + $('.header .header__burger').click(function(){ + var this_btn = $(this); + var wrap = this_btn.closest('.header'); + + wrap.toggleClass('active-menu'); + }); + + $('body').click(function(e){ + var target = $(e.target); + + if (!target.hasClass('.header__burger') && target.closest('.header__burger').length === 0){ + $('header.header').removeClass('active-menu'); + } + }); }); @@ -28,3 +43,5 @@ var cl = function(obj){ } + + diff --git a/resources/views/admin/users/form.blade.php b/resources/views/admin/users/form.blade.php index 7955aa9..d1ebe1f 100644 --- a/resources/views/admin/users/form.blade.php +++ b/resources/views/admin/users/form.blade.php @@ -14,7 +14,7 @@ @isset($list_job_titles) @foreach($list_job_titles as $job_title)