Viewing file: 5130d5b2f584d23914a7b46ec76dae99.php (13.43 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title', $metatitle ?? __('ads')); ?>
<?php $__env->startSection('meta'); ?> <?php $data = metaData('ads'); ?>
<meta name="title" content="<?php echo e($data->title); ?>"> <meta name="description" content="<?php echo e($data->description); ?>">
<meta property="og:image" content="<?php echo e($data->image_url); ?>" /> <meta property="og:site_name" content="<?php echo e(config('app.name')); ?>"> <meta property="og:title" content="<?php echo e($data->title); ?>"> <meta property="og:url" content="<?php echo e(route('frontend.ads')); ?>"> <meta property="og:type" content="article"> <meta property="og:description" content="<?php echo e($data->description); ?>">
<meta name=twitter:card content=<?php echo e($data->image_url); ?> /> <meta name=twitter:site content="<?php echo e(config('app.name')); ?>" /> <meta name=twitter:url content="<?php echo e(route('frontend.ads')); ?>" /> <meta name=twitter:title content="<?php echo e($data->title); ?>" /> <meta name=twitter:description content="<?php echo e($data->description); ?>" /> <meta name=twitter:image content="<?php echo e($data->image_url); ?>" /> <?php $__env->stopSection(); ?>
<?php $currentUrl = Request::url(); $baseUrl = config('app.url');
// Parse the URL to get path components $urlComponents = parse_url($currentUrl); $pathSegments = explode('/', trim($urlComponents['path'], '/'));
$breadcrumbs = []; $currentPath = '';
foreach ($pathSegments as $segment) { $currentPath .= '/' . $segment; $breadcrumbs[] = [ 'url' => rtrim($baseUrl . $currentPath, '/'), 'text' => ucfirst(str_replace('-', ' ', $segment)), ]; } ?>
<?php $__env->startSection('content'); ?> <div class="" x-data="{ filter: false, activeFilter: false }"> <!-- Render the Breadcrumbs --> <?php if (isset($component)) { $__componentOriginal044f5af546c391ddc719bb44e1cd807e = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal044f5af546c391ddc719bb44e1cd807e = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.frontend.breadcrumb.breadcrumb','data' => ['links' => $breadcrumbs]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('frontend.breadcrumb.breadcrumb'); ?> <?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(['links' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($breadcrumbs)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal044f5af546c391ddc719bb44e1cd807e)): ?> <?php $attributes = $__attributesOriginal044f5af546c391ddc719bb44e1cd807e; ?> <?php unset($__attributesOriginal044f5af546c391ddc719bb44e1cd807e); ?> <?php endif; ?> <?php if (isset($__componentOriginal044f5af546c391ddc719bb44e1cd807e)): ?> <?php $component = $__componentOriginal044f5af546c391ddc719bb44e1cd807e; ?> <?php unset($__componentOriginal044f5af546c391ddc719bb44e1cd807e); ?> <?php endif; ?> <!-- listing Section --> <?php if (! isset($_instance)) { $html = \Livewire\Livewire::mount('adlist', ['brands' => $brands])->html(); } elseif ($_instance->childHasBeenRendered('VDNV2yc')) { $componentId = $_instance->getRenderedChildComponentId('VDNV2yc'); $componentTag = $_instance->getRenderedChildComponentTagName('VDNV2yc'); $html = \Livewire\Livewire::dummyMount($componentId, $componentTag); $_instance->preserveRenderedChild('VDNV2yc'); } else { $response = \Livewire\Livewire::mount('adlist', ['brands' => $brands]); $html = $response->html(); $_instance->logRenderedChild('VDNV2yc', $response->id(), \Livewire\Livewire::getRootElementTagName($html)); } echo $html; ?> </div> <?php $__env->stopSection(); ?>
<?php $__env->startPush('css'); ?> <!-- Add venobox --> <link rel="stylesheet" href="<?php echo e(asset('frontend/css/venobox.min.css')); ?>" type="text/css" /> <style> .vbox-child { max-width: 750px !important; } </style> <style> .galleryView { height: 520px; width: 100%; }
@media (max-width: 767px) { .galleryView { height: 320px; } }
@media (max-width: 525px) { .galleryView { height: 250px; } }
.swiper.galleryList { height: 60px; box-sizing: border-box; padding: 0; }
.galleryList .swiper-slide { width: 80px !important; height: 100%; border-radius: 6px; border: 1px solid var(--gray-100); }
.galleryList .swiper-slide-thumb-active { opacity: 1; border: 3px solid var(--primary-500); }
.galleryList .swiper-slide img { height: 100%; object-fit: cover; }
.galleryList .swiper-slide { text-align: center; font-size: 18px; background: #fff; display: -webkit-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; padding: 10px }
.galleryList .swiper-slide img { height: 100%; object-fit: cover; }
.galleryView .swiper-button-prev, .galleryView .swiper-button-next { width: 24px; height: 24px; border-radius: 124px; background: rgba(0, 0, 0, 0.50); padding: 6px; transition: all 0.4s ease-in; }
.galleryView .swiper-button-prev:hover, .galleryView .swiper-button-next:hover { background: var(--primary-500); }
.galleryView .swiper-button-next:after { content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.125 2.25L7.875 6L4.125 9.75' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); font-size: unset; }
.galleryView .swiper-button-prev:after { content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.125 2.25L7.875 6L4.125 9.75' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); font-size: unset; transform: rotate(180deg) } </style> <?php $__env->stopPush(); ?> <?php $__env->startPush('js'); ?> <script> document.addEventListener('alpine:init', () => { Alpine.data('filters', () => ({ categories: <?php echo json_encode(loadCategoriesSubcategories(), 15, 512) ?>, minprice: "<?php echo e(minMAxCurrency(minmax()['minPrice'])); ?>", maxprice: "<?php echo e(minMAxCurrency(minmax()['maxPrice'])); ?>", min: "<?php echo e(minMAxCurrency(minmax()['minPrice'])); ?>", max: "<?php echo e(minMAxCurrency(minmax()['maxPrice'])); ?>", minthumb: 0, maxthumb: 0,
mintrigger() { this.minprice = Math.min(this.minprice, this.maxprice - 500); this.minthumb = ((this.minprice - this.min) / (this.max - this.min)) * 100; },
maxtrigger() { this.maxprice = Math.max(this.maxprice, this.minprice + 500); this.maxthumb = 100 - (((this.maxprice - this.min) / (this.max - this.min)) * 100); }, })) })
function removeFilter(el) { el.parentElement.remove() } </script> <script> $(document).ready(function() { $('#category').on('click', function(e) { // Prevent the default behavior of the button e.preventDefault();
// Retrieve the data-category attribute from the clicked button var categoryValue = $(this).data('category'); document.querySelector(`input[value="${categoryValue}"]`).checked = false; // Log the value to the console (you can use it as needed) console.log(categoryValue); Livewire.emit('checkboxUpdated', categoryValue); // Additional logic if needed... })
document.addEventListener('livewire:load', function() { Livewire.on('categoryRemoved', function() { // Handle the 'categoryRemoved' event Livewire.emit('checkboxUpdated', categoryValue);
// You can perform additional actions here, such as updating the UI or making AJAX requests }); });
// Assuming you have a function to update filters based on URL parameters function updateFiltersFromUrl() { var selectedCategories = new URLSearchParams(window.location.search).getAll('selectedCategory'); var selectedSubcategories = new URLSearchParams(window.location.search).getAll( 'selectedSubcategory');
// Update the DOM elements with the selected categories and subcategories // ...
// Example: Update a paragraph to show/hide based on the presence of filters var activeFilterParagraph = document.querySelector('.active-filter-paragraph'); if (selectedCategories.length > 0 || selectedSubcategories.length > 0) { activeFilterParagraph.style.display = 'block'; } else { if(activeFilterParagraph) { activeFilterParagraph.style.display = 'none'; } } }
// Call the function on page load window.onload = function() { updateFiltersFromUrl(); }; }) </script> <script> window.addEventListener('update-selected-category', event => { let routeName = "<?php echo e(trim(route('frontend.ads'), '/')); ?>"; let newUrl = routeName; const breadcrumb = document.querySelector('.breadcrumb-list');
while (breadcrumb.children.length > 2) { breadcrumb.removeChild(breadcrumb.lastChild); }
if (event.detail.category && event.detail.category.length > 0) { newUrl += '/' + event.detail.category; createNewChildList(event.detail.category, newUrl); }
if (event.detail.subcategory && event.detail.subcategory.length > 0) { newUrl += '/' + event.detail.subcategory; createNewChildList(event.detail.subcategory, newUrl); }
const pageTitle = `${capitalizeFirstLetter(event.detail.metatitle)}${event.detail.category ? ' ' + capitalizeFirstLetter(event.detail.category) : ''}${event.detail.subcategory ? ' ' + capitalizeFirstLetter(event.detail.subcategory) : ''}`;
// Update the meta title document.title = pageTitle;
// Add meta title dynamically const metaTitle = document.querySelector('meta[name="title"]'); if (metaTitle) { metaTitle.setAttribute('content', pageTitle); } else { const newMetaTitle = document.createElement('meta'); newMetaTitle.setAttribute('name', 'title'); newMetaTitle.setAttribute('content', pageTitle); document.head.appendChild(newMetaTitle); }
history.pushState(null, null, newUrl);
function createNewChildList(name, url) { const listItem = document.createElement('li'); listItem.classList.add('inline-flex', 'items-center', 'gap-2');
const anchor = document.createElement('a'); anchor.href = url; anchor.classList.add('body-sm-400', 'transition-all', 'duration-300', 'text-gray-600', 'hover:text-gray-900'); anchor.textContent = capitalizeWords(name);
listItem.appendChild(anchor); breadcrumb.appendChild(listItem); }
function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); }
function capitalizeWords(str) { return str.replace(/[^a-zA-Z ]/g, ' ').replace(/\b\w/g, match => match.toUpperCase()); }
}); </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('frontend.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\add listing 8-9-25\addListing\resources\views/frontend/ads.blade.php ENDPATH**/ ?>
|