git commit "style: improve tour flight details and auth pages"
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/show.css') }}">
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<section class="container mt-5">
|
||||
|
||||
<div class="card border-0 shadow rounded-4 overflow-hidden">
|
||||
|
||||
|
||||
<div class="position-relative">
|
||||
|
||||
<img src="{{ asset($tour->image) }}"
|
||||
alt="{{ $tour->title }}">
|
||||
<div class="card border-0 shadow rounded-4 overflow-hidden mb-5">
|
||||
|
||||
<div class="tour-detail-image">
|
||||
|
||||
<img src="{{ $tour->image ? asset('storage/'.$tour->image) : asset('assets/img/placeholder.jpg') }}"
|
||||
class="w-100 h-100 object-fit-cover"
|
||||
alt="{{ $tour->airline }}">
|
||||
<span class="badge bg-primary position-absolute top-0 end-0 m-4">
|
||||
تور
|
||||
</span>
|
||||
@@ -20,206 +18,220 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-body p-4">
|
||||
|
||||
|
||||
<h1 class="fw-bold mb-4">
|
||||
<h1 class="fw-bold mb-3">
|
||||
{{ $tour->title }}
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
<p class="text-muted">
|
||||
{{ $tour->summary }}
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
<div class="row g-4">
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<span class="text-secondary">
|
||||
نوع سفر
|
||||
</span>
|
||||
|
||||
<h5>
|
||||
{{ $tour->travelType?->name ?? '-' }}
|
||||
</h5>
|
||||
|
||||
<div class="tour-info-box">
|
||||
<span>نوع سفر</span>
|
||||
<h5>
|
||||
{{ $tour->travelType?->name ?? '-' }}
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<span class="text-secondary">
|
||||
تاریخ حرکت
|
||||
</span>
|
||||
|
||||
<h5>
|
||||
{{ \Carbon\Carbon::parse($tour->departure_date)->format('Y/m/d') }}
|
||||
</h5>
|
||||
|
||||
<div class="tour-info-box">
|
||||
<span>تاریخ حرکت</span>
|
||||
<h5>
|
||||
{{ \Carbon\Carbon::parse($tour->departure_date)->format('Y/m/d') }}
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<span class="text-secondary">
|
||||
قیمت
|
||||
</span>
|
||||
|
||||
<h5>
|
||||
{{ number_format($tour->price) }}
|
||||
تومان
|
||||
</h5>
|
||||
|
||||
<div class="tour-info-box">
|
||||
<span>قیمت</span>
|
||||
<h5 class="tour-price">
|
||||
{{ number_format($tour->price) }}
|
||||
تومان
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
<h4 class="fw-bold">
|
||||
توضیحات تور
|
||||
</h4>
|
||||
|
||||
|
||||
<p class="mt-3">
|
||||
<p>
|
||||
{{ $tour->description }}
|
||||
</p>
|
||||
<div class="mt-4">
|
||||
|
||||
|
||||
<div class="reserve-area mt-5">
|
||||
|
||||
@auth
|
||||
<form action="{{ route('users.reservations.store') }}" method="POST">
|
||||
|
||||
<form action="{{ route('users.reservations.store') }}"
|
||||
method="POST"
|
||||
class="reservation-form">
|
||||
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="reservable_id" value="{{ $tour->id }}">
|
||||
<input type="hidden"
|
||||
name="reservable_id"
|
||||
value="{{ $tour->id }}">
|
||||
|
||||
<input type="hidden" name="reservable_type" value="App\Models\Tour">
|
||||
<input type="hidden"
|
||||
name="reservable_type"
|
||||
value="App\Models\Tour">
|
||||
|
||||
<input type="hidden" name="price" value="{{ $tour->price }}">
|
||||
<input type="hidden"
|
||||
name="price"
|
||||
value="{{ $tour->price }}">
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-success">
|
||||
رزرو تور
|
||||
<button type="submit"
|
||||
class="btn btn-success rounded-pill px-5 py-3">
|
||||
رزرو تور
|
||||
|
||||
</button>
|
||||
|
||||
</form> @else
|
||||
</form>
|
||||
|
||||
@else
|
||||
|
||||
<a href="{{ route('auth.login.index') }}"
|
||||
class="btn btn-warning rounded-pill px-5 py-3">
|
||||
|
||||
<a href="{{ route('auth.login.index') }}" class="btn btn-warning btn-lg px-5">
|
||||
برای رزرو وارد شوید
|
||||
|
||||
</a>
|
||||
|
||||
@endauth
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<span>تعداد مشاهده</span>
|
||||
|
||||
<strong>
|
||||
{{ $tour->views ?? 0 }}
|
||||
بازدید
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<form action="{{ route('comments.store') }}" method="POST">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-box mb-5">
|
||||
|
||||
<h3 class="fw-bold mb-4">
|
||||
ثبت نظر درباره تور
|
||||
</h3>
|
||||
|
||||
|
||||
<form action="{{ route('comments.store') }}"
|
||||
method="POST">
|
||||
|
||||
@csrf
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="tour_id"
|
||||
value="{{ $tour->id }}"
|
||||
>
|
||||
<input type="hidden"
|
||||
name="tour_id"
|
||||
value="{{ $tour->id }}">
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
|
||||
<label>
|
||||
امتیاز
|
||||
</label>
|
||||
|
||||
<select name="rating" class="form-control">
|
||||
<select name="rating"
|
||||
class="form-select">
|
||||
|
||||
<option value="5">★★★★★</option>
|
||||
<option value="4">★★★★</option>
|
||||
<option value="3">★★★</option>
|
||||
<option value="2">★★</option>
|
||||
<option value="1">★</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<label>
|
||||
نظر شما
|
||||
</label>
|
||||
|
||||
<textarea
|
||||
name="comment"
|
||||
rows="5"
|
||||
class="form-control"
|
||||
></textarea>
|
||||
<textarea name="comment"
|
||||
rows="5"
|
||||
class="form-control rounded-4"
|
||||
placeholder="نظر خود را بنویسید..."></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary">
|
||||
|
||||
<button class="btn btn-primary rounded-pill px-5">
|
||||
ثبت نظر
|
||||
</button>
|
||||
|
||||
|
||||
</form>
|
||||
<div class="comments-list mt-5">
|
||||
|
||||
<h3 class="mb-4">
|
||||
نظرات کاربران
|
||||
</h3>
|
||||
|
||||
@forelse($comments as $comment)
|
||||
|
||||
<div class="card p-4 mb-3 shadow-sm">
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<strong>
|
||||
{{ $comment->user?->name ?? 'کاربر مهمان' }}
|
||||
</strong>
|
||||
|
||||
<small>
|
||||
{{ $comment->created_at->diffForHumans() }}
|
||||
</small>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="mt-3 mb-0">
|
||||
{{ $comment->comment }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
@empty
|
||||
|
||||
<div class="alert alert-secondary">
|
||||
هنوز نظری ثبت نشده است.
|
||||
</div>
|
||||
|
||||
@endforelse
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-box">
|
||||
|
||||
|
||||
<h3 class="fw-bold mb-4">
|
||||
نظرات کاربران
|
||||
</h3>
|
||||
|
||||
|
||||
@forelse($comments as $comment)
|
||||
|
||||
<div class="comment-item">
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<strong>
|
||||
{{ $comment->user?->name ?? 'کاربر مهمان' }}
|
||||
</strong>
|
||||
|
||||
|
||||
<small>
|
||||
{{ $comment->created_at->diffForHumans() }}
|
||||
</small>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p class="mt-3 mb-0">
|
||||
{{ $comment->comment }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@empty
|
||||
|
||||
<div class="alert alert-secondary rounded-4">
|
||||
هنوز نظری ثبت نشده است.
|
||||
</div>
|
||||
|
||||
@endforelse
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user