Viewing file: ccf8862f5f7d3ef04ebc076f8e230c1b.php (23.36 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div> <!-- Filter Sectioon --> <!-- Filter Sectioon --> <section class="pt-8 pb-6"> <div x-data="{ isTyped: false }"> <div class="container"> <div class="flex flex-wrap xl:flex-nowrap gap-3 items-center"> <button class="btn-secondary py-2.5 px-5" @click="filter = !filter"> <?php if (isset($component)) { $__componentOriginal8f11fe323f9d347eebd2f0fedd414fd6 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal8f11fe323f9d347eebd2f0fedd414fd6 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.svg.all-category-icon','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('svg.all-category-icon'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal8f11fe323f9d347eebd2f0fedd414fd6)): ?> <?php $attributes = $__attributesOriginal8f11fe323f9d347eebd2f0fedd414fd6; ?> <?php unset($__attributesOriginal8f11fe323f9d347eebd2f0fedd414fd6); ?> <?php endif; ?> <?php if (isset($__componentOriginal8f11fe323f9d347eebd2f0fedd414fd6)): ?> <?php $component = $__componentOriginal8f11fe323f9d347eebd2f0fedd414fd6; ?> <?php unset($__componentOriginal8f11fe323f9d347eebd2f0fedd414fd6); ?> <?php endif; ?> <span><?php echo e(__('filters')); ?></span> </button>
<div class="relative w-full max-w-[393px]"> <input x-on:input.debounce.400ms="isTyped = ($event.target.value != '')" autocomplete="off" wire:model.debounce.500ms="search_ad_val" class="tc-input !w-full max-w-[393px]" type="text" placeholder="Search" name="search"> <div x-show="isTyped" x-cloak> <?php if(count($filter_value) > 0): ?>
<div class="search-box" style="display: block"> <ul> <?php $__currentLoopData = $filter_value; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $url = url('/') . '/ad/details/' . $value->slug; ?>
<a href="<?php echo e($url); ?>"> <li> <?php echo e(Illuminate\Support\Str::limit($value->title, 60)); ?>
</li> </a> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> </div> <?php else: ?> <div class="search-box" style="display: none"> </div> <?php endif; ?> </div> </div> <input wire:model.debounce.500ms="location" wire:click="$emit('openModal')" class="tc-input max-w-[393px]" type="text" placeholder="Location" readonly> <div class="flex dark:bg-gray-900 dark:border-gray-600 radio-box__wrap"> <label class="py-3 px-5 body-sm-500 dark:text-white hover:bg-primary-50 dark:hover:bg-gray-600 transition-all duration-300 text-center cursor-pointer all-selected" for="all_con"> <input wire:model="seletedOption" value="0" type="radio" id="all_con" class="hidden"> <span><?php echo e(__('all')); ?></span> </label> <label class="py-3 px-5 body-sm-500 dark:text-white hover:bg-primary-50 dark:hover:bg-gray-600 transition-all duration-300 text-center cursor-pointer" for="used"> <input type="radio" wire:model="seletedOption" value="1" id="used" class="hidden"> <span><?php echo e(__('featured')); ?></span> </label> <label class="py-3 px-5 body-sm-500 dark:text-white hover:bg-primary-50 dark:hover:bg-gray-600 transition-all duration-300 text-center cursor-pointer" for="selectedUrgent"> <input type="radio" wire:model="seletedOption" value="2" id="selectedUrgent" class="hidden"> <span><?php echo e(__('urgent')); ?></span> </label> <label class="py-3 px-5 body-sm-500 dark:text-white hover:bg-primary-50 dark:hover:bg-gray-600 transition-all duration-300 text-center cursor-pointer" for="seletedLatest"> <input type="radio" wire:model="seletedOption" value="asc" id="seletedLatest" class="hidden"> <span><?php echo e(__('latest')); ?></span> </label> </div> </div> </div> </section>
<section x-data="filters" class="dark:bg-gray-800"> <div class="container pb-8"> <div class="flex" :class="filter ? 'gap-6' : 'gap-0'"> <?php if (isset($component)) { $__componentOriginal7587cc546a2ae34caa788399ae586b68 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal7587cc546a2ae34caa788399ae586b68 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.listing.filter-sidebar','data' => ['brands' => $brands,'customfields' => $customfields]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.listing.filter-sidebar'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['brands' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($brands),'customfields' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($customfields)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal7587cc546a2ae34caa788399ae586b68)): ?> <?php $attributes = $__attributesOriginal7587cc546a2ae34caa788399ae586b68; ?> <?php unset($__attributesOriginal7587cc546a2ae34caa788399ae586b68); ?> <?php endif; ?> <?php if (isset($__componentOriginal7587cc546a2ae34caa788399ae586b68)): ?> <?php $component = $__componentOriginal7587cc546a2ae34caa788399ae586b68; ?> <?php unset($__componentOriginal7587cc546a2ae34caa788399ae586b68); ?> <?php endif; ?> <div class="flex-grow"> <div class="body-sm-500 text-gray-700"> <ul class="flex flex-wrap gap-x-3 gap-y-2.5 items-center mb-4"> <li class="inline-flex gap-1 items-center"> <?php if($selectedbrand || $dateRange): ?> <span class="heading-07 text-primary-500 "><?php echo e(__('active_filter')); ?>:</span> <?php endif; ?> </li> <?php if($selectedbrand): ?> <li class="inline-flex gap-1 items-center"> <span class="filter-title text-gray-500"> <?php echo e(__('brand')); ?>:</span> <span><?php echo e($selectedbrand); ?></span> <button wire:click="removeSelectedBrand('<?php echo e($selectedbrand); ?>')" class="hover:bg-gray-50 transition-all duration-300 p-1 rounded-full"> <span>×</span> </button> </li> <?php endif; ?> <?php if($dateRange): ?> <li class="inline-flex gap-1 items-center"> <span class="filter-title text-gray-500"><?php echo e(__('posted_within')); ?>:</span> <span><?php echo e($dateRange); ?> days</span> <button wire:click="removeSelectedDate('<?php echo e($dateRange); ?>')" class="hover:bg-gray-50 transition-all duration-300 p-1 rounded-full"> <span>×</span> </button> </li> <?php endif; ?> </ul> </div>
<?php if($ads->count() > 0): ?> <div class="w-full flex-grow grid gap-[15px] grid-cols-1 sm:grid-cols-2" :class="{ 'md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4': filter, 'md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5': !filter }"> <?php $__currentLoopData = $topAds; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if (isset($component)) { $__componentOriginal1e475bc73450b1a01336b85f187fc6e2 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal1e475bc73450b1a01336b85f187fc6e2 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.ad-card.card','data' => ['ad' => $ad,'topAd' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.ad-card.card'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['ad' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($ad),'top_ad' => true]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal1e475bc73450b1a01336b85f187fc6e2)): ?> <?php $attributes = $__attributesOriginal1e475bc73450b1a01336b85f187fc6e2; ?> <?php unset($__attributesOriginal1e475bc73450b1a01336b85f187fc6e2); ?> <?php endif; ?> <?php if (isset($__componentOriginal1e475bc73450b1a01336b85f187fc6e2)): ?> <?php $component = $__componentOriginal1e475bc73450b1a01336b85f187fc6e2; ?> <?php unset($__componentOriginal1e475bc73450b1a01336b85f187fc6e2); ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__currentLoopData = $bumpUpAds; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if (isset($component)) { $__componentOriginal1e475bc73450b1a01336b85f187fc6e2 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal1e475bc73450b1a01336b85f187fc6e2 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.ad-card.card','data' => ['ad' => $ad,'bumpUp' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.ad-card.card'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['ad' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($ad),'bump_up' => true]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal1e475bc73450b1a01336b85f187fc6e2)): ?> <?php $attributes = $__attributesOriginal1e475bc73450b1a01336b85f187fc6e2; ?> <?php unset($__attributesOriginal1e475bc73450b1a01336b85f187fc6e2); ?> <?php endif; ?> <?php if (isset($__componentOriginal1e475bc73450b1a01336b85f187fc6e2)): ?> <?php $component = $__componentOriginal1e475bc73450b1a01336b85f187fc6e2; ?> <?php unset($__componentOriginal1e475bc73450b1a01336b85f187fc6e2); ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__currentLoopData = $ads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($loop->index == 2): ?> <?php if(advertisementCode('ad_listing_page_right')): ?> <div class="h-[400px] max-h-[400px]"> <?php echo advertisementCode('ad_listing_page_right'); ?>
</div> <?php endif; ?> <?php elseif($loop->index == 6): ?> <?php if(advertisementCode('ad_listing_page_left')): ?> <div class="h-[400px] max-h-[400px]"> <?php echo advertisementCode('ad_listing_page_left'); ?>
</div> <?php endif; ?> <?php else: ?> <?php if (isset($component)) { $__componentOriginal1e475bc73450b1a01336b85f187fc6e2 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal1e475bc73450b1a01336b85f187fc6e2 = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.ad-card.card','data' => ['featured' => $ad->featured,'ad' => $ad]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.ad-card.card'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['featured' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($ad->featured),'ad' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($ad)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal1e475bc73450b1a01336b85f187fc6e2)): ?> <?php $attributes = $__attributesOriginal1e475bc73450b1a01336b85f187fc6e2; ?> <?php unset($__attributesOriginal1e475bc73450b1a01336b85f187fc6e2); ?> <?php endif; ?> <?php if (isset($__componentOriginal1e475bc73450b1a01336b85f187fc6e2)): ?> <?php $component = $__componentOriginal1e475bc73450b1a01336b85f187fc6e2; ?> <?php unset($__componentOriginal1e475bc73450b1a01336b85f187fc6e2); ?> <?php endif; ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div> <?php else: ?> <div class="w-full"> <div class="max-w-[400px] mx-auto"> <img src="<?php echo e(asset('frontend/images/no-ads-found.png')); ?>" alt="no ads founds image" class="w-full"> </div> <div class="text-center space-y-4"> <p class="body-base-500 text-gray-700"> <?php echo e(__('opps_no_ads_found_related_to_this_filter')); ?>
</p> <h5 class="heading-05 text-gray-900"><?php echo e(__('please_try_other_filters')); ?></h5> </div> </div> <?php endif; ?> <?php if(gettype($ads) == 'object' && count($ads) && $showLoadMore): ?> <div class="mt-8 flex items-center justify-center"> <button wire:click="loadMore" wire:loading.attr="disabled" class="btn-load-more dark:bg-gray-900 flex shrink-0 p-[0.5rem_1rem] justify-center items-center rounded-[0.375rem] border border-gray-100 dark:border-gray-600 shadow-[0px_1px_2px_0px_rgba(28, 33, 38, 0.05)] heading-08 text-gray-700 dark:text-gray-300 hover:text-white transition-all duration-100 hover:bg-primary-500 mx-auto"> <span wire:loading wire:target="loadMore"> <?php echo e(__('loading')); ?>... </span> <span wire:loading.remove> <span><?php echo e(__('load_more')); ?></span> </span> </button> </div> <?php endif; ?> </div> </div> </div> </section>
<script> document.addEventListener('DOMContentLoaded', function() { var allLabel = document.querySelector('.all-selected'); var featuredRadio = document.getElementById('used'); var latestRadio = document.getElementById('seletedLatest'); var urgentRadio = document.getElementById('selectedUrgent');
function toggleAllLabel() { if (featuredRadio.checked || latestRadio.checked || urgentRadio.checked) { allLabel.style.display = 'block'; console.log(allLabel.style.display); } else { allLabel.style.display = 'none'; console.log(allLabel.style.display); } }
// Initial check on page load toggleAllLabel();
// Add event listeners to radio buttons featuredRadio.addEventListener('change', toggleAllLabel); latestRadio.addEventListener('change', toggleAllLabel); urgentRadio.addEventListener('change', toggleAllLabel); }); </script> <script> let isToastVisible = false;
window.addEventListener('alert', event => { if (!isToastVisible) { isToastVisible = true;
toastr.clear();
toastr.options = { "closeButton": true, "progressBar": false, "onHidden": function() { isToastVisible = false; } };
toastr[event.detail.type]( event.detail.message, event.detail.title ?? '' ); } }); </script> <style type="text/css"> .search-box { position: absolute; top: calc(100% + 10px); width: 100%; height: 250px; z-index: 9999; overflow: hidden; overflow-y: scroll; background: white; padding: 12px 0px; border-radius: 8px; box-shadow: 0px 2px 6px 0px rgba(112, 122, 125, 0.12); -ms-overflow-style: none; scrollbar-width: none; border: 1px solid var(--gray-100); }
.search-box::-webkit-scrollbar { display: none; }
.search-box .clear { clear: both; margin-top: 20px; }
.search-box ul { list-style: none; width: 100%; position: relative; margin: 0; }
.search-box ul a { padding: 12px 12px 12px 34px; margin-bottom: 1px; font-size: 16px; line-height: 150%; cursor: pointer; width: 100%; display: flex; align-items: center; position: relative; transition: all 0.4s ease-in-out; }
.search-box ul a::after { content: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); position: absolute; inset-inline-start: 8px; top: 50%; transform: translateY(-50%); }
.search-box ul a:hover { background: var(--primary-50); color: var(--primary-500); }
.search-box input[type=text] { padding: 5px; width: 250px; letter-spacing: 1px; } </style> </div> <?php /**PATH E:\add listing 8-9-25\addListing\resources\views/livewire/adlist.blade.php ENDPATH**/ ?>
|