mirror of https://github.com/4xmen/xshop.git
parent
a7d9607343
commit
66cc2b1acc
@ -0,0 +1,18 @@
|
||||
@extends('website.inc.website-layout')
|
||||
|
||||
@section('title')
|
||||
{{$title}} - {{config('app.name')}}
|
||||
@endsection
|
||||
@php
|
||||
if ($category->bg != null){
|
||||
$bg = $category->bgUrl();
|
||||
}
|
||||
@endphp
|
||||
@section('content')
|
||||
<main>
|
||||
@foreach(getParts($area) as $part)
|
||||
@php($p = $part->getBladeWithData())
|
||||
@include($p['blade'],['data' => $p['data']])
|
||||
@endforeach
|
||||
</main>
|
||||
@endsection
|
@ -0,0 +1,23 @@
|
||||
<section class='SubCategoriesGrid content'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
@if($category->children()->count() > 0)
|
||||
<div class="px-4">
|
||||
<h3>
|
||||
{{__("Sub categories")}}
|
||||
</h3>
|
||||
<div class="row">
|
||||
@foreach($category->children as $subCat)
|
||||
<div class="col-md">
|
||||
<div class="sub-category">
|
||||
<img src="{{$subCat->imgUrl()}}" alt="{{$subCat->name}}" class="img-fluid">
|
||||
<h4>
|
||||
{{$subCat->name}}
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "SubCategoriesGrid",
|
||||
"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 SubCategoriesGrid
|
||||
{
|
||||
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,49 @@
|
||||
.SubCategoriesGrid {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
.row{
|
||||
[class^="col-md"]{
|
||||
padding: 2px;
|
||||
}
|
||||
}
|
||||
.sub-category{
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
img{
|
||||
position: absolute;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
object-fit: cover;
|
||||
transition: 400ms;
|
||||
}
|
||||
h4{
|
||||
z-index: 3;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
background: #ffffff33;
|
||||
backdrop-filter: blur(4px);
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
transition: 400ms;
|
||||
}
|
||||
|
||||
&:hover{
|
||||
h4{
|
||||
background: #ffffff88;
|
||||
}
|
||||
|
||||
img{
|
||||
transform: scale(1.3) rotateZ(15deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 332 KiB |
@ -1,60 +0,0 @@
|
||||
<section class='ProductGridSidebar content'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
<h1>
|
||||
{{$title}}
|
||||
</h1>
|
||||
<div class="row">
|
||||
@if(!getSetting($data->area->name.'_'.$data->part.'_invert'))
|
||||
<div class="col-lg-3 p-lg-1 pt-lg-0">
|
||||
@include('segments.products.ProductGridSidebar.inc.product-sidebar')
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
@foreach($products as $product)
|
||||
<div class="col-md-4 p-2">
|
||||
<div class="product-item">
|
||||
<a class="fav-btn" data-slug="{{$product->slug}}" data-is-fav="{{$product->isFav()}}">
|
||||
<i class="ri-heart-line"></i>
|
||||
<i class="ri-heart-fill"></i>
|
||||
</a>
|
||||
<a class="compare-btn" data-slug="{{$product->slug}}">
|
||||
<i class="ri-scales-3-line"></i>
|
||||
</a>
|
||||
<a href="{{$product->webUrl()}}">
|
||||
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}">
|
||||
<h3>
|
||||
{{$product->name}}
|
||||
</h3>
|
||||
<div class="prices">
|
||||
@if($product->hasDiscount())
|
||||
<span class="old-price">
|
||||
{{$product->oldPrice()}}
|
||||
</span>
|
||||
@endif
|
||||
<span class="price">
|
||||
{{$product->getPrice()}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<a href="{{ route('client.product-card-toggle',$product->slug) }}" class="btn btn-outline-primary w-100 add-to-card">
|
||||
<i class="ri-shopping-bag-3-line"></i>
|
||||
{{__("Add to card")}}
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{$products->links()}}
|
||||
|
||||
</div>
|
||||
@if(getSetting($data->area->name.'_'.$data->part.'_invert'))
|
||||
<div class="col-lg-3">
|
||||
@include('segments.products.ProductGridSidebar.inc.product-sidebar')
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
Before Width: | Height: | Size: 526 KiB After Width: | Height: | Size: 526 KiB |
@ -0,0 +1,61 @@
|
||||
<section class='ProductGridSidebar content'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
<h1>
|
||||
{{$title}}
|
||||
</h1>
|
||||
<div class="row">
|
||||
@if(!getSetting($data->area->name.'_'.$data->part.'_invert'))
|
||||
<div class="col-lg-3 p-lg-1 pt-lg-0">
|
||||
@include('segments.products_page.ProductGridSidebar.inc.product-sidebar')
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
@foreach($products as $product)
|
||||
<div class="col-md-4 p-2">
|
||||
<div class="product-item">
|
||||
<a class="fav-btn" data-slug="{{$product->slug}}" data-is-fav="{{$product->isFav()}}">
|
||||
<i class="ri-heart-line"></i>
|
||||
<i class="ri-heart-fill"></i>
|
||||
</a>
|
||||
<a class="compare-btn" data-slug="{{$product->slug}}">
|
||||
<i class="ri-scales-3-line"></i>
|
||||
</a>
|
||||
<a href="{{$product->webUrl()}}">
|
||||
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}">
|
||||
<h3>
|
||||
{{$product->name}}
|
||||
</h3>
|
||||
<div class="prices">
|
||||
@if($product->hasDiscount())
|
||||
<span class="old-price">
|
||||
{{$product->oldPrice()}}
|
||||
</span>
|
||||
@endif
|
||||
<span class="price">
|
||||
{{$product->getPrice()}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
|
||||
class="btn btn-outline-primary w-100 add-to-card">
|
||||
<i class="ri-shopping-bag-3-line"></i>
|
||||
{{__("Add to card")}}
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{$products->links()}}
|
||||
|
||||
</div>
|
||||
@if(getSetting($data->area->name.'_'.$data->part.'_invert'))
|
||||
<div class="col-lg-3">
|
||||
@include('segments.products_page.ProductGridSidebar.inc.product-sidebar')
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
Before Width: | Height: | Size: 417 KiB After Width: | Height: | Size: 417 KiB |
Loading…
Reference in New Issue