@ -1,15 +1,26 @@
|
||||
// PLEASE DO NOT EDIT THIS FILE,
|
||||
// IF YOU WANT ADD ANY CODE CREATE NEW SCSS INTO client-custom
|
||||
$xshop-background:#eeeeee;
|
||||
$xshop-primary:#6e0000;
|
||||
$xshop-diff:#ffffff;
|
||||
$xshop-secondary:#ff0000;
|
||||
$xshop-text:#111111;
|
||||
$xshop-border-radius:7px;
|
||||
$xshop-shadow:2px 2px 4px #777777;
|
||||
:root{
|
||||
--xshop-background:#eeeeee;
|
||||
--xshop-primary:#6e0000;
|
||||
--xshop-diff:#ffffff;
|
||||
--xshop-secondary:#ff0000;
|
||||
--xshop-text:#111111;
|
||||
--border-radius:7px;
|
||||
--xshop-border-radius:7px;
|
||||
--xshop-shadow:2px 2px 4px #777777;
|
||||
}
|
||||
|
||||
@import "client-custom/assetsNode";
|
||||
@import "client-custom/general";
|
||||
@import "client-custom/zfix";
|
||||
@import "../views/segments/preloader/PreloaderImage/PreloaderImage";
|
||||
@import "../views/segments/preloader/PreloaderCircle/PreloaderCircle";
|
||||
@import "../views/segments/top/TopSimple/TopSimple";
|
||||
@import "../views/segments/slider/SliderSimple/SliderSimple";
|
||||
@import "../views/segments/posts/PostsIconSimple/PostsIconSimple";
|
||||
|
@ -0,0 +1,31 @@
|
||||
<section class='PostsIconSimple py-4'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
<h1>
|
||||
<a href="{{getGroupBySetting($data->area->name.'_'.$data->part)->webUrl()}}">
|
||||
{{getGroupBySetting($data->area->name.'_'.$data->part)->name}}
|
||||
</a>
|
||||
</h1>
|
||||
<p>
|
||||
{{getGroupBySetting($data->area->name.'_'.$data->part)->description}}
|
||||
</p>
|
||||
<div class="row">
|
||||
@foreach(getGroupPostsBySetting($data->area->name.'_'.$data->part, getSetting($data->area->name.'_'.$data->part.'_limit')) as $post)
|
||||
<div class="col-md-4">
|
||||
<i class="{{$post->icon}}"></i>
|
||||
<h3>
|
||||
{{$post->title}}
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
{{$post->subtitle}}
|
||||
</p>
|
||||
|
||||
<a href="{{$post->webUrl()}}" class="btn btn-outline-primary w-100">
|
||||
{{__("Read more")}}
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "PostsIconSimple",
|
||||
"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,46 @@
|
||||
<?php
|
||||
|
||||
namespace Resources\Views\Segments;
|
||||
|
||||
use App\Models\Group;
|
||||
use App\Models\Part;
|
||||
use App\Models\Setting;
|
||||
|
||||
class PostsIconSimple
|
||||
{
|
||||
public static function onAdd(Part $part = null)
|
||||
{
|
||||
|
||||
$setting = new Setting();
|
||||
$setting->section = 'theme';
|
||||
$setting->key = $part->area->name . '_' . $part->part;
|
||||
$setting->value = Group::first()->id;
|
||||
$setting->type = 'GROUP';
|
||||
$setting->size = 6;
|
||||
$setting->title = $part->area->name . ' ' . $part->part;
|
||||
$setting->save();
|
||||
$setting = new Setting();
|
||||
$setting->section = 'theme';
|
||||
$setting->key = $part->area->name . '_' . $part->part.'_limit';
|
||||
$setting->value = 3;
|
||||
$setting->size = 6;
|
||||
$setting->type = 'NUMBER';
|
||||
$setting->data = json_encode(['xmin' => 2, 'xmax' => 12]);
|
||||
$setting->title = $part->area->name . ' ' . $part->part. ' limit';
|
||||
$setting->save();
|
||||
}
|
||||
|
||||
public static function onRemove(Part $part = null)
|
||||
{
|
||||
// \Log::info(' --- onRemove rem --- '.$part->area->name . '_' . $part->part);
|
||||
|
||||
// dd(Setting::where('key',$part->area->name . '_' . $part->part)->get());
|
||||
Setting::where('key',$part->area->name . '_' . $part->part)->first()?->delete();
|
||||
Setting::where('key',$part->area->name . '_' . $part->part.'_limit')->first()?->delete();
|
||||
}
|
||||
|
||||
public static function onMount(Part $part = null)
|
||||
{
|
||||
return $part;
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
.PostsIconSimple {
|
||||
// scss
|
||||
|
||||
h1{
|
||||
a{
|
||||
color: $xshop-text ;
|
||||
}
|
||||
}
|
||||
.row{
|
||||
text-align: center;
|
||||
|
||||
i{
|
||||
font-size: 75px;
|
||||
color: var(--xshop-primary);
|
||||
}
|
||||
p{
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 463 KiB After Width: | Height: | Size: 463 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |