Файловый менеджер - Редактировать - /home/clickysoft/public_html/travel-guru.clickysoft.net/resources/views/front/home.blade.php
Назад
@extends('front.layouts.master', ['is_travel_agent' => false]) @section('title', 'Home') @section('content') <!-- BANNER SECTION BEGIN --> <section class="banner-cont-sec"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-12"> <div class="banner-cont-txt"> @if (isset($page->sections[0])) <h2> {{ $page->sections[0]->title }} <span> {{ $page->sections[0]->description }}</span> </h2> @else <h2> Default Title <span>Default Description</span> </h2> @endif <div class="search-bar-flex"> <div class="search-item"> <input type="search" id="search-input" class="form-control" placeholder="Where will your next adventure take you?" /> <div id="search-results" style="position: absolute; z-index: 999; background: white; width: 100%;"></div> </div> <div class="search-btn"> <button type="button" class="btn btn-primary" id="search-button"> <span><i class="fa fa-search" aria-hidden="true"></i></span> Search </button> </div> </div> </div> </div> </div> </div> </section> <!-- BANNER SECTION END --> <!-- TRAVEL ADVISOR SECTION BEGIN --> <section class="travel-advisor-sec-bg"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-12"> <div class="travel-heading-cont"> <h2>Travel <span>Advisors</span></h2> </div> <div class="travel-advisor-slider"> <div class="slider responsive-travel"> @forelse ($topRatedAgents as $agent) <div> <div class="travel-agents-boxes"> <div class="travel-inner-flex"> <div class="travel-inner-img"> <img src="{{ $agent->profile_image ? asset('assets/img/profiles/' . $agent->profile_image) : asset('assets/admin/img/profiles/default.png') }}" alt="image" class="img-fluid" /> </div> <div class="travel-inner-react"> <h6> {{ $agent->full_name }} @foreach ($agent->badges as $badge) @foreach ($badge->getMedia('badge_image') as $media) <img src="{{ $media->getUrl() }}" alt="{{ $badge->title }}" class="img-fluid" data-toggle="{{ $badge->description }}" title="{{ $badge->description }}" width="24" height="28"> @endforeach @endforeach </h6> <div class="rating-stars"> @php $rating = $agent->user_reviews_avg_rating; $fullStars = floor($rating); $halfStar = $rating - $fullStars >= 0.5; $emptyStars = 5 - ($fullStars + ($halfStar ? 1 : 0)); @endphp @for ($i = 1; $i <= $fullStars; $i++) <i class="fa fa-star" aria-hidden="true"></i> @endfor @if ($halfStar) <i class="fa fa-star-half-o" aria-hidden="true"></i> @endif @for ($i = 1; $i <= $emptyStars; $i++) <i class="fa fa-star-o" aria-hidden="true"></i> @endfor </div> </div> </div> <div class="business-text"> <p>{{ $agent->specialist }}</p> </div> <div class="hotel-listing"> <ul> @foreach ($agent->categories as $agentAssociatedCategory) <li>{{ $agentAssociatedCategory->title }}</li> @endforeach </ul> </div> <div class="see-more-btn"> @if (auth()->check()) @if (auth()->user()->hasRole('User')) <a href="{{ route('user.chat', ['user' => $agent->uuid]) }}" class="btn btn-primary" target="_blank">Contact</a> @endif <a href="javascript:void(0)" class="see-more-link" data-id={{ $agent->id }}>See more</a> @else <a href="{{ route('login') }}" class="btn btn-primary">Contact</a> <a href="{{ route('login') }}" class="see-more-link" data-id={{ $agent->id }}>See more</a> @endif </div> </div> </div> @endforeach </div> </div> <div class="cruises-safari-grid"> @foreach ($categories as $category) <div class="cruises-safari-box"> <img src="{{ $category->getFirstMediaUrl('featured_image') }}" alt="image" class="img-fluid" /> <div class="add-cont"> <h6>{{ $category->title }}</h6> <p> {!! \Illuminate\Support\Str::limit($category->short_description, 150) !!} </p> <a href="{{ route('category.detail', $category->slug) }}">View Detail</a> </div> </div> @endforeach </div> </div> </div> </div> </section> <!-- TRAVEL ADVISOR SECTION END --> <!-- SPECIAL OFFER SECTION BEGIN --> <section class="special-offer-sec"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-12"> <div class="receive-offer"> @if (isset($page->sections[1])) <h4> {{ $page->sections[1]->title }} <span> {{ $page->sections[1]->description }}</span> </h4> @else <h4>Default Title</h4> <span>Default Description</span> @endif <div class="newsletter-email"> <input type="email" class="form-control" id="newsletterEmail" placeholder="Email" required /> <button type="button" class="btn btn-primary" id="subscribe-button">Send</button> </div> </div> </div> </div> </div> </section> <!-- SPECIAL OFFER SECTION END --> <!-- LOREM IPSUM SECTION BEGIN --> <section class="lorem-ipsum-sec-bg"> <div class="container-fluid"> <div class="row"> <div class="col-lg-6 col-md-6 col-sm-6 col-12"> <div class="lrty-imag"> <img src="{{ isset($page->sections[4]) ? $page->sections[4]->getFirstMediaUrl('files', 'image') : asset('assets/front/images/lrt2.png') }}" class="img-fluid" alt="image" /> <div class="lrty2-img"> <img src="{{ isset($page->sections[3]) ? $page->sections[3]->getFirstMediaUrl('files', 'image') : asset('assets/front/images/lrt1.png') }}" class="img-fluid" alt="image" /> </div> </div> </div> <div class="col-lg-6 col-md-6 col-sm-6 col-12"> <div class="lorem-box-cont"> @if (isset($page->sections[2])) <h4>{{ $page->sections[2]->title }}</h4> <p>{{ $page->sections[2]->description }}</p> @else <h4>Default Title</h4> <p>Default Description</p> @endif <a href="{{ route('login') }}" class="btn btn-primary">Join Now</a> </div> </div> </div> </div> </section> <!-- LOREM IPSUM SECTION END --> @endsection @push('front-scripts') <script> function showToast(message, type) { toastr[type](message); } $(document).ready(function() { $('#subscribe-button').click(function() { const email = $('#newsletterEmail').val(); if (!email) { showToast('Please enter a valid email.', 'info'); $(this).prop('disabled', true); setTimeout(() => { $(this).prop('disabled', false); }, 2000); // Disable for 2 seconds return; } const button = $(this); button.prop('disabled', true); $.ajax({ url: '/subscribe', // Adjust the URL as needed type: 'POST', data: { email: email, _token: '{{ csrf_token() }}' // Include CSRF token }, success: function(response) { if (response.success) { showToast('Subscription successful!', 'success'); $('#newsletterEmail').val(''); // Clear the input // Disable the button for 1 minute button.prop('disabled', true); setTimeout(() => { location.reload(); }, 2000); // 1 minute in milliseconds } }, error: function(xhr) { if (xhr.status === 422) { let errors = xhr.responseJSON.errors; if (errors.email) { showToast(errors.email[0], 'error'); // Show the error message for email } } else { showToast('An unexpected error occurred.', 'info'); } // Disable the button for 2 seconds button.prop('disabled', true); setTimeout(() => { button.prop('disabled', false); }, 2000); // 2 seconds in milliseconds } }); }); }); </script> <script> $(document).ready(function() { $('#search-input').on('keyup', function() { let query = $(this).val(); if (query.length > 2) { $.ajax({ url: "{{ route('search.all') }}", // Define the route for search method: 'GET', data: { search: query }, success: function(response) { $('#search-results').empty().show(); if (response.results.length > 0) { // Append search results response.results.forEach(result => { $('#search-results').append(` <a href="${result.url}" class="search-result-item"> <div class="p-2">${result.title}</div> </a> `); }); } else { // If no results found, display message $('#search-results').append(` <div class="p-2 text-center">No results found</div> `); } }, error: function() { $('#search-results').empty().hide(); // Optionally handle errors here } }); } else { $('#search-results').hide(); // Hide the search results if query length is too short } }); // Hide results when clicking outside $(document).click(function(e) { if (!$(e.target).closest('#search-input, #search-results').length) { $('#search-results').hide(); } }); }); </script> @endpush
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка