From c04879b0d6d6c1db8070739f62b5f040de91b2a6 Mon Sep 17 00:00:00 2001 From: hatame Date: Thu, 20 Aug 2026 12:08:53 +0330 Subject: [PATCH] git commit "style: improve tour flight details and auth pages" --- .../Admin/reservationController.php | 11 - .../Requests/Admin/FlightStoreRequest.php | 5 +- app/Models/Flight.php | 16 +- public/assets/css/flight_tour.css | 233 ++++++ public/assets/css/header.css | 225 ++++++ public/assets/css/show.css | 698 ++++++++++++++++++ resources/views/account/views - Shortcut.lnk | Bin 1101 -> 0 bytes resources/views/admin/flights/edit.blade.php | 175 +++-- .../views/admin/reservations/index.blade.php | 3 - resources/views/auth/register.blade.php | 2 +- resources/views/components/flight.blade.php | 239 +++++- resources/views/components/tour.blade.php | 5 +- resources/views/flights/show.blade.php | 439 +---------- resources/views/layouts/app.blade.php | 2 + resources/views/layouts/header.blade.php | 227 ------ resources/views/layouts/hero.blade.php | 2 +- resources/views/tours/show.blade.php | 252 ++++--- 17 files changed, 1667 insertions(+), 867 deletions(-) delete mode 100644 app/Http/Controllers/Admin/reservationController.php create mode 100644 public/assets/css/flight_tour.css create mode 100644 public/assets/css/header.css create mode 100644 public/assets/css/show.css delete mode 100644 resources/views/account/views - Shortcut.lnk delete mode 100644 resources/views/admin/reservations/index.blade.php diff --git a/app/Http/Controllers/Admin/reservationController.php b/app/Http/Controllers/Admin/reservationController.php deleted file mode 100644 index ef1df7b..0000000 --- a/app/Http/Controllers/Admin/reservationController.php +++ /dev/null @@ -1,11 +0,0 @@ - [ 'required', - 'integer', - 'min:1' - ], + 'integer' + ], 'price' => [ 'required', 'numeric', diff --git a/app/Models/Flight.php b/app/Models/Flight.php index 6475380..636b0ef 100644 --- a/app/Models/Flight.php +++ b/app/Models/Flight.php @@ -108,9 +108,21 @@ class Flight extends Model }); }); + + + $query->when($filters['origin'] ?? null, function ($query, $origin) { + + $query->where('origin', $origin); + + }); + + + $query->when($filters['destination'] ?? null, function ($query, $destination) { + + $query->where('destination', $destination); + + }); } - - #[Scope] public function filterType(Builder $query, $type = null): void { diff --git a/public/assets/css/flight_tour.css b/public/assets/css/flight_tour.css new file mode 100644 index 0000000..5d372bd --- /dev/null +++ b/public/assets/css/flight_tour.css @@ -0,0 +1,233 @@ + .flight-image { + height: 260px; + position: relative; + overflow: hidden; +} + + +.flight-image img { + transition: .6s ease; +} + + +.card:hover .flight-image img { + transform: scale(1.08); +} + + +.card.border-0.shadow-sm.rounded-4.overflow-hidden { + + border-radius: 24px !important; + overflow: hidden; + position: relative; + background: #fff; + transition: .4s ease; + border: 1px solid #f1f1f1 !important; + +} + + +.card.border-0.shadow-sm.rounded-4.overflow-hidden:hover { + + transform: translateY(-8px); + + box-shadow: + 0 20px 45px rgba(0,0,0,.12)!important; + +} + +.card form { + + position:absolute; + top:18px; + left:18px; + z-index:5; + +} + + +.card form button { + + border-radius:50px; + + background:rgba(255,255,255,.9); + + backdrop-filter:blur(8px); + + border:none; + + padding:10px 18px; + + color:#e63946; + + font-weight:600; + + box-shadow: + 0 8px 20px rgba(0,0,0,.15); + + transition:.3s; + +} + + +.card form button:hover { + + background:#e63946; + + color:white; + +} + + +.flight-badge { + + position:absolute; + + right:20px; + + bottom:20px; + + background:white; + + color:#0d6efd; + + padding:8px 20px; + + border-radius:50px; + + font-size:14px; + + font-weight:700; + + box-shadow: + 0 8px 20px rgba(0,0,0,.15); + +} + +.flight-image:after { + + content:""; + + position:absolute; + + inset:0; + + background: + linear-gradient( + transparent, + rgba(0,0,0,.45) + ); + +} + +.card-body { + + padding:28px !important; + +} + + +.card-body h5 { + + font-size:22px; + + font-weight:800 !important; + + color:#222; + +} + +.route { + + display:flex; + + justify-content:center; + + align-items:center; + + gap:15px; + + margin:25px 0; + + font-weight:700; + + font-size:16px; + +} + + +.route .line { + + width:55px; + + height:2px; + + background:#dbe7ff; + + position:relative; + +} + + +.route .line:after { + + content:"✈"; + + position:absolute; + + top:50%; + left:50%; + + transform:translate(-50%,-50%); + + background:white; + + padding:5px; + + color:#0d6efd; + +} + + +.card-body strong { + + font-size:20px; + + color:#0d6efd; + +} + +.card-body .btn-primary { + + background:linear-gradient( + 135deg, + #0062ff, + #00b7ff + ); + + border:none; + + padding:11px 30px; + + font-weight:700; + + box-shadow: + 0 10px 25px rgba(0,98,255,.3); + + transition:.3s; + +} + + +.card-body .btn-primary:hover { + + transform:translateY(-3px); + + box-shadow: + 0 15px 30px rgba(0,98,255,.4); + +} + + + + diff --git a/public/assets/css/header.css b/public/assets/css/header.css new file mode 100644 index 0000000..e54300a --- /dev/null +++ b/public/assets/css/header.css @@ -0,0 +1,225 @@ + +.main-header { + + background: #09203f; + + box-shadow: 0 8px 30px rgba(0,0,0,.2); + + padding: 15px 0; + +} + + +.header-inner { + + display:flex; + + align-items:center; + + justify-content:space-between; + +} + + +.logo { + + color:white; + + font-size:28px; + + font-weight:800; + + text-decoration:none; + +} + + + +.menu { + + display:flex; + + gap:30px; + + list-style:none; + + margin:0; + + padding:0; + +} + + +.menu li a { + + color:white; + + text-decoration:none; + + font-weight:600; + + transition:.3s; + +} + + +.menu li a:hover { + + color:#ffc107; + +} + + + +.header-actions { + + display:flex; + + gap:10px; + +} + + + +.login-btn { + + color:white; + + border:1px solid white; + + padding:10px 20px; + + border-radius:30px; + + text-decoration:none; + +} + + + +.register-btn { + + background:#ffc107; + + color:#09203f; + + padding:10px 20px; + + border-radius:30px; + + text-decoration:none; + + font-weight:700; + +} + + + +.user-btn { + + color:white; + + text-decoration:none; + +} +.user-dropdown { + position: relative; +} + + +.user-btn { + + background: transparent; + + border: none; + + color: white; + + font-size: 15px; + + cursor: pointer; + + padding: 10px 15px; + +} + + + +.user-menu { + + position: absolute; + + top: 45px; + + right: 0; + + width: 200px; + + background: white; + + border-radius: 15px; + + padding: 10px 0; + + box-shadow: 0 15px 40px rgba(0,0,0,.15); + + opacity: 0; + + visibility: hidden; + + transform: translateY(10px); + + transition: .3s; + +} + + +.user-dropdown:hover .user-menu { + + opacity: 1; + + visibility: visible; + + transform: translateY(0); + +} + + + +.user-menu a, +.user-menu button { + + display: flex; + + align-items: center; + + gap: 10px; + + width: 100%; + + padding: 12px 20px; + + color: #263238; + + background: none; + + border: none; + + text-decoration: none; + + font-size: 14px; + + cursor: pointer; + +} + + + +.user-menu a:hover, +.user-menu button:hover { + + background: #f1f5f9; + + color: #1976d2; + +} diff --git a/public/assets/css/show.css b/public/assets/css/show.css new file mode 100644 index 0000000..d29e9b1 --- /dev/null +++ b/public/assets/css/show.css @@ -0,0 +1,698 @@ +.flight-detail-page { + padding: 70px 0; + background: #f6f8fc; +} + +.flight-detail-card { + + background:white; + + border-radius:30px; + + overflow:hidden; + + box-shadow: + 0 25px 70px rgba(15,23,42,.12); + +} + +.flight-detail-image { + + height:200px; + width: 500px; + overflow:hidden; + + position:relative; + +} + + +.flight-detail-image:after { + + content:""; + + position:absolute; + + inset:0; + + background: + linear-gradient( + to top, + rgba(0,0,0,.45), + transparent + ); + +} + + +.flight-detail-image img { + + width:100%; + + height:100%; + + object-fit:cover; + + transition:.6s; + +} + + +.flight-detail-card:hover +.flight-detail-image img { + + transform:scale(1.04); + +} + + +.flight-detail-content { + + padding:45px; + +} + + + +.flight-detail-content h1 { + + font-size:34px; + + font-weight:900; + + color:#172554; + +} + + +.flight-badge-show { + + background: + linear-gradient( + 135deg, + #2563eb, + #06b6d4 + ); + + color:white; + + padding:10px 25px; + + border-radius:50px; + + font-weight:700; + + box-shadow: + 0 10px 25px rgba(37,99,235,.3); + +} + + +.route-box { + + background:#f8fafc; + + border-radius:25px; + + padding:30px; + + display:flex; + + justify-content:space-between; + + align-items:center; + + margin:35px 0; + + +} + +.route-box small { + + color:#64748b; + + font-size:14px; + +} + + + +.route-box strong { + + display:block; + + font-size:30px; + + margin-top:10px; + + color:#0f172a; + +} + + + +.route-line { + + width:70px; + + height:70px; + + border-radius:50%; + + display:flex; + + align-items:center; + + justify-content:center; + + + background:#e0f2fe; + + color:#0284c7; + + font-size:28px; + +} + + +.flight-info-grid { + + display:grid; + + grid-template-columns:repeat(4,1fr); + + gap:20px; + +} + + +.flight-info-grid > div { + + background:white; + + border:1px solid #e5e7eb; + + padding:22px; + + border-radius:22px; + + transition:.3s; + +} + + + +.flight-info-grid > div:hover { + + transform:translateY(-5px); + + box-shadow: + 0 15px 30px rgba(0,0,0,.08); + +} + + + +.flight-info-grid span { + + display:block; + + color:#64748b; + + margin-bottom:12px; + +} + + + +.flight-info-grid b { + + font-size:18px; + + color:#0f172a; + +} + + + +.flight-detail-content .btn-success { + + border:0; + + padding:14px 45px; + + border-radius:50px; + + font-weight:800; + + background: + linear-gradient( + 135deg, + #16a34a, + #22c55e + ); + + box-shadow: + 0 12px 30px rgba(34,197,94,.3); + +} + + +.flight-comments { + + margin-top:60px; + + padding-top:40px; + + border-top:1px solid #eee; + +} + + + +.flight-comments h3 { + + font-weight:900; + + color:#172554; + + margin-bottom:30px; + +} + + +.flight-comments form { + + background:#f8fafc; + padding:30px; + border-radius:25px; + +} + + + +.flight-comments label { + + font-weight:700; + + margin-bottom:8px; + +} + + + +.flight-comments .form-control { + + border-radius:15px; + + padding:14px; + + border:1px solid #e2e8f0; + +} + + + +.flight-comments .btn-primary { + + border-radius:50px; + + padding:12px 35px; + + font-weight:700; + +} + +.comments-list .card { + + border:0!important; + + border-radius:22px!important; + + padding:25px!important; + + box-shadow: + 0 10px 30px rgba(0,0,0,.06)!important; + +} + + + +.comments-list strong { + + color:#1e3a8a; + +} + + + +.comments-list p { + + color:#475569; + + line-height:2; + +} + + + +@media(max-width:768px){ + + .flight-detail-content{ + padding:25px; + } + + + .flight-info-grid{ + + grid-template-columns:1fr; + + } + + + .route-box{ + + flex-direction:column; + + gap:20px; + + } + + + .flight-detail-content h1{ + + font-size:25px; + + } + +} + +/**/ + + /* ========================= + Tour Detail Style + ========================= */ + + + .tour-detail-card { + + border-radius:30px; + + overflow:hidden; + + background:#fff; + + box-shadow: + 0 25px 60px rgba(0,0,0,.12); + + } + + + +/* Image */ + +.tour-detail-image { + + height:420px; + + position:relative; + + overflow:hidden; + +} + + +.tour-detail-image img { + + width:100%; + + height:100%; + + object-fit:cover; + + transition:.6s; + +} + + +.tour-detail-image:hover img { + + transform:scale(1.08); + +} + + +.tour-detail-image:after { + + content:""; + + position:absolute; + + inset:0; + + background: + linear-gradient( + to top, + rgba(0,0,0,.55), + transparent 60% + ); + +} + + + +/* Badge */ + +.tour-detail-image .badge { + + z-index:3; + + padding:10px 25px; + + border-radius:50px; + + font-size:14px; + + box-shadow: + 0 10px 25px rgba(0,0,0,.25); + +} + + + +/* Body */ + +.tour-detail-card .card-body { + + padding:35px!important; + +} + + + +.tour-detail-card h1 { + + font-size:34px; + + font-weight:900; + +} + + + +/* Info boxes */ + + +.tour-info-box { + + background:#f8fafc; + + border-radius:22px; + + padding:22px; + + border:1px solid #edf2f7; + + transition:.3s; + +} + + +.tour-info-box:hover { + + transform:translateY(-6px); + + box-shadow: + 0 15px 35px rgba(13,110,253,.12); + +} + + + +.tour-info-box span { + + color:#78909c; + + font-size:14px; + +} + + + +.tour-info-box h5 { + + margin-top:12px; + + font-weight:800; + +} + + + +/* Price */ + +.tour-price { + + color:#0d6efd; + +} + + + +/* Reserve */ + + +.btn-success, +.btn-warning { + + border-radius:50px!important; + + padding:12px 35px!important; + + font-weight:700; + +} + + + +/* Comments */ + + +.comment-box { + + + background:white; + + border-radius:30px; + + padding:35px; + + margin-top:35px; + + box-shadow: + + 0 20px 50px rgba(0,0,0,.08); + +} + + + +.comment-box h3 { + + font-weight:900; + +} + + + +.comment-box textarea, +.comment-box select { + + border-radius:18px; + + border:1px solid #e5e7eb; + + padding:15px; + +} + + + +.comment-box textarea:focus, +.comment-box select:focus { + + border-color:#0d6efd; + + box-shadow: + 0 0 0 .2rem rgba(13,110,253,.15); + +} + + + +/* Comment item */ + + +.comment-item { + + background:#f8fafc; + + border-radius:22px; + + padding:22px; + + margin-bottom:18px; + + border:1px solid #edf2f7; + + transition:.3s; + +} + + + +.comment-item:hover { + + transform:translateY(-5px); + + box-shadow: + 0 15px 35px rgba(0,0,0,.08); + +} + + + +.comment-item strong { + + font-size:16px; + +} + + + +.comment-item small { + + color:#94a3b8; + +} +.reservation-form { + position: relative !important; + top: auto !important; + left: auto !important; + right: auto !important; + bottom: auto !important; + transform: none !important; + margin: 30px 0 !important; +} + + +.reservation-form button { + position: relative !important; + top: auto !important; + left: auto !important; +} + + +.card form { + position: static; +} diff --git a/resources/views/account/views - Shortcut.lnk b/resources/views/account/views - Shortcut.lnk deleted file mode 100644 index 82f426b4b572c3c1d03f6656967f9e85ba7f4e9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1101 zcma)5Ur3Wt6#s2WsD#e8)c)xxETc6iLZ)Sk4jmD?5Tx?^$gw`{v;C2MPAeoRqCaR4 zJrqf~Mws@XiAD94_!I;^EU7TT=%pSCu|W?}4|UGn+{^}bK7Qxk``vSY=iGD7JqSQ& z(vt?Jg+_fp(qW)^q&@%RY0JEButVFEXPeh8NYyVgO6GN9llFBn`-HxvGojG=p($ei zT&WuF&Zc9h%{H_iCH6`wVU(P-pj0ff<<9*E*!=;Y>UN<98A!w8RJOd`VwC&NTgm1| z5gV=&)=Aa)>Lu*(BLE*%xZ$F$Tr9B~<=i#{Tx!6h`jlm?d#y&fU$EX5tgDlRV)nDH zoS0N%^^o>K5v)=o)(X1;0Y&o%18zkl|4Y#_Z{0bLc1G~VQko>6di{ww6=)Q3kY;W% z2lC;JbFY<$DB>Pf>D90=1@CN1USszI^iZS_VHMRj*DjgSG-?93J|db-%K!Ei6CZyN}G z8QV<%GueWjal0%}_c~f<6R5*T#%slcVa_yO^NBTtdMc2IN@PYmmES|LE7Sr2pUxtP z(~0Lr>mY$+8R>KvS6!dUdHfdBP4Ds}N9cb6K`?Kn@qex;rD#0qk6SP!P(fg)leu2| p_|-1QsH4U@Ty<)I6L5kJ90XJA#ZX@O$ASA355tx>gZ$_c@*B({;>!R4 diff --git a/resources/views/admin/flights/edit.blade.php b/resources/views/admin/flights/edit.blade.php index 6767cce..f024b6a 100644 --- a/resources/views/admin/flights/edit.blade.php +++ b/resources/views/admin/flights/edit.blade.php @@ -8,6 +8,7 @@ ویرایش پرواز + @if($errors->any())
    @@ -18,6 +19,7 @@
@endif +
@@ -25,98 +27,76 @@ @csrf @method('PUT') +
- + - - @error('airline') - - {{ $message }} - - @enderror + value="{{ old('airline',$flight->airline) }}">
- + - - @error('flight_number') - - {{ $message }} - - @enderror + value="{{ old('flight_number',$flight->flight_number) }}">
- + - + value="{{ old('origin',$flight->origin) }}">
- + - + value="{{ old('destination',$flight->destination) }}">
-
- + +
+ - + class="form-control" + value="{{ old('departure_time',$flight->departure_time) }}">
+
- - + - + class="form-control" + value="{{ old('arrival_time',$flight->arrival_time) }}">
+ +
+
+ - @error('departure_date') -
{{ $message }}
- @enderror -
+ +
+ + class="form-control" + value="{{ old('flight_class',$flight->flight_class) }}">
+
+ + min="1" + class="form-control" + value="{{ old('capacity',$flight->capacity) }}">
+ +
+ + class="form-control" + value="{{ old('price',$flight->price) }}">
+ +
+ + @if($flight->image) + +
+ +
+ + @endif + + @@ -211,27 +225,57 @@
+ + + +
+ +
+
+ @@ -242,12 +286,19 @@ diff --git a/resources/views/admin/reservations/index.blade.php b/resources/views/admin/reservations/index.blade.php deleted file mode 100644 index 4530ca4..0000000 --- a/resources/views/admin/reservations/index.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index fdfdad4..39b63eb 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app') + @extends('layouts.app') @section('content')
diff --git a/resources/views/components/flight.blade.php b/resources/views/components/flight.blade.php index 78b6fb9..bdf7261 100644 --- a/resources/views/components/flight.blade.php +++ b/resources/views/components/flight.blade.php @@ -1,3 +1,235 @@ + +
@@ -18,11 +250,10 @@
- - {{ $flight->airline }} - - + پرواز diff --git a/resources/views/components/tour.blade.php b/resources/views/components/tour.blade.php index 5f09c06..1fc7b66 100644 --- a/resources/views/components/tour.blade.php +++ b/resources/views/components/tour.blade.php @@ -20,8 +20,9 @@
- {{ $tour->title }} + {{ $tour->airline }} diff --git a/resources/views/flights/show.blade.php b/resources/views/flights/show.blade.php index e8691c4..3e1cad0 100644 --- a/resources/views/flights/show.blade.php +++ b/resources/views/flights/show.blade.php @@ -1,432 +1,14 @@ - - + +@extends('layouts.app') +@section('content')
+@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 0aa767f..fc68125 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -10,6 +10,8 @@ + + diff --git a/resources/views/layouts/header.blade.php b/resources/views/layouts/header.blade.php index bb928ec..ed99e20 100644 --- a/resources/views/layouts/header.blade.php +++ b/resources/views/layouts/header.blade.php @@ -1,230 +1,3 @@ -