Compare commits

...

2 Commits

Author SHA1 Message Date
nimtaurel f32b389fa3 Merge pull request 'nim_style 9' (#12) from nim_style into master
Reviewed-on: #12
2025-04-29 09:01:23 +00:00
nimtaurel a5b85e8ac0 nim_style 9 2025-04-29 14:01:05 +05:00
8 changed files with 133 additions and 101 deletions

View File

@ -17,18 +17,22 @@ $pendingApplications = UniModel::model('pipi_applications', Acl::connection())
->get();
?>
<div class="row">
<div class="col-12 col-sm-3">
<div class="row d-flex flex-md-row flex-sm-column justify-content-center align-items-md-stretch align-items-sm-center" style="height: calc(100vh - 197px)">
<div class="col-8 col-md-3 my-5 my-md-0 h-100">
@include('platform.user_profile::user',['name'=>$user->name, 'about'=>$user->about])
</div>
<div class="card col-12 col-sm-8 ms-sm-5 applications-history">
<div class="card col-12 col-md-8 ms-md-3 ms-lg-5 applications-history">
<div class="card-body">
<ul class="nav nav-tabs" id="applicationsTab" role="tablist">
<li class="nav-item me-4" role="presentation">
<a class="nav-link active" id="applications-tab" data-bs-toggle="tab" href="#applications" role="tab" aria-controls="applications" aria-selected="true">@lang('История заказов')</a>
<a class="nav-link active" id="applications-tab" data-bs-toggle="tab" href="#applications" role="tab" aria-controls="applications" aria-selected="true">
@lang('История заказов')
</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="reserves-tab" data-bs-toggle="tab" href="#reserves" role="tab" aria-controls="reserves" aria-selected="false">@lang('Бронирования')</a>
<a class="nav-link" id="reserves-tab" data-bs-toggle="tab" href="#reserves" role="tab" aria-controls="reserves" aria-selected="false">
@lang('Бронирования')
</a>
</li>
</ul>
<div class="tab-content" id="applicationsTabContent">

View File

@ -1,4 +1,4 @@
<div class="row">
<div class="row h-100">
<div class="card profile-info">
<div class="card-body">
@php($profile_image = auth()->user()->profile_image)
@ -6,15 +6,15 @@
<div class="profile-img d-flex justify-content-center align-items-center mb-3">
<img src="@if($profile_image == null) {{asset("img/avatar.png") }} @else {{ asset("storage/$profile_image") }} @endif" id="image_preview_container" alt="profile_image">
</div>
<div class="d-flex flex-column justify-content-center align-items-center">
<div class="d-flex flex-column justify-content-center align-items-center text-center">
<h5 class="mb-0">{{$name}}</h5>
<p class="text-muted mb-0" >{{$about}}</p>
<hr style="height: 1px; color:#a8a8a8; width: 100%">
<div class="form-group mb-2">
<div class="form-group mb-2 text-center">
<label>@lang("Электронная почта")</label>
<p class="text-muted m-0">{{$user->email}} @if(is_null($user->email_verified_at)) <a href="#" class="btn btn-outline-primary">@lang("Подтвердить")</a> @endif</p>
</div>
<div class="form-group mb-2">
<div class="form-group mb-2 text-center">
<label>@lang("Телефон")</label>
<p class="text-muted m-0">{{$user->phone}} @if(is_null($user->phone_verified_at)) <a href="#" class="btn btn-outline-primary">@lang("Подтвердить")</a> @endif</p>
</div>

View File

@ -1,4 +1,4 @@
<div class="container text-center my-3 main-page">
<div class="container text-center main-page">
<div class="main-page-header">
<p class="top-title">Доступные автомобили</p>
<p class="title">Выберите лучший автомобиль</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,8 +35,7 @@ body {
}
.main-container {
margin: 57px 50px 50px;
padding: 20px;
margin: 107px 50px 50px;
}
//.menu-open{
@ -264,8 +263,6 @@ body {
}
.main-page {
padding: 20px;
.main-page-header {
.top-title {
margin: 0;

View File

@ -69,7 +69,6 @@ iframe {
img {
width: 100%;
height: 240px;
object-fit: contain;
}
@ -261,9 +260,8 @@ iframe {
.card-body {
.profile-content {
.profile-img {
width: 80%;
height: 80%;
padding: 50px 50px 20px;
width: 60%;
height: 60%;
img {
border-radius: 50%;
padding: 10px;
@ -393,3 +391,20 @@ iframe {
}
}
@media (min-width: 768px) and (max-width: 1024px) {
.profile-info {
.card-body {
.profile-content {
.profile-img {
width: 80%;
height: 80%;
}
.btn {
font-size: 11px;
}
}
}
}
}

View File

@ -2,7 +2,7 @@
$nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
?>
<!doctype html>
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
@ -42,8 +42,8 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
<a class="navbar-brand" href="{{ '/' . app()->getLocale() }}">
<img src="{{asset('img/logo.png')}}" alt="logo" class="logo">
</a>
<div class="item-nav lang">
<div class="dropdown">
<div class="item-nav lang">
<div class="dropdown">
<span class="dropdown-trigger" data-bs-toggle="dropdown">
@if(app()->getLocale() == 'ru')
RU <img src="{{asset('img/ru.png')}}" alt="ru">
@ -53,29 +53,29 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
EN <img src="{{asset('img/en.png')}}" alt="en">
@endif
</span>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
@if(app()->getLocale() != \A7kz\Platform\Enums\Languages::Ru)
<li><a class="dropdown-item"
href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::Ru) }}">RU
<img src="{{asset('img/ru.png')}}" alt="ru"></a>
</li>
@endif
@if(app()->getLocale() != \A7kz\Platform\Enums\Languages::Kz)
<li><a class="dropdown-item"
href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::Kz) }}">KZ
<img src="{{asset('img/kz.png')}}" alt="kz"></a>
</li>
@endif
@if(app()->getLocale() != \A7kz\Platform\Enums\Languages::En)
<li><a class="dropdown-item"
href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::En) }}">EN
<img src="{{asset('img/en.png')}}" alt="en"></a>
</li>
@endif
</ul>
</div>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
@if(app()->getLocale() != \A7kz\Platform\Enums\Languages::Ru)
<li><a class="dropdown-item"
href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::Ru) }}">RU
<img src="{{asset('img/ru.png')}}" alt="ru"></a>
</li>
@endif
@if(app()->getLocale() != \A7kz\Platform\Enums\Languages::Kz)
<li><a class="dropdown-item"
href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::Kz) }}">KZ
<img src="{{asset('img/kz.png')}}" alt="kz"></a>
</li>
@endif
@if(app()->getLocale() != \A7kz\Platform\Enums\Languages::En)
<li><a class="dropdown-item"
href="{{ \A7kz\Platform\Modules\Platform\Translate\Helpers\TranslateHelper::changeUrlLanguage(\A7kz\Platform\Enums\Languages::En) }}">EN
<img src="{{asset('img/en.png')}}" alt="en"></a>
</li>
@endif
</ul>
</div>
<a class="header-phone" href="tel:87763504141"><i class="bi bi-telephone-fill"></i> +7 776 350 41 41</a>
</div>
<a class="header-phone" href="tel:87763504141"><i class="bi bi-telephone-fill"></i> +7 776 350 41 41</a>
</div>
<div class="center-cont">
@auth
@ -86,24 +86,24 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
$autoNav = $nav->{'pipicar-nav-auto'} ?? null;
@endphp
@if($autoNav)
@if(isset($autoNav->childs))
<li class="list-group-item dropdown">
<a class="dropdown-toggle text-decoration-none" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ $autoNav->label }}
</a>
<ul class="dropdown-menu">
@foreach(collect($autoNav->childs) as $child)
<li>
<a class="dropdown-item" href="{{ '/' . app()->getLocale() . '/' . ltrim($child->link ?? '#', '/') }}">
{{ $child->label ?? 'Без названия' }}
</a>
</li>
@if (!$loop->last)
<li><hr class="dropdown-divider"></li>
@endif
@endforeach
</ul>
</li>
@if(isset($autoNav->childs))
<li class="list-group-item dropdown">
<a class="dropdown-toggle text-decoration-none" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ $autoNav->label }}
</a>
<ul class="dropdown-menu">
@foreach(collect($autoNav->childs) as $child)
<li>
<a class="dropdown-item" href="{{ '/' . app()->getLocale() . '/' . ltrim($child->link ?? '#', '/') }}">
{{ $child->label ?? 'Без названия' }}
</a>
</li>
@if (!$loop->last)
<li><hr class="dropdown-divider"></li>
@endif
@endforeach
</ul>
</li>
@endif
@endif
</ul>
@ -111,7 +111,7 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
@endif
@endauth
</div>
@guest
@guest
<div class="right-cont d-flex justify-end align-center">
@if (Route::has('login'))
<a class="item-nav btn btn-primary waves-effect" href="{{ lurl('login') }}">
@ -128,48 +128,38 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
</div>
@else
<div class="right-cont">
<div class="dropdown">
<a class="item-nav user dropdown-toggle" href="#" role="button" id="userDropdown" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-fill"></i>
{{ Auth::user()->name }}
</a>
<div class="right-cont">
<div class="dropdown">
<a class="item-nav user dropdown-toggle" href="#" role="button" id="userDropdown" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-fill"></i>
{{ Auth::user()->name }}
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
@if(config('platform.user_profile.enabled'))
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
@if(config('platform.user_profile.enabled'))
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}#applications">
@lang('История заказов')
</a>
</li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}#reserves">
@lang('Бронирования')
</a>
</li>
@endif
<li><hr class="dropdown-divider"></li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}">
Личный кабинет
<a class="dropdown-item logout" href="{{ lurl('logout') }}"
onclick="event.preventDefault();document.getElementById('logout-form').submit();">
Выйти
</a>
<form id="logout-form" action="{{ lurl('logout') }}" method="POST" class="d-none">@csrf</form>
</li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}">
Заявки
</a>
</li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}">
Бронирования
</a>
</li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}">
История заказов
</a>
</li>
@endif
<li><hr class="dropdown-divider"></li>
<li>
<a class="dropdown-item logout" href="{{ lurl('logout') }}"
onclick="event.preventDefault();document.getElementById('logout-form').submit();">
Выйти
</a>
<form id="logout-form" action="{{ lurl('logout') }}" method="POST" class="d-none">@csrf</form>
</li>
</ul>
</ul>
</div>
</div>
</div>
@endguest
</div>
</header>
@ -192,5 +182,31 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
</body>
<script>
$.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{csrf_token()}}'}});
function activateTabFromHash() {
const hash = window.location.hash;
if (hash === "#reserves") {
const tabTrigger = document.querySelector('#reserves-tab');
if (tabTrigger) {
new bootstrap.Tab(tabTrigger).show();
document.getElementById('applicationsTab').scrollIntoView({ behavior: 'smooth' });
}
} else if (hash === "#applications") {
const tabTrigger = document.querySelector('#applications-tab');
if (tabTrigger) {
new bootstrap.Tab(tabTrigger).show();
document.getElementById('applicationsTab').scrollIntoView({ behavior: 'smooth' });
}
}
}
document.addEventListener("DOMContentLoaded", function () {
activateTabFromHash();
});
window.addEventListener("hashchange", function () {
activateTabFromHash();
});
</script>
</html>