git add .
git commit "add tours pages, components and show views"
This commit is contained in:
@@ -1,43 +1,66 @@
|
||||
<div class="swiper-slide">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="card border-0 shadow-sm rounded-4 overflow-hidden h-100">
|
||||
|
||||
<div class="position-relative" style="height: 170px;">
|
||||
@if($tour->image)
|
||||
<img src="{{ asset('storage/'.$tour->image) }}"
|
||||
class="w-100 h-100 object-fit-cover"
|
||||
alt="{{ $tour->title }}">
|
||||
@else
|
||||
<div class="w-100 h-100 bg-light"></div>
|
||||
@endif
|
||||
|
||||
<span class="position-absolute top-0 end-0 m-2 badge rounded-pill" style="background: var(--teal);">
|
||||
<div class="flight-image">
|
||||
|
||||
<img src="{{ asset($tour->image) }}"
|
||||
alt="{{ $tour->title }}">
|
||||
|
||||
|
||||
<span class="flight-badge">
|
||||
تور
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-body d-flex flex-column">
|
||||
<h5 class="card-title fw-bold fs-6 mb-2">{{ $tour->title }}</h5>
|
||||
|
||||
@if($tour->summary)
|
||||
<p class="text-secondary small mb-3">{{ \Illuminate\Support\Str::limit($tour->summary, 70) }}</p>
|
||||
@endif
|
||||
|
||||
<div class="small text-secondary mb-3">
|
||||
<i class="bi bi-calendar-event"></i>
|
||||
تاریخ حرکت: {{ optional($tour->departure_date)->format('Y/m/d') }}
|
||||
<h5 class="fw-bold">
|
||||
{{ $tour->title }}
|
||||
</h5>
|
||||
|
||||
|
||||
|
||||
<div class="route">
|
||||
|
||||
<span>
|
||||
{{ $tour->travelType?->name ?? 'تور گردشگری' }}
|
||||
</span>
|
||||
|
||||
|
||||
<span class="line"></span>
|
||||
|
||||
|
||||
<span>
|
||||
{{ \Carbon\Carbon::parse($tour->departure_date)->format('Y/m/d') }}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="mt-auto d-flex justify-content-between align-items-center">
|
||||
<span class="fw-bold" style="color: var(--blue);">
|
||||
|
||||
<strong>
|
||||
{{ number_format($tour->price) }} تومان
|
||||
</span>
|
||||
<a href="{{ route('tours.show', $tour) }}"
|
||||
class="btn btn-sm rounded-pill px-3 text-white"
|
||||
style="background: var(--blue);">
|
||||
</strong>
|
||||
|
||||
|
||||
<a href="{{ route('tours.show',$tour) }}"
|
||||
class="btn btn-primary rounded-pill">
|
||||
مشاهده
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,162 @@
|
||||
<style>
|
||||
.flight-detail-page {
|
||||
padding: 70px 0;
|
||||
background: #f5f7fb;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.flight-detail-card {
|
||||
background: #fff;
|
||||
border-radius: 25px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
gap: 0;
|
||||
box-shadow: 0 15px 50px rgba(0,0,0,.12);
|
||||
}
|
||||
|
||||
|
||||
.flight-detail-image {
|
||||
width: 40%;
|
||||
min-height: 450px;
|
||||
}
|
||||
|
||||
.flight-detail-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
|
||||
.flight-detail-content {
|
||||
width: 60%;
|
||||
padding: 45px;
|
||||
}
|
||||
|
||||
|
||||
.flight-detail-content h1 {
|
||||
font-size: 34px;
|
||||
font-weight: 800;
|
||||
color: #102a43;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.flight-badge-show {
|
||||
background: #1976d2;
|
||||
color: white;
|
||||
padding: 8px 22px;
|
||||
border-radius: 50px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
.route-box {
|
||||
margin: 35px 0;
|
||||
padding: 25px;
|
||||
border-radius: 20px;
|
||||
background: #f8fafc;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
|
||||
.route-box div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.route-box small {
|
||||
display: block;
|
||||
color: #78909c;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
|
||||
.route-box strong {
|
||||
font-size: 22px;
|
||||
color: #102a43;
|
||||
}
|
||||
|
||||
|
||||
.route-line {
|
||||
font-size: 30px;
|
||||
color: #f4b400;
|
||||
}
|
||||
|
||||
|
||||
.flight-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2,1fr);
|
||||
gap: 20px;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
|
||||
.flight-info-grid div {
|
||||
background: #f8fafc;
|
||||
padding: 18px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
|
||||
.flight-info-grid span {
|
||||
display:block;
|
||||
color:#78909c;
|
||||
font-size:13px;
|
||||
margin-bottom:8px;
|
||||
}
|
||||
|
||||
|
||||
.flight-info-grid b {
|
||||
font-size:18px;
|
||||
color:#102a43;
|
||||
}
|
||||
|
||||
|
||||
.buy-flight-btn {
|
||||
display:inline-block;
|
||||
width:100%;
|
||||
text-align:center;
|
||||
background:#1976d2;
|
||||
color:white;
|
||||
padding:15px;
|
||||
border-radius:15px;
|
||||
text-decoration:none;
|
||||
font-weight:700;
|
||||
transition:.3s;
|
||||
}
|
||||
|
||||
|
||||
.buy-flight-btn:hover {
|
||||
background:#125ca8;
|
||||
color:white;
|
||||
}
|
||||
|
||||
|
||||
@media(max-width:768px){
|
||||
|
||||
.flight-detail-card{
|
||||
flex-direction:column;
|
||||
}
|
||||
|
||||
.flight-detail-image,
|
||||
.flight-detail-content{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.flight-detail-image{
|
||||
height:280px;
|
||||
}
|
||||
|
||||
.flight-info-grid{
|
||||
grid-template-columns:1fr;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<section class="flight-detail-page">
|
||||
<div class="container">
|
||||
|
||||
@@ -54,7 +213,7 @@
|
||||
|
||||
<div>
|
||||
<span>تاریخ حرکت</span>
|
||||
<b>{{ $flight->departure_date }}</b>
|
||||
<b>{{ $flight->departure_date->toJalali()->format('Y/m/d') }}</b>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -8,29 +8,35 @@
|
||||
<div class="swiper-wrapper py-3">
|
||||
@forelse($newestFlight as $flight)
|
||||
@include('components.flight')
|
||||
@empty
|
||||
@empty
|
||||
<p class="text-secondary">هنوز پروازی ثبت نشده است.</p>
|
||||
@endforelse
|
||||
@foreach($newestTour as $tour)
|
||||
@include('components.tour', ['tour' => $tour])
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="container my-5">
|
||||
<h3 class="fw-bold mb-4">همه پروازها و تورها</h3>
|
||||
<h3 class="fw-bold mb-4">همه پروازها و تورها</h3>
|
||||
|
||||
<div class="row g-4">
|
||||
@forelse($flights as $flight)
|
||||
<div class="col-md-4">
|
||||
@include('components.flight')
|
||||
</div>
|
||||
@empty
|
||||
<p class="text-secondary">چیزی برای نمایش وجود ندارد.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="row g-4">
|
||||
|
||||
<div class="mt-4">
|
||||
{{ $flights->links() }}
|
||||
</div>
|
||||
</section>
|
||||
@foreach($flights as $flight)
|
||||
@include('components.flight', ['flight' => $flight])
|
||||
@endforeach
|
||||
|
||||
|
||||
@foreach($tours as $tour)
|
||||
@include('components.tour', ['tour' => $tour])
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
{{ $flights->links() }}
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
<link rel="stylesheet" href="{{asset('assets/css/weather-icons.css')}}"/>
|
||||
<link rel="stylesheet" href="{{asset('assets/css/bootstrap.css')}}"/>
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/styles.css?v=2') }}">
|
||||
<link rel="stylesheet" href="{{ asset('assets/css/styles2.css?v=2') }}">
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@includeUnless(isset($withoutHeader),'layouts.header')
|
||||
|
||||
@@ -1,64 +1,51 @@
|
||||
@foreach($tours as $tour)
|
||||
<!-- TOUR ITEM -->
|
||||
|
||||
<div class="swiper-slide tour-card group">
|
||||
|
||||
<!-- tour image -->
|
||||
<a href="#">
|
||||
|
||||
<a href="{{ route('tours.show', $tour->id) }}" class="tour-card_image-link">
|
||||
<img
|
||||
class="tour-card_img"
|
||||
src="{{ $tour->image ?? asset('assets/img/placeholder.jpg') }}"
|
||||
alt="{{ $tour->title }}"
|
||||
>
|
||||
|
||||
src="{{ asset($tour->image) }}" alt="{{ $tour->title }}" >
|
||||
</a>
|
||||
|
||||
<!-- tour content -->
|
||||
|
||||
<div class="tour-card_content">
|
||||
|
||||
<!-- title -->
|
||||
<a href="#" class="tour-card_title">
|
||||
<a href="{{ route('tours.show', $tour->id) }}"
|
||||
class="tour-card_title">
|
||||
{{ $tour->title }}
|
||||
</a>
|
||||
|
||||
<!-- destination -->
|
||||
|
||||
<div class="tour-card_destination">
|
||||
|
||||
<span>
|
||||
📍
|
||||
</span>
|
||||
|
||||
{{ $tour->destination }}
|
||||
|
||||
<span>📍</span>
|
||||
{{ Str::limit($tour->summary, 60) }}
|
||||
</div>
|
||||
|
||||
<!-- details -->
|
||||
|
||||
<div class="tour-card_details">
|
||||
|
||||
<div>
|
||||
<span>مدت تور</span>
|
||||
|
||||
<div class="tour-detail-item">
|
||||
<span>تاریخ حرکت</span>
|
||||
<strong>
|
||||
{{ $tour->duration }} روز
|
||||
{{ \Carbon\Carbon::parse($tour->departure_date)->format('Y/m/d') }}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>ظرفیت</span>
|
||||
|
||||
<div class="tour-detail-item">
|
||||
<span>نوع سفر</span>
|
||||
<strong>
|
||||
{{ $tour->capacity }} نفر
|
||||
{{ $tour->travelType->name ?? '---' }}
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- price -->
|
||||
|
||||
<div class="tour-card_price">
|
||||
|
||||
<span>
|
||||
شروع قیمت از
|
||||
</span>
|
||||
<span>شروع قیمت از</span>
|
||||
|
||||
<strong>
|
||||
{{ number_format($tour->price) }}
|
||||
@@ -67,6 +54,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<a href="{{ route('tours.show', $tour->id) }}"
|
||||
class="tour-card_btn">
|
||||
مشاهده تور
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,113 @@
|
||||
<div>
|
||||
<!-- Happiness is not something readymade. It comes from your own actions. - Dalai Lama -->
|
||||
</div>
|
||||
@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 }}">
|
||||
|
||||
|
||||
<span class="badge bg-primary position-absolute top-0 end-0 m-4">
|
||||
تور
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card-body p-4">
|
||||
|
||||
|
||||
<h1 class="fw-bold mb-4">
|
||||
{{ $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>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<span class="text-secondary">
|
||||
تاریخ حرکت
|
||||
</span>
|
||||
|
||||
<h5>
|
||||
{{ \Carbon\Carbon::parse($tour->departure_date)->format('Y/m/d') }}
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<span class="text-secondary">
|
||||
قیمت
|
||||
</span>
|
||||
|
||||
<h5>
|
||||
{{ number_format($tour->price) }}
|
||||
تومان
|
||||
</h5>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
<h4 class="fw-bold">
|
||||
توضیحات تور
|
||||
</h4>
|
||||
|
||||
|
||||
<p class="mt-3">
|
||||
{{ $tour->description }}
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user