관리-도구
편집 파일: home.blade.php
@extends('layouts.front-end.app') @section('title', $web_config['meta_title']) @push('css_or_js') <link rel="stylesheet" href="{{ theme_asset(path:'public/assets/front-end/css/home.css') }}"/> <link rel="stylesheet" href="{{ theme_asset(path:'public/assets/front-end/css/owl.carousel.min.css') }}"> <link rel="stylesheet" href="{{ theme_asset(path:'public/assets/front-end/css/owl.theme.default.min.css') }}"> @endpush @section('content') @php $dp = !empty(getWebConfig(name:'decimal_point_settings')) ? getWebConfig(name:'decimal_point_settings') : 0; $orderSuccessIds = session('order_success_ids'); $isNewCustomer = session('isNewCustomerInSession'); session()->forget(['order_success_ids','isNewCustomerInSession']); @endphp @include("web-views.partials._order-success-modal",['orderSuccessIds'=>$orderSuccessIds,'isNewCustomerInSession'=>$isNewCustomer]) <div class="luxury-home"> {{-- 01 · HERO (marquee auto-injects after via JS) ─────────────── --}} @include('web-views.partials._home-top-slider',['bannerTypeMainBanner'=>$bannerTypeMainBanner]) {{-- 02 · THE EDIT — filterable staggered grid ──────────────────── --}} @if($newArrivalProducts->count() > 0) <section class="cxz cxz--alab"> <span class="cxz__side">The Edit — 02</span> <div class="cxz__ghost">Atelier</div> <div class="container"> <div class="cxz__head cxr"> <div style="display:flex;align-items:flex-end;"> <span class="cxz__idx">02</span> <div> <span class="cxz__kick">New Season</span> <h2 class="cxz__title">Shop the <em>Edit</em></h2> </div> </div> <p class="cxz__sub">Filter our newest arrivals by weave — each piece numbered, every thread considered.</p> </div> {{-- COUTURE FILTER TABS (counts auto-populate via JS) --}} <div class="cxf cxr" data-target="#cxEdit"> <button class="cxf__tab active" data-filter="all">All</button> @foreach($categories->take(6) as $cat) <button class="cxf__tab" data-filter="{{ $cat->id }}">{{ $cat->name }}</button> @endforeach </div> <div class="cxg" id="cxEdit"> @foreach($newArrivalProducts as $product) @include('web-views.partials._product-card-2',['product'=>$product,'decimal_point_settings'=>$dp]) @endforeach </div> <div style="text-align:center;margin-top:64px;" class="cxr"> <a href="{{ route('products') }}" class="cx-btn cx-btn--black">View Entire Collection</a> </div> </div> </section> @endif {{-- 03 · WEAVES — keyhole gallery on black silk ────────────────── --}} @if($categories->count() > 0) <section class="cxz cxz--black"> <span class="cxz__side">Weaves — 03</span> <div class="cxz__ghost">Weaves</div> <div class="container"> <div class="cxz__head cxr"> <div style="display:flex;align-items:flex-end;"> <span class="cxz__idx">03</span> <div> <span class="cxz__kick">Shop By</span> <h2 class="cxz__title">Our <em>Weaves</em></h2> </div> </div> <a class="cx-link" href="{{ route('categories') }}">{{ translate('view_all') }}</a> </div> <div class="cxc cxr"> @foreach($categories->take(10) as $cat) <a class="cxc__i" href="{{ route('category-products',['slug'=>$cat['slug']]) }}"> <div class="cxc__key"> <img loading="lazy" alt="{{ $cat->name }}" src="{{ getStorageImages(path:$cat->icon_full_url,type:'category') }}"> </div> <div class="cxc__nm">{{ $cat->name }}</div> </a> @endforeach </div> </div> </section> @endif {{-- 04 · FLASH — lacquer silk ──────────────────────────────────── --}} @if($flashDeal['flashDeal'] && $flashDeal['flashDealProducts'] && count($flashDeal['flashDealProducts']) > 0) <section class="cxz cxz--lacquer"> <span class="cxz__side">Flash — 04</span> <div class="cxz__ghost">Flash</div> <div class="container" style="position:relative;z-index:2;"> @include('web-views.partials._flash-deal',['decimal_point_settings'=>$dp]) </div> </section> @endif {{-- 05 · FEATURED — bone ───────────────────────────────────────── --}} @if($featuredProductsList->count() > 0) <section class="cxz cxz--bone"> <span class="cxz__side">Featured — 05</span> <div class="container"> <div class="cxz__head cxr"> <div style="display:flex;align-items:flex-end;"> <span class="cxz__idx">05</span> <div> <span class="cxz__kick">Curated</span> <h2 class="cxz__title">Featured <em>Pieces</em></h2> </div> </div> <a class="cx-link" href="{{ route('featured-products') }}">{{ translate('view_all') }}</a> </div> <div class="owl-carousel owl-theme featured_products_listSlide cxr" data-slide-items="{{ count($featuredProductsList) }}"> @foreach($featuredProductsList as $product) <div>@include('web-views.partials._feature-product',['product'=>$product,'decimal_point_settings'=>$dp])</div> @endforeach </div> </div> </section> @endif {{-- 06 · PARALLAX QUOTE (reuses first hero banner) ─────────────── --}} <section class="cxz cxz--photo" data-photo-from=".cxh__media img"> <div class="container cxq cxr"> <blockquote>"A saree is not just six yards of fabric —<br>it is a story woven in silk."</blockquote> <cite>{{ $web_config['company_name'] }} · Handloom Heritage</cite> </div> </section> {{-- 07 · FEATURED DEALS — staggered grid on alabaster ──────────── --}} @if(getFeaturedDealsProductList() && count(getFeaturedDealsProductList()) > 0) <section class="cxz cxz--alab"> <span class="cxz__side">Deals — 07</span> <div class="cxz__ghost">Deals</div> <div class="container"> <div class="cxz__head cxr"> <div style="display:flex;align-items:flex-end;"> <span class="cxz__idx">07</span> <div> <span class="cxz__kick">Limited Time</span> <h2 class="cxz__title">Featured <em>Deals</em></h2> </div> </div> <a class="cx-link" href="{{ route('featured-deal-products') }}">{{ translate('view_all') }}</a> </div> <div class="cxg"> @foreach(getFeaturedDealsProductList() as $product) @include('web-views.partials._product-card-1',['product'=>$product,'decimal_point_settings'=>$dp]) @endforeach </div> </div> </section> @endif {{-- 08 · STOCK PARTIALS (CSS/JS themed automatically) ──────────── --}} @include('web-views.partials._clearance-sale-products',['clearanceSaleProducts'=>$clearanceSaleProducts]) @php($bm = getWebConfig(name:'business_mode')) @if($bm == 'multi' && count($topVendorsList) > 0) @include('web-views.partials._top-sellers') @endif @include('web-views.partials._deal-of-the-day',['decimal_point_settings'=>$dp]) {{-- 09 · LEDGERS on black silk ─────────────────────────────────── --}} @if($bestSellProduct->count() > 0 || $topRatedProducts->count() > 0) <section class="cxz cxz--black"> <span class="cxz__side">Loved — 09</span> <div class="cxz__ghost">Loved</div> <div class="container"> <div class="row g-4" style="position:relative;z-index:2;"> @if($bestSellProduct->count() > 0) <div class="col-lg-6 cxr cxr--l"> <div class="cxl"> <div class="cxl__head"> <span class="cxl__title">Best Sellings</span> <a class="cx-link" href="{{ route('best-selling-products') }}">{{ translate('view_all') }}</a> </div> @foreach($bestSellProduct->take(5) as $k => $item) <a class="cxl__row" href="{{ route('product', $item->slug) }}"> <img class="cxl__img" loading="lazy" alt="{{ $item['name'] }}" src="{{ getStorageImages(path:$item?->thumbnail_full_url,type:'product') }}"> <div> <div class="cxl__nm">{{ Str::limit($item['name'],62) }}</div> <div> <span class="cxl__pr">{{ getProductPriceByType(product:$item,type:'discounted_unit_price',result:'string') }}</span> @if(getProductPriceByType(product:$item,type:'discount',result:'value') > 0) <span class="cxl__ws">{{ webCurrencyConverter(amount:$item->unit_price) }}</span> @endif </div> </div> <span class="cxl__idx">{{ sprintf('%02d', $k+1) }}</span> </a> @endforeach </div> </div> @endif @if($topRatedProducts->count() > 0) <div class="col-lg-6 cxr cxr--r"> <div class="cxl"> <div class="cxl__head"> <span class="cxl__title">Top Rated</span> <a class="cx-link" href="{{ route('top-rated-products') }}">{{ translate('view_all') }}</a> </div> @foreach($topRatedProducts->take(5) as $k => $product) <a class="cxl__row" href="{{ route('product', $product->slug) }}"> <img class="cxl__img" loading="lazy" alt="{{ $product['name'] }}" src="{{ getStorageImages(path:$product->thumbnail_full_url,type:'product') }}"> <div> <div class="cxl__nm">{{ Str::limit($product['name'],62) }}</div> <div> <span class="cxl__pr">{{ getProductPriceByType(product:$product,type:'discounted_unit_price',result:'string') }}</span> @if(getProductPriceByType(product:$product,type:'discount',result:'value') > 0) <span class="cxl__ws">{{ webCurrencyConverter(amount:$product->unit_price) }}</span> @endif </div> </div> <span class="cxl__idx">{{ sprintf('%02d', $k+1) }}</span> </a> @endforeach </div> </div> @endif </div> </div> </section> @endif {{-- 10 · WIDE BANNER + CATEGORY-WISE + EXTRAS (stock data) ─────── --}} @if(isset($bannerTypeMainSectionBanner)) <div style="line-height:0;" class="cxr"> <a href="{{ $bannerTypeMainSectionBanner->url }}" target="_blank"> <img loading="lazy" style="width:100%;max-height:430px;object-fit:cover;display:block;" alt="" src="{{ getStorageImages(path:$bannerTypeMainSectionBanner->photo_full_url,type:'wide-banner') }}"> </a> </div> @endif @if($homeCategories->count() > 0) @foreach($homeCategories as $category) @include('web-views.partials._category-wise-product',['decimal_point_settings'=>$dp]) @endforeach @endif @php($companyReliability = getWebConfig(name:'company_reliability')) @if($companyReliability != null) @include('web-views.partials._company-reliability', ['companyReliability' => $companyReliability]) @endif @if(count($bannerTypeFooterBanner) > 0) <div class="container" style="padding:60px 24px;"> @foreach($bannerTypeFooterBanner as $banner) <a href="{{ $banner['url'] }}" class="d-block cxr" target="_blank" style="margin-bottom:10px;"> <img loading="lazy" style="width:100%;display:block;" alt="" src="{{ getStorageImages(path:$banner->photo_full_url,type:'banner') }}"> </a> @endforeach </div> @endif </div>{{-- .luxury-home --}} <span id="direction-from-session" data-value="{{ session()->get('direction') }}"></span> @endsection @push('script') @if($orderSuccessIds) <script> document.addEventListener('DOMContentLoaded', function () { var m = new bootstrap.Modal(document.getElementById('order_successfully'),{backdrop:'static',keyboard:false}); m.show(); document.querySelectorAll('.copy-order-id').forEach(btn => { btn.addEventListener('click', function(){ var el = this.closest('tr')?.querySelector('.order-id-text')||this.parentElement.querySelector('.order-id-text'); if(el) navigator.clipboard.writeText(el.textContent.trim()).then(()=>toastr.success('Copied!')).catch(()=>{}); }); }); document.getElementById('modal-close-btn').addEventListener('click', ()=>setTimeout(()=>m.hide(),600)); }); </script> @endif @if(Request::is('/') && \Illuminate\Support\Facades\Cookie::has('popup_banner')==false && empty($orderSuccessIds)) <script>$(document).ready(function(){ $('#popup-modal').modal('show'); });</script> @php(\Illuminate\Support\Facades\Cookie::queue('popup_banner','off',1)) @endif <script src="{{ theme_asset(path:'public/assets/front-end/js/owl.carousel.min.js') }}"></script> <script src="{{ theme_asset(path:'public/assets/front-end/js/home.js') }}"></script> @endpush