mirror of https://github.com/4xmen/xshop.git
parent
7e4a857654
commit
a2e141bb52
@ -0,0 +1,28 @@
|
||||
<section class='ProductGridHiddenSidebar'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
<h1>
|
||||
{{$title}}
|
||||
|
||||
<div class="btn btn-dark" id="filter-btn-show" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-custom-class="custom-tooltip"
|
||||
data-bs-title="{{__("Sort & filter")}}">
|
||||
<i class="ri-sort-desc"></i>
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<div id="hidden-sidebar">
|
||||
@include('segments.products_page.ProductGridHiddenSidebar.inc.product-sidebar-filter')
|
||||
</div>
|
||||
|
||||
<div class="py-3">
|
||||
<div class="row">
|
||||
@foreach($products as $product)
|
||||
<div class="col-md-4 p-2">
|
||||
@include(\App\Models\Area::where('name','product-grid')->first()->defPart(),compact('product'))
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{$products->withQueryString()->links()}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,10 @@
|
||||
document.addEventListener('DOMContentLoaded',function () {
|
||||
document.querySelector('#filter-btn-show')?.addEventListener('click',function () {
|
||||
document.querySelector('#hidden-sidebar').style.display = 'block';
|
||||
});
|
||||
document.querySelector('#hidden-sidebar')?.addEventListener('click',function (e) {
|
||||
if (e.target == document.querySelector('#hidden-sidebar') ) {
|
||||
document.querySelector('#hidden-sidebar').style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "ProductGridHiddenSidebar",
|
||||
"version": "1.0",
|
||||
"author": "xStack",
|
||||
"email": "xshop@xstack.ir",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"url": "https:\/\/xstack.ir",
|
||||
"author_url": "https:\/\/4xmen.ir",
|
||||
"packages": []
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Resources\Views\Segments;
|
||||
|
||||
use App\Models\Part;
|
||||
|
||||
class ProductGridHiddenSidebar
|
||||
{
|
||||
public static function onAdd(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
public static function onRemove(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
public static function onMount(Part $part = null)
|
||||
{
|
||||
return $part;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
.ProductGridHiddenSidebar {
|
||||
|
||||
|
||||
|
||||
// scss
|
||||
h1 {
|
||||
font-size: 27px;
|
||||
text-align: center;
|
||||
background: var(--xshop-secondary);
|
||||
color: var(--xshop-diff2);
|
||||
margin: 1rem 0;
|
||||
padding: .5rem;
|
||||
font-weight: 200;
|
||||
position: relative;
|
||||
|
||||
.btn {
|
||||
position: absolute;
|
||||
inset-inline-end: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 75px;
|
||||
i{
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
#hidden-sidebar{
|
||||
background: #ffffff44;
|
||||
backdrop-filter: grayscale(1);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
display: none;
|
||||
z-index: 999;
|
||||
|
||||
aside{
|
||||
width: 300px;
|
||||
max-width: 95%;
|
||||
background: var(--xshop-background);
|
||||
position: absolute;
|
||||
inset-inline-start: 0;
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow-y: auto;
|
||||
padding-top: 3rem;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<aside class="mt-2">
|
||||
<div class="side-item">
|
||||
<h4>
|
||||
{{__("Filter")}}
|
||||
</h4>
|
||||
<div class="side-data">
|
||||
<meta-filter
|
||||
props-api-link="{{route('v1.category.prop','')}}/"
|
||||
@if(isset($category))
|
||||
category="{{$category->id}}"
|
||||
@endif
|
||||
>
|
||||
</meta-filter>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
Binary file not shown.
After Width: | Height: | Size: 866 KiB |
Loading…
Reference in New Issue