Compare commits

..

No commits in common. '5cd729f4ce2090862e1c4f58f28012b5535a7975' and '9dd5008ee22839573e2466667d4bd13f52ceae42' have entirely different histories.

@ -92,8 +92,7 @@ class ClientController extends Controller
__('Video clips') => clipsUrl(), __('Video clips') => clipsUrl(),
$clip->title => null, $clip->title => null,
]; ];
$model = $clip; return view('client.default-list', compact('area', 'clip', 'title', 'subtitle', 'breadcrumb'));
return view('client.default-list', compact('area', 'clip', 'title', 'subtitle', 'breadcrumb','model'));
} }
public function gallery($slug) public function gallery($slug)
@ -176,8 +175,7 @@ class ClientController extends Controller
__('Attachments') => attachmentsUrl(), __('Attachments') => attachmentsUrl(),
$attachment->title => null, $attachment->title => null,
]; ];
$model = $attachment; return view('client.default-list', compact('area', 'attachment', 'title', 'subtitle', 'breadcrumb'));
return view('client.default-list', compact('area', 'attachment', 'title', 'subtitle', 'breadcrumb','model'));
} }
public function tag($slug) public function tag($slug)
@ -223,9 +221,7 @@ class ClientController extends Controller
} }
} }
if ($request->input('parent_id') != '') { $comment->parent_id = $request->input('parent_id', null);
$comment->parent_id = $request->input('parent_id', null);
}
$comment->body = $request->input('message'); $comment->body = $request->input('message');
$comment->commentable_type = $request->input('commentable_type'); $comment->commentable_type = $request->input('commentable_type');
$comment->commentable_id = $request->input('commentable_id'); $comment->commentable_id = $request->input('commentable_id');

@ -12,7 +12,7 @@
@endforeach @endforeach
@endif @endif
@foreach(getParts($area) as $part) @foreach(getParts($area) as $part)
@php($p = $part->getBladeWithData($model??null)) @php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']]) @include($p['blade'],['data' => $p['data']])
@endforeach @endforeach
@if(findArea($area)->use_default) @if(findArea($area)->use_default)

@ -12,7 +12,7 @@
@endforeach @endforeach
@endif @endif
@foreach(getParts($area) as $part) @foreach(getParts($area) as $part)
@php($p = $part->getBladeWithData($gallery)) @php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']]) @include($p['blade'],['data' => $p['data']])
@endforeach @endforeach
@if(findArea($area)->use_default) @if(findArea($area)->use_default)

@ -11,7 +11,7 @@
@endforeach @endforeach
@endif @endif
@foreach(getParts($area,$post) as $part) @foreach(getParts($area,$post) as $part)
@php($p = $part->getBladeWithData($post)) @php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']]) @include($p['blade'],['data' => $p['data']])
@endforeach @endforeach
@if(findArea($area,$post)->use_default) @if(findArea($area,$post)->use_default)

@ -12,7 +12,7 @@
@endforeach @endforeach
@endif @endif
@foreach(getParts($area,$product) as $part) @foreach(getParts($area,$product) as $part)
@php($p = $part->getBladeWithData($product)) @php($p = $part->getBladeWithData())
@include($p['blade'],['data' => $p['data']]) @include($p['blade'],['data' => $p['data']])
@endforeach @endforeach
@if(findArea($area,$product)->use_default) @if(findArea($area,$product)->use_default)

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="90"><path fill="none" stroke="#c5c6c6" d="M31 41c0 19.33 85.066 35 190 35s190-15.67 190-35c0-12.933-38.08-24.228-94.713-30.287"/><circle cx="31.118" cy="42.094" r="12.362" style="fill:none;fill-opacity:.998931;stroke:#c5c6c6;stroke-width:.69;stroke-dasharray:none;stroke-opacity:1"/><circle cx="31.204" cy="42.323" r="4.242" style="fill:maroon;fill-opacity:.998931;stroke:none;stroke-width:.69;stroke-dasharray:none;stroke-opacity:1"/><circle cx="86.201" cy="65.349" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/><circle cx="142.481" cy="72.624" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/><circle cx="214.078" cy="75.719" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/><circle cx="283.972" cy="74.022" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/><circle cx="349.739" cy="66.418" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/><circle cx="394.632" cy="26.596" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/><circle cx="315.84" cy="9.743" r="2.638" style="fill:#ccc;fill-opacity:.998931;stroke:none;stroke-width:.429084;stroke-dasharray:none;stroke-opacity:1"/></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 KiB

@ -1,43 +0,0 @@
<section id='SamiraProductSlider'>
<div class="{{gfx()['container']}}">
<div id="samira-container">
<div id="sam-nxt" class="sld-btn">
<i class="ri-arrow-right-line"></i>
</div>
<div id="sam-prv" class="sld-btn">
<i class="ri-arrow-left-line"></i>
</div>
<div id="samira-slider">
@foreach(getCategoryProductBySetting($part->area_name . '_' . $part->part.'_category') as $product)
<div class="item slider-content">
<div class="row">
<div class="col-md-8 cloudy">
<a href="{{$product->webUrl()}}">
<img src="{{$product->imgUrl()}}" alt="{{$product->name}}" loading="lazy">
</a>
<img src="{{asset('upload/images/index.SamiraProductSlider.webp')}}" alt="" class="bg">
<img src="{{asset('upload/images/circle-3d-minify.svg')}}" alt="" class="circle">
</div>
<div class="col-md-4">
<h4 class="mb-4">
{{$product->name}}
</h4>
<a href="{{$product->webUrl()}}" class="btn btn-outline-light">
{{__("View product")}}
<i class="ri-arrow-right-circle-fill float-end"></i>
</a>
</div>
</div>
</div>
@endforeach
</div>
</div>
</div>
</section>

@ -1,41 +0,0 @@
import {tns} from "tiny-slider/src/tiny-slider";
var author ;
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('#samira-slider')?.forEach(function (el) {
if (el.classList.contains('.tns-slider')){
console.log('ignore');
return 'ignore';
}
author = tns({
container: el,
items: 1.5,
// edgePadding: 50,
autoplay: true,
autoplayButton: false,
mouseDrag: true,
prevButton: false,
nextButton: false,
autoplayTimeout: 8000,
center: true,
nav: true,
loop:true,
});
});
document.querySelector('#sam-nxt')?.addEventListener('click',function () {
if (document.documentElement.getAttribute('dir') === 'rtl'){
author.goTo('prev');
}else{
author.goTo('next');
}
});
document.querySelector('#sam-prv')?.addEventListener('click',function () {
if (document.documentElement.getAttribute('dir') !== 'rtl'){
author.goTo('prev');
}else{
author.goTo('next');
}
});
});

@ -1,10 +0,0 @@
{
"name": "SamiraProductSlider",
"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": []
}

@ -1,79 +0,0 @@
<?php
namespace Resources\Views\Segments;
use App\Models\Category;
use App\Models\Part;
use App\Models\Setting;
use Illuminate\Support\Facades\File;
class SamiraProductSlider
{
public static function onAdd(Part $part = null)
{
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_title';
$setting->value = 'Lorem ipsum dolor sit amet';
$setting->type = 'TEXT';
$setting->size = 6;
$setting->title = $part->area_name . ' ' . $part->part .' titles';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_category';
$setting->value = Category::first()->id;
$setting->type = 'CATEGORY';
$setting->size = 3;
$setting->title = $part->area_name . ' ' . $part->part .' category';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_bg';
$setting->value = gfx()['secondary'];
$setting->type = 'COLOR';
$setting->data = json_encode(['name' => 'samira-bg']);
$setting->size = 3;
$setting->title = $part->area_name . ' ' . $part->part .' background color';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_limit';
$setting->value = 4;
$setting->size = 6;
$setting->type = 'NUMBER';
$setting->data = json_encode(['xmin' => 4, 'xmax' => 12]);
$setting->title = $part->area_name . ' ' . $part->part. ' limit';
$setting->save();
$setting = new Setting();
$setting->section = 'theme';
$setting->key = $part->area_name . '_' . $part->part.'_webp';
$setting->value = null;
$setting->type = 'FILE';
$setting->size = 6;
$setting->title = $part->area_name . ' ' . $part->part.' background pattern image';
$setting->save();
File::copy(__DIR__.'/../../default-assets/smoke.webp',public_path('upload/images/').$part->area_name . '.' . $part->part.'.webp');
File::copy(__DIR__.'/../../default-assets/circle-3d-minify.svg',public_path('upload/images/').'circle-3d-minify.svg');
}
public static function onRemove(Part $part = null)
{
Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_category')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'bg')->first()?->delete();
Setting::where('key',$part->area_name . '_' . $part->part.'_webp')->first()?->delete();
}
public static function onMount(Part $part = null)
{
return $part;
}
}

@ -1,143 +0,0 @@
#SamiraProductSlider {
// scss
padding: 4rem 0;
background: var(--samira-bg);
color: var(--xshop-diff2);
.container,.container-fluid{
position: relative;
padding: 2rem 0;
&:before{
position: absolute;
content: ' ';
top: 1rem;
bottom: 1rem;
left: 2rem;
right: 2rem;
background: #ffffff;
background: radial-gradient(circle, rgba(255,255,255,.4) 0%, rgba(0,0,0,0) 100%);
border-radius: 50%;
filter: blur(30px);
}
}
img{
width: 100px;
transition: 300ms;
height: 80vh;
object-fit: contain;
}
.slider-content{
height: 80vh;
//border:1px solid grey;
direction: rtl !important;
transform: translateX(25%);
.col-md-4{
padding-top: 40vh;
a{
color: white;
}
h4{
border-bottom: darkred 1px solid;
padding: .5rem;
}
}
}
.cloudy{
position: relative;
padding-top: 10vh;
.bg{
opacity: 0;
transition: 200ms;
}
}
.tns-slide-active{
img{
width: 100%;
height: 50vh;
}
&+.tns-item{
direction: ltr !important;
}
.cloudy{
.bg{
position: absolute;
left: 15%;
bottom: 0;
top: 0;
width: 75%;
z-index: -1;
object-fit: contain;
height: 70vh;
opacity: 1;
}
.circle{
position: absolute;
right: 0;
bottom: -10vh;
width: 100%;
object-fit: scale-down;
height: 15vh;
transform: translateX(5%);
}
}
}
#samira-container {
position: relative;
.sld-btn,.tns-nav{
z-index: 70;
position: absolute;
top: 90%;
cursor: pointer;
i{
font-size: 35px;
}
}
#sam-nxt{
left:calc(20% + 200px);
}
#sam-prv{
left: 20%;
}
.tns-nav{
display: flex !important;
width: 150px;
left:calc(20% + 45px);
height: 50px;
align-items: center;
justify-content: space-evenly;
button{
display: inline-block;
margin: 3px;
width: 10px;
height: 10px;
border-radius: var(--xshop-border-radius);
background: #ffffff44;
border: 0;
}
.tns-nav-active{
background: #ffffff;
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

Loading…
Cancel
Save